Can Yeoman generators update existing files?

前端 未结 5 1970
旧巷少年郎
旧巷少年郎 2021-01-30 10:57

So just to give you some context, I\'m trying to create a generator that will create some files (based on user input of course) as well as update some existing files in

5条回答
  •  一向
    一向 (楼主)
    2021-01-30 11:40

    Use var text = this.fs.read(filePath) to read from a file and this.fs.write(filePath, content) to write to a file at location.

提交回复
热议问题