This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package-scripts.cson
184 lines (155 loc) · 4.15 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
'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-*.cson
'
'electron-renderer:all': '
cpy "./ReadiumCSS/**/*" ../dist/ --cwd=./misc --parents --no-dir
'
'copydist': '
cpy "./dist/**/*" ../r2-testapp-js/node_modules/r2-navigator-js/ --cwd=./ --parents --no-dir &&
cpy "./dist/**/*" ../readium-desktop/node_modules/r2-navigator-js/ --cwd=./ --parents --no-dir
'
'quick-build-dist': '
npm run transpile:typescript:es8-es2017+afterdist &&
npm run copydist
'
'_pregitdist': '
npm run build:all
'
'gitdist': '
cd ../r2-navigator-js-dist/ &&
git checkout -B develop &&
(git pull || echo "pull") &&
(git --no-pager status || echo status) &&
((rimraf "*" && echo rimrafOK) || echo rimrafNOK) &&
cpy ../r2-navigator-js/package.json . &&
cpy ../r2-navigator-js/package-lock.json . &&
cpy ../r2-navigator-js/LICENSE . &&
cpy ../r2-navigator-js/README.md . &&
cpy "./docs/**/*" ../r2-navigator-js-dist/ --cwd=../r2-navigator-js/ --parents --no-dir &&
cpy "./dist/**/*" ../r2-navigator-js-dist/ --cwd=../r2-navigator-js/ --parents --no-dir &&
(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-navigator-js
'
'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 &&
npm run electron-renderer:es8-es2017
'
'prebuild:all': '
npm run lint
'
'build:all': '
npm run transpile:typescript:all
'
'postbuild:all': '
npm run afterdist &&
npm run electron-renderer:all
'
'clean': '
rimraf ./dist &&
mkdirp ./dist
'
'lint': '
npm run lint:all &&
npm run lint:typescript:full
'
'lint:all': '
eclint
check
"**/*"
"!**/*.node"
"!.git/**/*"
"!node_modules*/**/*"
"!dist/**/*"
"!misc/**/*"
"!.vscode/**/*"
"!.history/**/*"
"!**/.DS_Store"
"!**/*.epub"
"!**/*.cbz"
"!**/*.jpg"
"!**/*.jpeg"
"!**/*.png"
"!**/*.log"
'
'lint:typescript': '
tslint
-c
"./tslint.json"
"./src/**/*.ts"
"./test/**/*.ts"
'
'lint:typescript:full': '
tslint
--project
"./tsconfig.json"
-c
"./tslint.json"
"./src/**/*.ts"
"./test/**/*.ts"
'
'lintfix': '
sed
-i
""
"s/let normalizedPath = path\\.normalize(documentPath);/let normalizedPath = path.normalize(documentPath).toLowerCase();/g"
./node_modules/tslint-language-service/out/src/index.js
'
'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 &&
npm run electron-renderer:es8-es2017
'
'transpile:typescript:single': '
node tools/typescript_compile_single.js
'
'posttranspile:typescript:single': '
npm run afterdist &&
npm run electron-renderer:es8-es2017
'