forked from ligershark/WebOptimizer.TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.cmd
58 lines (51 loc) · 1.97 KB
/
build.cmd
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
pushd "%~dp0node\"
echo Installing packages...
call npm install [email protected] --no-save
echo Deleting unneeded files and folders...
del /s /q *.html > nul
del /s /q *.markdown > nul
del /s /q *.md > nul
del /s /q *.npmignore > nul
del /s /q *.patch > nul
del /s /q *.txt > nul
del /s /q *.yml > nul
del /s /q .editorconfig > nul
del /s /q .eslintrc > nul
del /s /q .gitattributes > nul
del /s /q .jscsrc > nul
del /s /q .jshintrc > nul
del /s /q CHANGELOG > nul
del /s /q CNAME > nul
del /s /q example.js > nul
del /s /q generate-* > nul
del /s /q gruntfile.js > nul
del /s /q gulpfile.* > nul
del /s /q makefile.* > nul
del /s /q README > nul
:: specific to typescript
del /s /q *services* > nul
del /s /q *typings* > nul
del /s /q *server* > nul
del /s /q *tsc* > nul
del /s /q *watchGuard* > nul
del /s /q package-lock.json > nul
for /d /r . %%d in (benchmark) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (bench) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (doc) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (docs) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (example) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (examples) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (images) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (man) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (media) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (scripts) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (test) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (tests) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (testing) do @if exist "%%d" rd /s /q "%%d" > nul
for /d /r . %%d in (tst) do @if exist "%%d" rd /s /q "%%d" > nul
echo Compressing artifacts and cleans up...
"%~dp07z.exe" a -r "%~dp0..\src\node_files.zip" ./node * > nul
rmdir /S /Q "%~dp0node\node_modules" > nul
:done
echo Done
popd