diff --git a/packages/cli/package.json b/packages/cli/package.json index 95009dc..aa9a70d 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@imove/cli", - "version": "0.0.1", + "version": "0.0.2", "description": "imove client", "main": "index.js", "bin": { diff --git a/packages/cli/src/cmd/dev/addPlugins.js b/packages/cli/src/cmd/dev/addPlugins.js index 0064cef..3a017c9 100644 --- a/packages/cli/src/cmd/dev/addPlugins.js +++ b/packages/cli/src/cmd/dev/addPlugins.js @@ -6,7 +6,7 @@ const INSERT_USE_PLUGINS_COMMENT = '\/\/ use plugins here'; const setup = async (plugins, logicBasePath) => { const entryFilePath = path.join(logicBasePath, 'index.js'); - const codes = await fs.readFile(entryFilePath); + const codes = await fs.readFile(entryFilePath, 'utf8'); const modifiedContent = codes .replace(new RegExp(INSERT_IMPORT_PLUGINS_COMMENT), () => { return plugins diff --git a/packages/cli/src/cmd/dev/template/index.js b/packages/cli/src/cmd/dev/template/index.js index c09d49a..e699a93 100644 --- a/packages/cli/src/cmd/dev/template/index.js +++ b/packages/cli/src/cmd/dev/template/index.js @@ -2,7 +2,6 @@ import Logic from './logic'; import dsl from './dsl.json'; // import plugins here - const logic = new Logic({dsl}); // use plugins here