Giter Site home page Giter Site logo

node-plop's People

Contributors

amwmedia avatar armand1m avatar calcaide avatar codybrouwers avatar crutchcorn avatar cspotcode avatar davidmwhynot avatar dependabot[bot] avatar greenkeeper[bot] avatar jacksteamdev avatar jednano avatar jonathanmorley avatar jquense avatar jrencz avatar justmaier avatar knikolov-nuvolo avatar macrozone avatar maraisr avatar nicoespeon avatar ramin0 avatar reggi avatar robinknipe avatar tannerntannern avatar tkvw avatar tsur avatar tuliren avatar wander95 avatar williamdclt avatar wtgtybhertgeghgtwtg avatar zonzujiro avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-plop's Issues

Inquirer prompts should have their filter applied during bypass

Inquirer prompts allow the user to specify a filter function on a question. Specifying a filter works when a prompt is not bypassed. However, it is not executed when bypassing the prompt.

Expected behavior:
When bypassing prompts - if there is a filter for that prompt then it should be executed.

e.g.

module.exports = plop => {
  plop.setGenerator("container", {
    description: "Generate React container component",
    prompts: [
      {
        type: "input",
        name: "name",
        message: "Container name",
        filter: answer => `${answer}Container`
      }
    ],
    actions: [
      {
        type: "add",
        path: "src/containers/{{pascalCase name}}.js",
        templateFile: "./container.hbs"
      }
    ]
  });
};

Screenshot not bypassing prompts:
image

Screenshot bypassing prompts:
image

An in-range update of ava is breaking the build 🚨

The devDependency ava was updated from 2.2.0 to 2.3.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

ava is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for 2.3.0

Changes

  • We've fixed some bugs to improve watch mode. ffa62ce 9e8d28f
  • AVA now prints an error when it receives non-existent test files on the command line. f01d05f
  • When using the TAP reporter, remaining tests are now included in failed test count. Failed hooks are no longer treated as test failures, and logs are printed. 8628976
  • Internal errors that may occur for some edge cases are now printed. b27cb8d
  • TTY in the worker processes should follow the new APIs in Node.js 12.7.0 (when used with those Node.js versions). 7dcb473
  • AVA now handles stage-4 syntax like dynamic import, and stage-3 syntax like BigInt, numeric separators and class properties that are supported by V8. 9baca8c
  • AVA now supports dynamic import through our stage-4 preset.
  • AVA now uses import-local@^3.0.2 which fixes issues with Lerna projects.
  • For our TypeScript users, we've changed the default type of t.context to unknown, in line with TypeScript's changes in their 3.5 release. 2fc7d56

All changes

v2.2.0...v2.3.0

Thanks

Thank you @MarchWorks, @yovasx2 and @bobthekingofegypt. We couldn't have done this without you!

Get involved

We welcome new contributors. AVA is a friendly place to get started in open source. We have a great article on getting started contributing and a comprehensive contributing guide.

Commits

The new version differs by 10 commits.

  • 1c81c4b 2.3.0
  • 9e8d28f Watcher: Only track test files has having exclusive tests if at least one test was selected
  • 7dcb473 Update fake-tty for changes in Node.js 12.7.0
  • 9baca8c Enable V8 supported stage-3 syntax, as well as stage-4 syntax
  • 7fb0546 Bump dependencies
  • ffa62ce Consistent paths in watcher
  • b27cb8d Print internal errors when precompiler setup or globbing fails
  • 8628976 Print hooks and remaining tests as TAP comments
  • f01d05f Ensure CLI receives file paths
  • 2fc7d56 Change default Context type to unknown

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Any way to import (merge?) multiple templates?

If I have the following:

|- base
  |- src
    |- components
      |- hello.js (template)

|- additional
  |- src
    |- helpers
      |- hey.js (template)

Is there a way to end up with this?

|- base
  |- src
    |- components
      |- hello.js
    |- helpers
      |- hey.js

