版博士V2.0程序
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

12345678910111213141516171819202122
  1. Node-Plop
  2. ======
  3. [![npm](https://img.shields.io/npm/v/node-plop.svg)](https://www.npmjs.com/package/node-plop)
  4. [![GitHub actions](https://img.shields.io/github/workflow/status/plopjs/node-plop/test)](https://github.com/plopjs/node-plop/actions/workflows/test.yml)
  5. 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.
  6. This is the backend code that drives the plop CLI tool using node-plop.
  7. ``` javascript
  8. import nodePlop from 'node-plop';
  9. // load an instance of plop from a plopfile
  10. const plop = await nodePlop(`./path/to/plopfile.js`);
  11. // get a generator by name
  12. const basicAdd = plop.getGenerator('basic-add');
  13. // run all the generator actions using the data specified
  14. basicAdd.runActions({name: 'this is a test'}).then(function (results) {
  15. // do something after the actions have run
  16. });
  17. ```