You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
doublekou 4fddd39d76 更新 1 year ago
..
lib 更新 1 year ago
node_modules 更新 1 year ago
.eslintrc.js 更新 1 year ago
LICENSE 更新 1 year ago
README.md 更新 1 year ago
circle.yml 更新 1 year ago
index.d.ts 更新 1 year ago
package.json 更新 1 year ago

README.md

Node-Plop

Greenkeeper badge CircleCI

This is an early publication of the plop core logic being removed from the CLI tool. Main purpose for this is to make it easier for others to automate code generation through processes and tools OTHER than the command line. This also makes it easier to test the code functionality of PLOP without needing to test via the CLI interface.

Once I feel comfortable that this code functions as it should. I'll be driving the plop CLI tool using node-plop.

const nodePlop = require('node-plop');
// load an instance of plop from a plopfile
const plop = nodePlop(`./path/to/plopfile.js`);
// get a generator by name
const basicAdd = plop.getGenerator('basic-add');

// run all the generator actions using the data specified
basicAdd.runActions({name: 'this is a test'}).then(function (results) {
  // do something after the actions have run
});