Skip to content

zxs-1024/create-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

create-project-template

📄 Help you create your project template file.

Install

// use npm
npm install create-project-template -save-dev

// use yarn
yarn add create-project-template --dev

Quick use

// index.js
const createTemplate = require('create-project-template')

createTemplate()

Command:

// Default create feature folder.
node index.js [feature-file]

Path config

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()

Quick command

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

Replacing them with kebabCase、camelCase strings.

<div class="$kebabCase$">
  <h1>$camelCase$</h1>
</div>
$kebabCase$-table.vue

You can add strings of $camelCase$, $kebabCase$ to the template file. After running the script, the strings are replaced by camelCase and kebabCase.

Update records

  • 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.

LICENSE

MIT

About

📄 Help you create your project template file.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published