Skip to content

Commit

Permalink
feat(generators): add generated file templates
Browse files Browse the repository at this point in the history
  • Loading branch information
misterdev committed May 28, 2019
1 parent d574846 commit 6be9291
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/generators/.gitignore
Expand Up @@ -2,3 +2,4 @@
**/*.js
!*.test.js
!/**/*.test.js
!/templates/*.js
5 changes: 5 additions & 0 deletions packages/generators/templates/index.js
@@ -0,0 +1,5 @@
/**
* Application entry point
*/

console.log("Hello World from <%= name %>");
15 changes: 15 additions & 0 deletions packages/generators/templates/package.json.js
@@ -0,0 +1,15 @@
module.exports = (isProd) => {

let scripts = {
build: "webpack"
};
if (!isProd) {
scripts.start = "webpack-dev-server";
}

return {
version: "1.0.0",
description: "My webpack project",
scripts,
};
};

0 comments on commit 6be9291

Please sign in to comment.