-
Notifications
You must be signed in to change notification settings - Fork 12
/
package-scripts.cson
202 lines (168 loc) · 4.16 KB
/
package-scripts.cson
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
'postinstall': '
rimraf node_modules/@types/glob
'
'cson2json': '
sed -E "s/#ECMASCRIPT#/es5/g" package-scripts-build.cson > tmp-build.cson &&
sed -E "s/#ECMASCRIPT#/es6-es2015/g" package-scripts-build.cson >> tmp-build.cson &&
sed -E "s/#ECMASCRIPT#/es7-es2016/g" package-scripts-build.cson >> tmp-build.cson &&
sed -E "s/#ECMASCRIPT#/es8-es2017/g" package-scripts-build.cson >> tmp-build.cson &&
json -I -f package.json -e "this.scripts=$(cat package-scripts.cson tmp-build.cson | node node_modules/.bin/cson2json)" &&
rimraf tmp-build.cson
'
'copydist': '
cpy "./dist/" ../r2-opds-js/node_modules/r2-shared-js/ --cwd="./" &&
cpy "./dist/" ../r2-streamer-js/node_modules/r2-shared-js/ --cwd="./" &&
cpy "./dist/" ../r2-navigator-js/node_modules/r2-shared-js/ --cwd="./" &&
cpy "./dist/" ../r2-testapp-js/node_modules/r2-shared-js/ --cwd="./" &&
cpy "./dist/" ../readium-desktop/node_modules/r2-shared-js/ --cwd="./"
'
'quick-build-dist': '
npm run transpile:typescript:es8-es2017+afterdist &&
npm run copydist
'
'_pregitdist': '
npm run build:all
'
'gitdist': '
cd ../r2-shared-js-dist/ &&
git checkout -B develop &&
(git pull || echo "pull") &&
(git --no-pager status || echo status) &&
((rimraf * && echo rimrafOK) || echo rimrafNOK) &&
cpy --flat ../r2-shared-js/package.json . &&
cpy --flat ../r2-shared-js/package-lock.json . &&
cpy --flat ../r2-shared-js/LICENSE . &&
cpy --flat ../r2-shared-js/README.md . &&
cpy "./docs/" ../r2-shared-js-dist/ --cwd=../r2-shared-js/ &&
cpy "./dist/" ../r2-shared-js-dist/ --cwd=../r2-shared-js/ &&
(git add * || echo add) &&
(git commit -a -m "add new dist" || echo commit) &&
(git push --set-upstream origin develop || echo push) &&
(git --no-pager status || echo status) &&
cd ../r2-shared-js
'
'start': '
cross-env DEBUG=r2:*
node
"./dist/es6-es2015/src/_utils/cli.js"
./misc/epubs/
'
'prepare_': '
npm run build:all &&
npm test
'
'prepublish_': '
npm run prepare_
'
'typescript:imports': '
node tools/typescript_relativize_path_mapping_imports.js
'
'gitrev': '
node tools/gitrev.js &&
cat dist/gitrev.json
'
'afterdist': '
npm run typescript:imports &&
npm run gitrev
'
'prebuild': '
npm run lint
'
'build': '
npm run transpile:typescript
'
'postbuild': '
npm run afterdist
'
'prebuild:all': '
npm run lint
'
'build:all': '
npm run transpile:typescript:all
'
'postbuild:all': '
npm run afterdist
'
'clean': '
rimraf ./dist &&
mkdirp ./dist
'
'lint': '
npm run lint:all &&
npm run lint:typescript:full
'
'lint:all': '
eclint
check
"**/*"
"!**/*.node"
"!.git/**/*"
"!node_modules*/**/*"
"!dist/**/*"
"!ava-ts/**/*"
"!misc/**/*"
"!now/**/*"
"!.vscode/**/*"
"!.history/**/*"
"!**/.DS_Store"
"!**/*.epub"
"!**/*.cbz"
"!**/*.jpg"
"!**/*.jpeg"
"!**/*.png"
"!**/*.log"
'
'lint:typescript:full': '
eslint
"./src/**/*.ts"
"./test/**/*.ts"
'
'pretranspile:typescript': '
npm run clean
'
'transpile:typescript': '
tsc --pretty -p "./tsconfig.json"
'
'pretranspile:typescript:all': '
npm run clean
'
'transpile:typescript:all': '
npm run transpile:typescript:es5 &&
npm run transpile:typescript:es6-es2015 &&
npm run transpile:typescript:es7-es2016 &&
npm run transpile:typescript:es8-es2017
'
'transpile:typescript:es8-es2017+afterdist': '
npm run transpile:typescript:es8-es2017 &&
npm run afterdist
'
'transpile:typescript:single': '
node tools/typescript_compile_single.js
'
'posttranspile:typescript:single': '
npm run afterdist
'
'avaResetCache': '
ava --reset-cache
'
'test': '
cross-env DEBUG=r2:*
ava
'
'testTS': '
cross-env
DEBUG=r2:*
TYPESCRIPT=1
ava
'
'cli': '
node "./dist/es8-es2017/src/_utils/cli.js"
'
'cli-debug': '
cross-env DEBUG=r2:*
npm run cli
'
'cli-debug-x': '
cross-env DEBUG=*
npm run cli
'