forked from christophercliff/flatmarket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
237 lines (197 loc) · 7.22 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
publish:
./node_modules/.bin/lerna publish \
--force-publish=* \
--skip-npm \
--repo-version 3.0.0-beta.3
cd ./packages/flatmarket-aws/; \
rm -rf ./node_modules/ \
npm install
make aws-lambda
make aws-upload
aws-stack:
aws cloudformation validate-template \
--template-body file://packages//flatmarket-aws//template.json
aws cloudformation delete-stack \
--stack-name flatmarket
aws cloudformation wait stack-delete-complete \
--stack-name flatmarket
aws cloudformation create-stack \
--capabilities CAPABILITY_IAM \
--parameters ParameterKey=SchemaUri,ParameterValue=https://foo.com/schema.json \
ParameterKey=StripeSecretKey,ParameterValue=sk_test_foo \
--stack-name flatmarket \
--template-body file://packages//flatmarket-aws//template.json
aws cloudformation wait stack-create-complete \
--stack-name flatmarket
aws apigateway get-rest-apis
echo 'DONE!'
aws-lambda:
cd ./packages/flatmarket-aws/; \
rm ./lambda.zip; \
zip ./lambda.zip ./lambda.js -r ./node_modules/
aws-upload:
aws s3 cp ./packages/flatmarket-aws/lambda.zip s3://flatmarket/lambda.zip \
--acl public-read
aws s3 cp ./packages/flatmarket-aws/template.json s3://flatmarket/template.json \
--acl public-read
example-dev:
./packages/flatmarket-cli/bin/flatmarket ./packages/flatmarket-example/src/flatmarket.json \
-s ./packages/flatmarket-example/src/ \
-d ./build/ \
-S {YOUR_TEST_SECRET_KEY} \
-D
example-preview:
./packages/flatmarket-cli/bin/flatmarket ./packages/flatmarket-example/src/flatmarket.json \
-s ./packages/flatmarket-example/src/ \
-d ./build/ \
-p
example-prod:
./packages/flatmarket-cli/bin/flatmarket ./packages/flatmarket-example/src/flatmarket.json \
-s ./packages/flatmarket-example/src/ \
-d ./build/
reset:
./node_modules/.bin/lerna clean --yes
./node_modules/.bin/lerna bootstrap --yes
coverage-aws:
./node_modules/.bin/istanbul cover \
--root ./packages/flatmarket-aws \
--dir ./packages/flatmarket-aws/coverage \
-x **/__test__/** \
./node_modules/.bin/_mocha ./packages/flatmarket-aws/__test__/*.spec.js
coverage-cli:
./node_modules/.bin/istanbul cover \
--root ./packages/flatmarket-cli \
--dir ./packages/flatmarket-cli/coverage \
-x **/__test__/** \
./node_modules/.bin/_mocha ./packages/flatmarket-cli/__test__/*.spec.js
coverage-client:
./node_modules/.bin/karma start ./packages/flatmarket-client/karma.config.js --mode coverage
coverage-hapi:
./node_modules/.bin/istanbul cover \
--root ./packages/flatmarket-hapi \
--dir ./packages/flatmarket-hapi/coverage \
-x **/__test__/** \
./node_modules/.bin/_mocha ./packages/flatmarket-hapi/__test__/*.spec.js
coverage-schema:
./node_modules/.bin/istanbul cover \
--root ./packages/flatmarket-schema \
--dir ./packages/flatmarket-schema/coverage \
-x **/__test__/** \
./node_modules/.bin/_mocha ./packages/flatmarket-schema/__test__/*.spec.js
coverage-server:
./node_modules/.bin/istanbul cover \
--root ./packages/flatmarket-server \
--dir ./packages/flatmarket-server/coverage \
-x **/__test__/** \
./node_modules/.bin/_mocha ./packages/flatmarket-server/__test__/*.spec.js
coverage-service:
./node_modules/.bin/istanbul cover \
--root ./packages/flatmarket-service \
--dir ./packages/flatmarket-service/coverage \
-x **/__test__/** \
./node_modules/.bin/_mocha ./packages/flatmarket-service/__test__/*.spec.js
coverage-theme-bananas:
./node_modules/.bin/karma start ./packages/flatmarket-theme-bananas/karma.config.js --mode coverage
coverage-ui:
./node_modules/.bin/karma start ./packages/flatmarket-ui/karma.config.js --mode coverage
dev-client:
./node_modules/.bin/karma start ./packages/flatmarket-client/karma.config.js --mode dev
dev-theme-bananas:
./node_modules/.bin/karma start ./packages/flatmarket-theme-bananas/karma.config.js --mode dev
dev-ui:
./node_modules/.bin/karma start ./packages/flatmarket-ui/karma.config.js --mode dev
style:
make style-aws
make style-cli
make style-client
make style-hapi
make style-schema
make style-server
make style-service
make style-theme-bananas
make style-ui
make style-validation
style-aws:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-aws/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-cli:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-cli/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-client:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-client/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-hapi:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-hapi/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-schema:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-schema/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-server:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-server/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-service:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-service/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-ui:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-ui/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-theme-bananas:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-theme-bananas/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
style-validation:
./node_modules/crispy/node_modules/.bin/eslint ./packages/flatmarket-validation/ \
-c ./node_modules/crispy/.eslintrc \
--ext '.js,.jsx' \
--ignore-pattern '**/+(coverage|fixtures|node_modules)/**'
test:
make test-aws
make test-cli
make test-client
make test-hapi
make test-schema
make test-server
make test-service
make test-theme-bananas
make test-ui
test-aws:
./node_modules/.bin/mocha ./packages/flatmarket-aws/__test__/*.spec.js \
--reporter spec
test-cli:
./node_modules/.bin/mocha ./packages/flatmarket-cli/__test__/*.spec.js \
--reporter spec
test-client:
./node_modules/.bin/karma start ./packages/flatmarket-client/karma.config.js
test-hapi:
./node_modules/.bin/mocha ./packages/flatmarket-hapi/__test__/*.spec.js \
--reporter spec
test-schema:
./node_modules/.bin/mocha ./packages/flatmarket-schema/__test__/*.spec.js \
--reporter spec
test-server:
./node_modules/.bin/mocha ./packages/flatmarket-server/__test__/*.spec.js \
--reporter spec
test-service:
./node_modules/.bin/mocha ./packages/flatmarket-service/__test__/*.spec.js \
--reporter spec
test-theme-bananas:
./node_modules/.bin/karma start ./packages/flatmarket-theme-bananas/karma.config.js
test-ui:
./node_modules/.bin/karma start ./packages/flatmarket-ui/karma.config.js