-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Balte de Wit
committed
Apr 12, 2018
1 parent
6f6b9f2
commit 9a8fa57
Showing
26 changed files
with
5,366 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,165 @@ | ||
defaults: &defaults | ||
docker: | ||
- image: circleci/node:8.0 | ||
working_directory: ~/node-boilerplate | ||
|
||
version: 2 | ||
jobs: | ||
checkout_code: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- restore_cache: | ||
keys: | ||
- yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
- yarn-cache-{{ .Branch }} | ||
- yarn-cache- | ||
- run: yarn install | ||
- save_cache: | ||
key: yarn-cache-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
paths: [node_modules] | ||
- persist_to_workspace: | ||
root: . | ||
paths: [.] | ||
check_vulnerabilities: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- run: yarn install | ||
- run: yarn validate:dependencies | ||
test_node-8: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- run: yarn install | ||
- run: yarn ci | ||
test_node-6: | ||
docker: | ||
- image: circleci/node:6 | ||
working_directory: ~/node-boilerplate | ||
steps: | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- run: yarn install | ||
- run: yarn ci | ||
|
||
send-coverage: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- run: yarn install | ||
- run: yarn send-coverage | ||
- store_artifacts: | ||
path: ./coverage/clover.xml | ||
prefix: tests | ||
- store_artifacts: | ||
path: coverage | ||
prefix: coverage | ||
- store_test_results: | ||
path: ./coverage/clover.xml | ||
|
||
build: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- run: yarn install | ||
- run: yarn build | ||
- persist_to_workspace: | ||
root: . | ||
paths: [.] | ||
|
||
release: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "22:0a:33:b1:fe:7f:09:42:46:b0:aa:17:2b:cc:80:e2" | ||
- run: yarn install | ||
- run: git config --global user.email "stephanruler@gmail.com" | ||
- run: git config --global user.name "stephan_ne" | ||
- run: mkdir -p ~/.ssh | ||
- run: | ||
name: Add bitbucket to known hosts | ||
command: ssh-keyscan -H bitbucket.org >> ~/.ssh/known_hosts | ||
- run: yarn release | ||
- run: git push --follow-tags origin HEAD | ||
- persist_to_workspace: | ||
root: . | ||
paths: [.] | ||
|
||
deployToNPM: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/node-boilerplate | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "22:0a:33:b1:fe:7f:09:42:46:b0:aa:17:2b:cc:80:e2" | ||
- run: | ||
name: Write NPM Token to ~/.npmrc | ||
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc | ||
# Use this when repo is properly open sourced. | ||
# - run: | ||
# name: Publish to NPM with yarn | ||
# command: NEW_VERSION=$(node -p "require('./package.json').version") && yarn publish --access=public --new-version=$NEW_VERSION | ||
- deploy: | ||
name: Publish to NPM with npm | ||
command: npm publish --access=public | ||
- persist_to_workspace: | ||
root: . | ||
paths: [.] | ||
|
||
workflows: | ||
version: 2 | ||
test_build_deploy: | ||
jobs: | ||
- checkout_code | ||
- check_vulnerabilities: | ||
requires: | ||
- checkout_code | ||
- test_node-8: | ||
requires: | ||
- checkout_code | ||
- test_node-6: | ||
requires: | ||
- checkout_code | ||
- send-coverage: | ||
requires: | ||
- check_vulnerabilities | ||
- test_node-6 | ||
- test_node-8 | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
- release: | ||
requires: | ||
- send-coverage | ||
filters: | ||
branches: | ||
only: | ||
- master | ||
# Open source release cycle for NPM deploy. Unocmment the below; | ||
# - build: | ||
# requires: | ||
# - send-coverage | ||
# - release | ||
# filters: | ||
# branches: | ||
# only: | ||
# - master | ||
# - deployToNPM: | ||
# requires: | ||
# - build | ||
# filters: | ||
# branches: | ||
# only: | ||
# - master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[*] | ||
indent_style = tab | ||
|
||
[*.{cs,js,ts,json}] | ||
indent_size = 4 | ||
|
||
[*.{yml,yaml}] | ||
indent_style = space | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Example Contributing Guidelines | ||
|
||
This is an example of GitHub's contributing guidelines file. Check out GitHub's [CONTRIBUTING.md help center article](https://help.github.com/articles/setting-guidelines-for-repository-contributors/) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
* **I'm submitting a ...** | ||
[ ] bug report | ||
[ ] feature request | ||
[ ] question about the decisions made in the repository | ||
[ ] question about how to use this project | ||
|
||
* **Summary** | ||
|
||
|
||
|
||
* **Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. StackOverflow, personal fork, etc.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
* **What kind of change does this PR introduce?** (Bug fix, feature, docs update, ...) | ||
|
||
|
||
|
||
* **What is the current behavior?** (You can also link to an open issue here) | ||
|
||
|
||
|
||
* **What is the new behavior (if this is a feature change)?** | ||
|
||
|
||
|
||
* **Other information**: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
node_modules | ||
dist | ||
test | ||
src/**.js | ||
|
||
coverage | ||
.nyc_output | ||
*.log | ||
|
||
wallaby.conf.js | ||
|
||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
src | ||
config | ||
examples | ||
test | ||
tsconfig.json | ||
tslint.json | ||
.travis.yml | ||
.github | ||
build/temp | ||
build/docs | ||
|
||
coverage | ||
.nyc_output | ||
*.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "attach", | ||
"name": "Attach by Process ID", | ||
"processId": "${command:PickProcess}", | ||
"protocol": "inspector" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest watch", | ||
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | ||
"args": ["--watch"], | ||
"cwd": "${workspaceRoot}" | ||
}, | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Jest test", | ||
"program": "${workspaceRoot}/node_modules/jest/bin/jest.js", | ||
"args": [""], | ||
"cwd": "${workspaceRoot}" | ||
} | ||
] | ||
} |
Oops, something went wrong.