mattvagni / cookiecutter Goto Github PK
View Code? Open in Web Editor NEWCLI for quickly creating boilerplate files based on templates you provide.
CLI for quickly creating boilerplate files based on templates you provide.
π¨ 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.
We have a shared NPM package that we distribute to our teams for creating infrastructure. Im hoping to use this to generate base structures and components, but it would be good to have the cookiecutter templates distributed as part of that project.
I can achieve having the config in the node module by having the shred library list cookie cutter as a dependency and that puts the CLI in node_modules/.bin
. I can call it providing the config with the command be: cookiecutter -c=node_modules/my-shared-library/cookiecutter.config.js
, but then templatePath resolves to the location im caling the CLI from. The error i get is:
β― cookiecutter -c=node_modules/@deepcrawl/base-cdk-app/cookiecutter.config.js
? What is the component's name? test
! ENOENT: no such file or directory, stat '/home/matt/source/playground/generator-test/examples/base-app'
at Object.statSync (node:fs:1596:3)
at Object.statSync (/home/matt/source/playground/generator-test/node_modules/graceful-fs/polyfills.js:319:16)
at isDirectory (/home/matt/source/playground/generator-test/node_modules/cookiecutter/src/lib/renderer.js:27:19)
at renderFiles (/home/matt/source/playground/generator-test/node_modules/cookiecutter/src/lib/renderer.js:21:30)
at /home/matt/source/playground/generator-test/node_modules/cookiecutter/src/index.js:36:16
When I run cookiecutter
without a config file, it prints an error message to indicate the failure. But the exit code is still zero which causes issues in automation. E.g invocation and output:
ashoknn@PF0ZBVNJ:~/temp$ ./node_modules/.bin/cookiecutter
! Cannot find module '/home/ashoknn/temp/cookiecutter.config.js'
at Function.Module._resolveFilename (module.js:543:15)
at Function.Module._load (module.js:470:25)
at Module.require (module.js:593:17)
at require (internal/module.js:11:18)
at getConfig (/home/ashoknn/bbgithub/temp/node_modules/cookiecutter/src/lib/config.js:103:20)
at Promise.resolve.then (/home/ashoknn/temp/node_modules/cookiecutter/src/index.js:15:24)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:118:7)
at Function.Module.runMain (module.js:692:11)
at startup (bootstrap_node.js:194:16)
ashoknn@PF0ZBVNJ:~/temp$ echo $?
0
Hey,
A project I'm working on requires different components nested inside each other.
A feature request would be to allow me to set the outputPath
as an input, so that I can decide where to have the files dumped finally.
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.