I've tried chaining addMany and it doesn't like it:

      {
        type: 'addMany',
        templateFiles: `./base/**/*`,
        globOptions: { dot: true },
        base: './base/',
        destination: './some-folder'
      },
      {
        type: 'addMany',
        templateFiles: `./additional/**/*`,
        globOptions: { dot: true },
        base: './base/',
        destination: './some-folder'
      }

I've tried a comma glob pattern in one addMany and it doesn't like it:

      {
        type: 'addMany',
        templateFiles: `./base/**/*, ./additional/**/*`,
        globOptions: { dot: true },
        base: './base/',
        destination: src
      }

Perhaps there is a globOptions thing that I can't work out? Is this even possible, and am I approaching this correctly?

npm run develop, not work as expected

The problem occurs when you run $ npm run develop for second time. I clone the project, I run npm run develop and all is alright, but when I run it for a second time, the console is showing me a error:

loudRejection/api is deprecated. Use the currently-unhandled module instead.
module.js:327
    throw err;
    ^

Error: Cannot find module '../lib/index.js'

I will try to figure out what is happening.

Incorrect types for dynamic action array

Actual behavior

When dynamically generating an actions array using a plopfile written in TypeScript, then TypeScript raises an error:

Type '({ componentName }: object) => { type: "add"; path: string; }[]' is not assignable to type 'ActionType<object>[] | CustomActionFunction<object>'.
Type '({ componentName }: object) => { type: "add"; path: string; }[]' is not assignable to type 'CustomActionFunction<object>'.
  Type '{ type: "add"; path: string; }[]' is not assignable to type 'ActionType<object>[] | Promise<ActionType<object>[]>'.
    Type '{ type: "add"; path: string; }[]' is not assignable to type 'ActionType<object>[]'.
      Type '{ type: "add"; path: string; }' is not assignable to type 'ActionType<object>'.
        Type '{ type: "add"; path: string; }' is missing the following properties from type 'AppendActionConfig<object>': pattern, template, templateFile, force, and 2 more.ts(2322)
index.d.ts(129, 3): The expected type comes from property 'actions' which is declared here on type 'PlopGenerator'
import { NodePlopAPI } from 'plop';

export default (plop: NodePlopAPI) => {
  plop.setGenerator('component', {
    description: 'React component',
    prompts: [
      {
        type: 'input',
        name: 'componentName',
        message: "What's the name of your component?"
      },
      // ...
    ],
    actions: ({ componentName }) => [
      {
        type: 'add',
        path: `./${componentName}.js`,
        // ...
      }
    ]
  });
}

Expected behavior

Dynamic action arrays should be typed correctly.

Context

Plop: 2.5.3
TypeScript: 3.7.3

Support for extension dropping

If you have a directory, with say templates/{index.js,test.js}.hbs - and run the action addMany, could that potentially support an additional property to drop of a file extension?

as in:

module.exports = function(plop) {
	plop.setGenerator('component', {
		description: 'Generate a new component',
		prompts: [
			{
				type: 'input',
				name: 'name',
				message: 'component name?',
			},
		],
		actions() {
			return [
				{
					type: 'addMany',
					destination: 'lib/components/{{ pascalCase name }}.{{ ext }}',
					base: 'templates/component/',
                                        ext: 'without-hbs', // or 'as-is', or ext(incomingFile:string): string
					templateFiles: 'templates/component/**/*',
				},
			];
		},
	});
};

No typing for functional prompts in generators

Hello, I've been using the library and found a slight issue with the typing for generators.

There appears to be support for the prompt value of a generator config to be a function:

