Codebase for scaffolding new projects with typescript and common tools for testing, compilation, etc.
Change directory to the base folder of this project, and ensure you are using the version of node that you want the generated code to use (assuming you are using nvm):
nvm current
To change your version of node, use:
nvm install xx.xx.xx
# ie
nvm install 12.19.0
Then link this code base to your local npm repo:
npm link
Change directory to a new directory:
cd ~/some-dir
Now ensure you are using the same version of node in this output directory:
nvm use xx.xx.xx
# ie
nvm use 12.19.0
npx yo typescript:app
This will ask you a few questions used to configure your new app and then install all the required node modules. Your based structure is now ready to be used, or extended (See plugins).
Available node runtimes are:
- 14.x
- 12.x
- 10.x
- 8.10
npx yo typescript:serverless
This will populate your folder with the files required for Serverless development using AWS' Lambda: see Serverless's AWS integration.
This will ask you a few questions used to configure your new app and then install all the required node modules. Your base structure is now ready to be used, or extended (See plugins).
All available plugins:
npx yo typescript:git
This still needs more work, but will add a .gitignore file to your app to ensure the default files are not pushed to your git repo.
It will add pre-commit
to your devDependencies, and update the package.json with the pre-commit config. When asked if you want to overwrite the package.json file, select y
.
npx yo typescript:readme
This will add a README.md file to your app after asking you a few questions; the answers of which will be used to generate the README.md file.