Browse Source

fix: read file failed

master
smallstonesk 4 years ago
parent
commit
07517f212e
  1. 2
      packages/cli/package.json
  2. 2
      packages/cli/src/cmd/dev/addPlugins.js
  3. 1
      packages/cli/src/cmd/dev/template/index.js

2
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": {

2
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

1
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

Loading…
Cancel
Save