📄 Help you create your project template file.
// use npm
npm install create-project-template -save-dev
// use yarn
yarn add create-project-template --dev
// index.js
const createTemplate = require('create-project-template')
createTemplate()
// Default create feature folder.
node index.js [feature-file]
You can configure your template file path and input path by calling the use method.
Import create-project-template
const createTemplate = require('create-project-template')
// use config
createTemplate.use({
sourcePath: 'src/components',
templatePath: 'template'
})
createTemplate()
Add quick command in package.json:
"scripts": {
"file": "node test.js"
}
Execute on the command line:
// use npm
npm run file feature
// use yarn
yarn file feature
Replacing them with kebabCase、camelCase strings.
<div class="$kebabCase$">
<h1>$camelCase$</h1>
</div>
$kebabCase$-table.vue
You can add strings of
- 2018-12-08 🎉 v1.0.0 create-project-template.
- 2018-12-12 ✨ v1.0.2 You can add strings of
$camelCase$ ,$kebabCase$ to the template file. After running the script, the strings are replaced by camelCase and kebabCase.