Skip to content

Commit 260222d

Browse files
authored
Merge pull request #2 from enkidevs/improve-tooling
Improve tooling
2 parents d166bd4 + 6835c4b commit 260222d

File tree

6 files changed

+5130
-1392
lines changed

6 files changed

+5130
-1392
lines changed

.circleci/config.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
version: 2
2+
3+
jobs:
4+
install:
5+
working_directory: ~/mongoose-cursor-pagination
6+
docker:
7+
- image: circleci/node:8.10.0
8+
steps:
9+
- checkout
10+
- restore_cache:
11+
keys:
12+
- v1-dependencies-{{ checksum "package.json" }}
13+
# fallback to using the latest cache if no exact match is found
14+
- v1-dependencies-
15+
- attach_workspace:
16+
at: ~/mongoose-cursor-pagination
17+
- run:
18+
name: NPM Install
19+
command: npm install
20+
- save_cache:
21+
paths:
22+
- node_modules
23+
key: v1-dependencies-{{ checksum "package.json" }}
24+
- persist_to_workspace:
25+
root: ~/mongoose-cursor-pagination
26+
paths: ./node_modules
27+
build:
28+
working_directory: ~/mongoose-cursor-pagination
29+
docker:
30+
- image: circleci/node:8.10.0
31+
steps:
32+
- checkout
33+
- attach_workspace:
34+
at: ~/mongoose-cursor-pagination
35+
- run:
36+
name: Build
37+
command: |
38+
if [ "${CIRCLE_BRANCH}" == "master" ]; then
39+
NODE_ENV=production \
40+
npm run prepare
41+
else
42+
NODE_ENV=development \
43+
npm run build
44+
fi
45+
- persist_to_workspace:
46+
root: ~/mongoose-cursor-pagination
47+
paths:
48+
- ./lib
49+
lint:
50+
working_directory: ~/mongoose-cursor-pagination
51+
docker:
52+
- image: circleci/node:8.10.0
53+
steps:
54+
- checkout
55+
- attach_workspace:
56+
at: ~/mongoose-cursor-pagination
57+
- run:
58+
name: Lint
59+
command: npm run lint:ci
60+
test:
61+
working_directory: ~/mongoose-cursor-pagination
62+
docker:
63+
- image: circleci/node:8.10.0
64+
steps:
65+
- checkout
66+
- attach_workspace:
67+
at: ~/mongoose-cursor-pagination
68+
- run:
69+
name: Tests
70+
command: npm run test
71+
72+
workflows:
73+
version: 2
74+
install_build_lint_test:
75+
jobs:
76+
- install
77+
- build:
78+
requires:
79+
- install
80+
- lint:
81+
requires:
82+
- install
83+
- test:
84+
requires:
85+
- install

.eslintrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
extends:
2+
- '@enkidevs/eslint-config-backend'

.prettierrc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
singleQuote: true
2+
trailingComma: es5

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)