@drupsys/env
v1.0.0
Published
> A starter project for node packages
Readme
Node Package Starter
A starter project for node packages
1. Git setup
- Clone into a desired directory
git clone [email protected]:drupsys/node_package_starter.git <package-name> - Run
sudo rm -r .git && git initto remove old git repository and create a new one - Open https://github.com create new repository with your package name
- Add remote to your git setup with
git remote add origin [email protected]:<username>/<repository>.gitas instructed on the blank repository's page
2. NPM setup
- Run
npm initand fill in project details - Run
git add .,git commit -m "Initial Commit"andgit push -u origin master - Run
npm installto install dependencies
3. Circle Ci setup
- Open https://circleci.com/add-projects/gh/ find the git your package's git repository and press setup project
- Choose
LinuxOS, Platform2.0, LanguageNode - In the
Next Stepssection go straight to step 5 and pressStart Building - The build should fail on the tests section
4. Folder setup
The following folder structure is needed in the root of the package for the
circle cideployment pipeline to work
src/
├── tests/
│ ├── some_folder/
│ ├── test_a.spec.ts
│ └── ...
├── some_folder/
├── file_a.tsTests should be stored in
unit/funcfolders within thetestsfolder, each test file must end with*.spec.ts
src/
├── tests/
│ ├── unit/
│ ├── func/
...All other typescript files must be placed in the
srcfolder or other folders withing thesrcfolder but not inside thetestsfolder
