-
-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. 提示文案迁移为英文 2. 去除 lang 参数 3. 将 module 架构,调整为 template 架构
- Loading branch information
1 parent
6de5337
commit ddb38f9
Showing
118 changed files
with
33,695 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
template | ||
packages/module-js/template |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
node_modules | ||
package-lock.json | ||
packages/*/package-lock.json | ||
.DS_Store | ||
.eslintcache | ||
temp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,15 @@ | ||
const cli = require('../index.js'); | ||
const pkg = require('../package.json'); | ||
const modulejs = require('../module-js'); | ||
const modulets = require('../module-ts'); | ||
|
||
function update(option, answers) { | ||
function update(option) { | ||
const cmdPath = process.cwd(); | ||
option.version = pkg.version; | ||
cli.update(cmdPath, option, answers); | ||
if (option.type === 'js') { | ||
modulejs.update(cmdPath, option); | ||
} else if (option.type === 'ts') { | ||
modulets.update(cmdPath, option); | ||
} | ||
} | ||
|
||
exports.update = update; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
const path = require('path'); | ||
const util = require('../util/copy'); | ||
|
||
function init(cmdPath, name, option) { | ||
console.log('build: init'); | ||
|
||
util.copyTmpl( | ||
path.resolve(__dirname, `./template/build-rollup.cjs.tmpl`), | ||
path.resolve(cmdPath, name, 'config/rollup.cjs'), | ||
option, | ||
); | ||
} | ||
|
||
function update(cmdPath, option) { | ||
console.log('build: update'); | ||
|
||
// 删除 1.x 版本的无用数据 | ||
util.deleteJSONKeys( | ||
{ | ||
scripts: { | ||
'build:aio.min': undefined, | ||
}, | ||
dependencies: { | ||
'@babel/runtime': undefined, | ||
}, | ||
devDependencies: { | ||
'babel-core': undefined, | ||
'babel-preset-env': undefined, | ||
'rollup-plugin-babel': undefined, | ||
'rollup-plugin-commonjs': undefined, | ||
'rollup-plugin-node-resolve': undefined, | ||
'@babel/cli': undefined, | ||
'@babel/core': undefined, | ||
'rollup-plugin-uglify': undefined, | ||
}, | ||
}, | ||
path.resolve(cmdPath, './package.json'), | ||
); | ||
util.deleteDir(path.resolve(cmdPath, './config')); | ||
|
||
util.copyDir( | ||
path.resolve(__dirname, `./template/base/config`), | ||
path.resolve(cmdPath, 'config'), | ||
); | ||
|
||
util.copyTmpl( | ||
path.resolve(__dirname, `./template/build-rollup.cjs.tmpl`), | ||
path.resolve(cmdPath, 'config/rollup.cjs'), | ||
option, | ||
); | ||
} | ||
|
||
module.exports = { | ||
init: init, | ||
update: update, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const path = require('path'); | ||
const util = require('../util/copy'); | ||
|
||
function init(cmdPath, name, option) { | ||
console.log('config: init'); | ||
|
||
util.copyTmpl( | ||
path.resolve(__dirname, `./template/jslib.json.tmpl`), | ||
path.resolve(cmdPath, name, 'jslib.json'), | ||
option, | ||
); | ||
} | ||
|
||
function update() { | ||
console.log('config: update'); | ||
} | ||
|
||
module.exports = { | ||
init: init, | ||
update: update, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const path = require('path'); | ||
const util = require('../util/copy'); | ||
|
||
function init(cmdPath, name, option) { | ||
console.log('demo: init'); | ||
|
||
util.copyTmpl( | ||
path.resolve(__dirname, `./template/demo-global.html.tmpl`), | ||
path.resolve(cmdPath, name, 'demo/demo-global.html'), | ||
option, | ||
); | ||
} | ||
|
||
function update(_cmdPath, _option) { | ||
console.log('demo: update'); | ||
} | ||
|
||
module.exports = { | ||
init: init, | ||
update: update, | ||
}; |
Oops, something went wrong.