0.1.1 • Published 2 years ago
bin-create v0.1.1
usage
- create config file
.create.js
in root directory - run command:
create
config example
.create.js
const path = require('path')
module.exports = {
root: path.join(__dirname, '/src'),
paths: [
{
test: [
'index.js',
{
test: []
}
],
test2: [
{
public: ['index.html']
}
]
},
'test.js'
],
}
or
const path = require('path')
module.exports = {
root: path.join(__dirname, '/src'), // base path
template: path.join(__dirname, '/template'), // template path
paths: [
{
test: [
{
name: 'index.js',
template: 'index.js'
},
{
test: [],
name: []
},
'utils.js'
],
test2: [
{
public: [{name: 'index.html', template: 'index.html'}]
}
]
},
'test.js'
],
}
create dir test,test2 and test.js under root refer dir and under dir test is file index.js and another test dir.etc...
usage style
create
create -inject=dirname
create .create.another.js
// ignored the default config file .create.js in root directory
create .create.another.js -inject=dirname
// ignored the default config file .create.js in root directory
args
-inject: create directories or files in root + inject