generator-hchiam-learning
A Yeoman generator to create another of my learning repos.
Just one of the things I'm learning. https://github.com/hchiam/learning
Key files: index.js
and templates
folder
generator-hchiam-learning
Using npm install -g generator-hchiam-learning
mkdir learning-something
cd learning-something
yo hchiam-learning
You might need to install Yeoman first: npm install -g yo
. After running yo hchiam-learning
, you should get something like this template repo: https://github.com/hchiam/learning-something
There's tons of other generators you can use to get up and running faster
Just use the searchbar: https://yeoman.io/generators
Learn to build your own
- https://yeoman.io/authoring
- https://github.com/yeoman/generator-generator
- https://scotch.io/tutorials/create-a-custom-yeoman-generator-in-4-easy-steps
- https://github.com/christiannwamba/generator-scotchmean/blob/master/generators/app/index.js
Starting from this repo
git clone https://github.com/hchiam/generator-hchiam-learning.git
cd generator-hchiam-learning
npm install
# (customize code and files)
npm link
npm publish
cd ~/Desktop
mkdir learning-something
cd learning-something
yo hchiam-learning
Starting from scratch (not using this repo)
npm install -g yo
npm install -g generator-generator
mkdir generator-my-generator
cd generator-my-generator
yo generator
# (customize code and files)
npm link
npm publish
cd ~/Desktop
mkdir some-repo
cd some-repo
yo my-generator
Troubleshooting
You can update to the current version by running the global install command again: npm install -g generator-hchiam-learning
npm link
has the side-effect of creating a folder like this: /Users/<username>/.nvm/versions/node/v10.13.0/lib/node_modules/generator-hchiam-learning
(you might need to delete that folder if you get an error that references it when you try to run npm install -g generator-hchiam-learning
)