if (typeof prompts === 'function') {

But this is not reflected in the typing:

  prompts: inquirer.Question[];

Let me know if you'd like me to take a crack at this! Should be simple and very similar to the actions typing in that same interface:

  actions: Actions | DynamicActionFunction;

Thanks!

Allowing hierarchical prompts

Plop is a wonderful tool, so thank you for developing it 👍🏻

Would it be possible to add support for dynamic prompts defined by a function? Currently, plop expects the prompts to be defined by an object, but I need to prompt the user with different questions depending on the user's previous answers. I'm happy to submit a quick PR but wanted to run it by you first.

Here is a simplified example illustrating my use case:

// prompts.js
function promptForFileName(inquirer, answers = {}) {
	const prompts = inquirer.prompt([{
		type: 'input',
		name: 'name',
		message: 'What should be the name of your new file?'
	}, {
		type: 'confirm',
		name: 'overrideContent',
		message: 'Do you wanna override the default content?'
	}]);

	prompts.then((newAnswers) => {
		Object.assign(newAnswers, answers);
	});

	return prompts;
}

function promptForContent(inquirer, answers = {}) {
	const prompts = inquirer.prompt({
		type: 'input',
		name: 'content',
		message: 'Content:'
	});

	prompts.then((newAnswers) => {
		Object.assign(newAnswers, answers);
	});

	return prompts;
}

module.exports = function(inquirer) {
	const basePrompt = promptForFileName(inquirer);

	return basePrompt.then((answers) => {
		if (answers.overrideContent) {
			return promptForContent(inquirer, answers);
		}

		return basePrompt;
	});
};
// plopfile.js
const prompts = require('./prompts');

module.exports = function (plop) {
	plop.setGenerator('dynamic-actions', {
		description: 'another test using an actions function',
		prompts: prompts,
		actions: function(data) {
			if (!data.overrideContent) {
				data.content = 'Default content';
			}

			return [
				{
					type: 'add',
					path: `./${data.name}.txt`,
					template: '{{ content }}'
				}
			];
		}
	});
};

Broken on node 4

Getting an error on these default function parameters, which isn't supported in node 4:
https://github.com/amwmedia/node-plop/blob/master/src/modules/node-plop.js#L8

function nodePlop(plopfilePath = '', plopCfg = {}) {
SyntaxError: Unexpected token =

I see that babel is set up to read the system node version, so you may need to run the build with your machine running node 4 before publishing, or change the engines field in package.json to >= 6

How to resolve variables in action path?

I am making a custom a action, here are the args:

{
  answers: { domainName: 'admin' },
  config: {
    type: 'CreateDirectory',
    path: 'src/domain/{domainName}/mutation',
    force: false
  }
}

I am trying to get src/domain/admin/mutation

I tried this:

import * as plopUtils from 'node-plop/lib/actions/_common-action-utils.js';
const dest = plopUtils.makeDestPath(answers, config, plop)

But still not resolved

/Users/Desktop/src/domain/{domainName}/mutation

action.data function arguments

It seems that when action.data is a function, it receives no arguments.

let cfgData = cfg.data || {};
// data can also be a function that returns a data object
if (typeof cfgData === 'function') { cfgData = yield cfgData(); }

I found the type definition confusing misleading:

node-plop/index.d.ts

Lines 171 to 176 in decdd3f

/**
* @default {}
*/
data:
| TData
| ((...args: any[]) => TData | Promise<TData>);

Should the data function receive the existing data from the prompts? This could be useful for file loading, etc...

I can make a pull request if this is welcome!

Next release

Not sure, that this is an issue, this is an OSS and I don't want to be pushy, but can you make a release? :) Please 😄

Last release was in November and right now using of plop in TS is blocked by:

  1. f99584d - missing types for DynamicActionFunction, which was added in December
  2. #145 and missing support of ESM modules.

v0.23.0...master list of comments with diff

Much thx for your job on this generator! 👍

Minor refactor test.ava.js

A minor refactor in test.ava.js to use ES6 import instead of require. Also, regroup all the imports at the beginning of the document to improve the developer experience.

Bad path to creating files

Hi,

I try to load te plopfile from global lib but, when I try to add some files the path where I want create is wrong

This is the file that run node-plop:

#!/usr/bin/env node

'use strict';

const nodePlop = require('node-plop'); 
const plop = nodePlop(__dirname + `/plopfile.js`);

async function createMs(){
    let msGen = plop.getGenerator('ms');
    try{
      let data = await msGen.runPrompts();
      let result = await msGen.runActions(data);
      
      let changes = result.changes;
      let fails = result.failures;
      console.log(fails);
      console.log(changes);

  }catch(error){
    console.log(error);
 }

createMs();

I packing this function whit the plofile and then install npm i -g lib.tgz then calling this using mg new ms.

When try to write de proyect folder throws this error, because is trying to write in the path where plopfile is located no where comand is called

[ { type: 'addMany',
    path: '',
    error: 'EACCES: permission denied, mkdir \'/usr/lib/node_modules/ms-node-generator/my-microservice\'' } ]
[]

pkg helper is broken

Currently pkg helper is broken since plup uses wrong path to load package.json:

https://github.com/amwmedia/node-plop/blob/master/src/modules/node-plop.js#L112

Basicly node-plop uses path before setPlopfilePath is called, so instead of /foo/bar/package.json it uses /foo/bar/plopfile.js/package.json.

Solution:

+ try { pkgJson = require(path.join(path.dirname(getDestBasePath()), 'package.json')); }

But this is kinda "hack", the problem itself is that plopfilePath contains both file path and directory path depending on time.

An in-range update of del is breaking the build 🚨

The dependency del was updated from 5.0.0 to 5.1.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

del is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Release Notes for v5.1.0

Enhancements:

  • Allow non-glob patterns with backslash on Windows (like v4) (#100) 01da91f
  • Make deletion more reliable on Windows by retrying when Windows is being difficult (#108) 1299747
  • Sort removed files, so the returned array is always stable (#102) ca05c65

Fixes:

  • Fix the cwd option (#96) ffbf4c4
  • Prevent race condition on macOS when deleting files (#95) 8efdbcd

v5.0.0...v5.1.0


Shoutout to @chrisblossom for doing most of the work on this release 🙌

Commits

The new version differs by 12 commits.

  • 557c1fa 5.1.0
  • 12c443d Meta tweaks
  • 01da91f Allow non-glob patterns with backslash on Windows (#100)
  • 9c72270 Add benchmarks (#101)
  • 1299747 Use graceful-fs (#108)
  • f509a89 Update dependencies (#109)
  • ca05c65 Sort removed files (#102)
  • 51662ac Reverse order back for the returned paths (#99)
  • 902b594 Meta tweaks
  • ffbf4c4 Fix the cwd option (#96)
  • 8efdbcd Prevent race condition on macOS when deleting files (#95)
  • 9e7550b Add note about backward-slashes

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Add action is resulting in a "FAILED" log

The problem

Cannot read property 'toString' of undefined

image

The repro (versions and co)

My blog:

https://github.com/tychota/blog/tree/257dbb6b553a745c691e9eb4eb4602a0f191d55f

You can find the package.json and the plopfile

The start of the investigation and the hack

patch-package
--- a/node_modules/node-plop/lib/generator-runner.js
+++ b/node_modules/node-plop/lib/generator-runner.js
@@ -111,7 +111,7 @@ exports.default = function (plopfileApi, flags) {
 		// show the resolved value in the console
 		result => ({
 			type: cfg.type || 'function',
-			path: _colors2.default.blue(result.toString())
+			path: _colors2.default.blue(result && result.toString())
 		}),
 		// a rejected promise is treated as a failure
 		function (err) {

used with patch-package fix the problem.

See https://github.com/tychota/blog/blob/257dbb6b553a745c691e9eb4eb4602a0f191d55f/patches/node-plop%2B0.16.0.patch

The proper fix

I will be super please to PR a better fix if you have an idea. I must understand why in this case result is undefined. And then fix so result of Add action so the root cause is fixed.

Would be kind if you can help me going in the right direction.

If I don't answser in github, you can ping me in twitter (@tychota) ! Github notifications is quite messy for me.

addMany action is copying folders instead files

This is weird I'm making my generator based on plop and the addMany action is copying the template folders and the files. Is better with an illustrated example:

This is my addMany action

{
  type: 'addMany',
  destination: `${basepath}/components/{{folder_name}}`,
  templateFiles: 'templates/generator/smart/*'
},

where basepath is:

const currentPath  = process.cwd()
const basepath = path.resolve(currentPath, '../')

if I execute the ploplfile, the results is:
seleccion_015

prueba2 is the folder_name and then, plop copy the folders of the templateFiles into folder_name, generator/smart/....

I really don't know what is happening here, is weird for me. Can anyone help me?

Modify answers array action?

Inquirer gives a named object of 'answers' to each action.

Sometimes I want transformations of those in the templates. I currently use the handlebars helpers for this. I repeat them a lot.

I might be nice if the plop object had those answers, and made them modifiable. This would allow actions like:

  plop.setActionType('postProcessAnswers', (answers, config, plop) => {
     plop.answers.someOther = someFunction(answers.firstAnswer);
  });

This might also be a terrible idea :) Thanks!

The tests are broken

I didn't try the tests until now and when I tried a get a bunch of SyntaxErrors related with new ES6 features.

Karma failed

$ ng test
import * as nodePlop from 'node-plop';

describe('test', () => {

  console.log(nodePlop)

});
WARNING in ./packages/cli/node_modules/node-plop/lib/node-plop.js
168:13-76 Critical dependency: the request of a dependency is an expression
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

WARNING in ./packages/cli/node_modules/node-plop/lib/node-plop.js
236:2-58 Critical dependency: the request of a dependency is an expression
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

WARNING in ./packages/cli/node_modules/handlebars/lib/index.js
require.extensions is not supported by webpack. Use a loader instead.
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js 19:18-39
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

WARNING in ./packages/cli/node_modules/handlebars/lib/index.js
require.extensions is not supported by webpack. Use a loader instead.
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js 19:18-39
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

WARNING in ./packages/cli/node_modules/handlebars/lib/index.js
require.extensions is not supported by webpack. Use a loader instead.
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js 19:18-39
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/external-editor/main/index.js
Module not found: Error: Can't resolve 'child_process' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/external-editor/main'
 @ ./packages/cli/node_modules/external-editor/main/index.js 17:14-38 19:10-34
 @ ./packages/cli/node_modules/inquirer/lib/prompts/editor.js
 @ ./packages/cli/node_modules/inquirer/lib/inquirer.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/async/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/async'
 @ ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/async/index.js 9:6-19
 @ ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/index.js
 @ ./packages/cli/node_modules/fast-glob/out/providers/reader-sync.js
 @ ./packages/cli/node_modules/fast-glob/out/index.js
 @ ./packages/cli/node_modules/fast-glob/index.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/stream/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/stream'
 @ ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/stream/index.js 8:6-19
 @ ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/index.js
 @ ./packages/cli/node_modules/fast-glob/out/providers/reader-sync.js
 @ ./packages/cli/node_modules/fast-glob/out/index.js
 @ ./packages/cli/node_modules/fast-glob/index.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/sync'
 @ ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/sync/fs.js 3:11-24
 @ ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/sync/index.js
 @ ./packages/cli/node_modules/@mrmlnc/readdir-enhanced/lib/index.js
 @ ./packages/cli/node_modules/fast-glob/out/providers/reader-sync.js
 @ ./packages/cli/node_modules/fast-glob/out/index.js
 @ ./packages/cli/node_modules/fast-glob/index.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/@nodelib/fs.stat/out/adapters/fs.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/@nodelib/fs.stat/out/adapters'
 @ ./packages/cli/node_modules/@nodelib/fs.stat/out/adapters/fs.js 3:11-24
 @ ./packages/cli/node_modules/@nodelib/fs.stat/out/managers/options.js
 @ ./packages/cli/node_modules/@nodelib/fs.stat/out/index.js
 @ ./packages/cli/node_modules/fast-glob/out/adapters/fs-stream.js
 @ ./packages/cli/node_modules/fast-glob/out/providers/reader-stream.js
 @ ./packages/cli/node_modules/fast-glob/out/index.js
 @ ./packages/cli/node_modules/fast-glob/index.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/chardet/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/chardet'
 @ ./packages/cli/node_modules/chardet/index.js 2:9-22
 @ ./packages/cli/node_modules/external-editor/main/index.js
 @ ./packages/cli/node_modules/inquirer/lib/prompts/editor.js
 @ ./packages/cli/node_modules/inquirer/lib/inquirer.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/external-editor/main/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/external-editor/main'
 @ ./packages/cli/node_modules/external-editor/main/index.js 13:7-20
 @ ./packages/cli/node_modules/inquirer/lib/prompts/editor.js
 @ ./packages/cli/node_modules/inquirer/lib/inquirer.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/fs.realpath/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/fs.realpath'
 @ ./packages/cli/node_modules/fs.realpath/index.js 8:9-22
 @ ./packages/cli/node_modules/glob/glob.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/fs.realpath/old.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/fs.realpath'
 @ ./packages/cli/node_modules/fs.realpath/old.js 24:9-22
 @ ./packages/cli/node_modules/fs.realpath/index.js
 @ ./packages/cli/node_modules/glob/glob.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/glob/glob.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/glob'
 @ ./packages/cli/node_modules/glob/glob.js 43:9-22
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/glob/sync.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/glob'
 @ ./packages/cli/node_modules/glob/sync.js 4:9-22
 @ ./packages/cli/node_modules/glob/glob.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/globby/gitignore.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/globby'
 @ ./packages/cli/node_modules/globby/gitignore.js 2:11-24
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/handlebars/lib/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/handlebars/lib'
 @ ./packages/cli/node_modules/handlebars/lib/index.js 17:11-24
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/isbinaryfile/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/isbinaryfile'
 @ ./packages/cli/node_modules/isbinaryfile/index.js 1:9-22
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/mkdirp/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/mkdirp'
 @ ./packages/cli/node_modules/mkdirp/index.js 2:9-22
 @ ./packages/cli/node_modules/node-plop/lib/fs-promise-proxy.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/append.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/node-plop/lib/fs-promise-proxy.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/node-plop/lib'
 @ ./packages/cli/node_modules/node-plop/lib/fs-promise-proxy.js 12:10-23
 @ ./packages/cli/node_modules/node-plop/lib/actions/append.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/node-plop/lib/node-plop.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/node-plop/lib'
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js 7:10-23
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/node-plop/lib/actions'
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js 15:10-23
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/path-type/index.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/path-type'
 @ ./packages/cli/node_modules/path-type/index.js 2:11-24
 @ ./packages/cli/node_modules/dir-glob/index.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/resolve/lib/node-modules-paths.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/resolve/lib'
 @ ./packages/cli/node_modules/resolve/lib/node-modules-paths.js 2:9-22
 @ ./packages/cli/node_modules/resolve/lib/sync.js
 @ ./packages/cli/node_modules/resolve/index.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/resolve/lib/sync.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/resolve/lib'
 @ ./packages/cli/node_modules/resolve/lib/sync.js 2:9-22
 @ ./packages/cli/node_modules/resolve/index.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/resolve/lib/async.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/resolve/lib'
 @ ./packages/cli/node_modules/resolve/lib/async.js 2:9-22
 @ ./packages/cli/node_modules/resolve/index.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/rimraf/rimraf.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/rimraf'
 @ ./packages/cli/node_modules/rimraf/rimraf.js 6:9-22
 @ ./packages/cli/node_modules/del/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/_common-action-add-file.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/add.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/snapdragon/lib/source-maps.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/snapdragon/lib'
 @ ./packages/cli/node_modules/snapdragon/lib/source-maps.js 3:9-22
 @ ./packages/cli/node_modules/snapdragon/lib/compiler.js
 @ ./packages/cli/node_modules/snapdragon/index.js
 @ ./packages/cli/node_modules/micromatch/lib/utils.js
 @ ./packages/cli/node_modules/micromatch/index.js
 @ ./packages/cli/node_modules/fast-glob/out/utils/pattern.js
 @ ./packages/cli/node_modules/fast-glob/out/managers/tasks.js
 @ ./packages/cli/node_modules/fast-glob/out/index.js
 @ ./packages/cli/node_modules/fast-glob/index.js
 @ ./packages/cli/node_modules/globby/index.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/addMany.js
 @ ./packages/cli/node_modules/node-plop/lib/actions/index.js
 @ ./packages/cli/node_modules/node-plop/lib/generator-runner.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/tmp/lib/tmp.js
Module not found: Error: Can't resolve 'fs' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/tmp/lib'
 @ ./packages/cli/node_modules/tmp/lib/tmp.js 12:11-24
 @ ./packages/cli/node_modules/external-editor/main/index.js
 @ ./packages/cli/node_modules/inquirer/lib/prompts/editor.js
 @ ./packages/cli/node_modules/inquirer/lib/inquirer.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

ERROR in ./packages/cli/node_modules/inquirer/lib/ui/baseUI.js
Module not found: Error: Can't resolve 'readline' in '/Users/splincode/Documents/Develop/store/packages/cli/node_modules/inquirer/lib/ui'
 @ ./packages/cli/node_modules/inquirer/lib/ui/baseUI.js 4:15-34
 @ ./packages/cli/node_modules/inquirer/lib/ui/prompt.js
 @ ./packages/cli/node_modules/inquirer/lib/inquirer.js
 @ ./packages/cli/node_modules/node-plop/lib/node-plop.js
 @ ./packages/cli/node_modules/node-plop/lib/index.js
 @ ./packages/cli/tests/cli.spec.ts
 @ ./packages sync \.spec\.ts$
 @ ./test.ts

A way to perform final code transformations

I've been adding Plop to my projects over the last few months, and something I've been wanting is an easy way to transform the template output before writing the file. Oftentimes it would be easier/faster to drop some code into the action, rather than abandon the default actions to write a Custom Action Function or a new action.

Use cases include linting and formatting, or making a one-off change instead of creating and loading a new Handlebars helper.

I found one issue that might relate to this: plopjs/plop#80

One way to accomplish this would be to add an optional transform() function to the actions add, addMany, and modify. It would take the template output and the Inquirer data, and should return or resolve the final file contents as a string.

function transform(templateOutput: string, data: any): string | Promise<string>

A quick look suggests it would be trivial to implement.

if (absTemplatePath != null && isBinaryFileSync(absTemplatePath)) {
const rawTemplate = await fspp.readFileRaw(cfg.templateFile);
await fspp.writeFileRaw(fileDestPath, rawTemplate);
} else {
const renderedTemplate = await getRenderedTemplate(data, cfg, plop);
await fspp.writeFile(fileDestPath, renderedTemplate);
}

I've got some OSS time this week, so if there's no objections I can put together a pull request.

`npm` package is outdated

Please update your npm package from 0.13.0 to the newest 0.15.0. There are a few fixes in 0.15.0 that my project relies on and trying to share my fixes to others are difficult

Refactor plop-base.js

I think could be a good Idea to refactor a plop-base.js. Use ES6 standard modules and ES Classes. Also use const or let (depend on the case) instead of var. What do you think @amwmedia ?

Of course, I will fork the project, open a branch referring to this issue and push a pull request.

I mention you because here and I do not want to step on your work.

Unwanted action data persistence

Sometimes one does not want to have a single file with each, but wants multiple files instead.
In the example below I try to render the same template multiple times but with the different data. parents is an array produced by checkbox prompt.

const actions = _.map(parents, parent => ({
  type: 'add',
  path: `migrations/model_belongs_to_${parent}.js`,
  templateFile: `templates/belongs_to.hbs`,
  data: { parent },
})),

In my case the generated files have the same parent value -- the first one from the array.

It seems this commit ac4bcc4 has "fixed" such a behavior.
I can fully understand why we prevent overwriting the answers gathered by inquirer, but that code does a bit more than that.

An in-range update of eslint-plugin-standard is breaking the build 🚨

The devDependency eslint-plugin-standard was updated from 4.0.0 to 4.0.1.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

eslint-plugin-standard is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ci/circleci: Your tests failed on CircleCI (Details).

Commits

The new version differs by 8 commits.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action required: Greenkeeper could not be activated 🚨

🚨 You need to enable Continuous Integration on all branches of this repository. 🚨

To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because we are using your CI build statuses to figure out when to notify you about breaking changes.

Since we did not receive a CI status on the greenkeeper/initial branch, we assume that you still need to configure it.

If you have already set up a CI for this repository, you might need to check your configuration. Make sure it will run on all new branches. If you don’t want it to run on every branch, you can whitelist branches starting with greenkeeper/.

We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.

Once you have installed CI on this repository, you’ll need to re-trigger Greenkeeper’s initial Pull Request. To do this, please delete the greenkeeper/initial branch in this repository, and then remove and re-add this repository to the Greenkeeper integration’s white list on Github. You'll find this list on your repo or organization’s settings page, under Installed GitHub Apps.

Clean command

I suppose that the purpose of the script that execute the command npm run clean is for delete the /lib folder.

I guess a cli-command like rm -rf /lib could do the same job. And you save a script file for it. Let me your opinion about it 😄 . If you like the change, I leave a PR implemented #12 , if not just reject 😉

Upgrade Inquirer.js version

This is a request to update the Inquirer dependency to the latest version.

The primary reason is to have this PR integrated in so that we can reference the answers hash in the filter function.

SBoudrias/Inquirer.js#533

Depending on your bandwidth, I may have time to assign this to myself and jump on the update sometime soon.

Latest version of node-plop gives strange errors in react application

Hi was having node-plop version 0.16.0 in my application.
During App scan I found some issues of security vulnerabilities which were related to handlebars packages. Since the parent of handlebars was node-plop hence I tried to update node-plop package to the latest 0.23.0 and then started to get some issues -

Error: ENOENT: no such file or directory, open 'D:\home\vcap\app\server\certs\IBMid\blueid-server.crt'
at Object.openSync (fs.js:443:3)

There is no path which is specified above.
Kindly look into it and send updates on the same.

@types/inquirer must be a dependency, not devDependency

The bundled .d.ts file tries to import type declarations for inquirer. This means that @types/inquirer must be declared as a dependency, not a devDependency. Otherwise, anyone trying to use node-plop will get TypeScript errors about missing declarations.

This is a common point of confusion, so here's a link where I explained this a few days ago:
https://www.reddit.com/r/typescript/comments/byar8w/tool_to_tell_me_which_types_deps_should_be_deps/eqfhsrf/

Here's an official explanation from the Typescript team: microsoft/types-publisher#81

Add more general inputs API

I propose the following to keep it backwards compatible

  return Object.assign({}, generator, {
    runActions: (data) => runner.runGeneratorActions(generator, data),
    runInputs: () => runner.runGeneratorInputs(generator),
    runPrompts: () => runner.runGeneratorPrompts(generator)
  });

Then in generator-runner allow for a more general inputs method

	const runGeneratorInputs = co.wrap(function* (genObject) {
		if (genObject.inputs == null) {
			throw Error(`${genObject.name} has no prompts`);
		}
		return yield genObject.inputs(genObject);
	});

	return {
		runGeneratorActions,
		runGeneratorInputs,
		runGeneratorPrompts
	};

Template files without extension are ignored

Hey,

We ran into an issue where files such as Dockerfile or .babelrc are ignored because of https://github.com/amwmedia/node-plop/blob/17fb3ff9ee6f61ba9b64751234b0e87714ec7de5/src/actions/addMany.js#L47.

I'm happy to open a PR that removes the isFile function together with its use at https://github.com/amwmedia/node-plop/blob/17fb3ff9ee6f61ba9b64751234b0e87714ec7de5/src/actions/addMany.js#L41.

Before I do though, I want to make sure that PR would get accepted. It's quite possible that isFile function is required 🤔.

Remove @types/globby and @types/handlebars from package.json

I'm getting the following warning during node-plop install:

warning plop > node-plop > @types/[email protected]: This is a stub types definition. globby provides its own type definitions, so you do not need this installed.                                                        
warning plop > node-plop > @types/[email protected]: This is a stub types definition. handlebars provides its own type definitions, so you do not need this installed.   

So I assume we can basically remove @types/globby and @types/handlebars from package.json.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.