-
Notifications
You must be signed in to change notification settings - Fork 531
/
npmw.cmd
50 lines (45 loc) · 1.59 KB
/
npmw.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
::===========================================================
:: SimpRead : SimpRead development/publish environment
:: HOST : https://github.com/kenshin/simpread
:: Author : Kenshin<[email protected]>
:: Version : 0.0.1
::===========================================================
@echo off
::===========================================================
:: Initialize
::===========================================================
if "%1" == "run" (
if "%2" == "develop" (
goto develop
) else if "%2" == "publish" (
goto publish
) else (
@echo npmw noly support command: `npmw run develop` and `npmw run publish`.
goto quit
)
) else (
@echo npmw noly support command: `npmw run develop` and `npmw run publish`.
goto quit
)
::===========================================================
:: develop : Development environment
::===========================================================
:develop
@echo webpack --devtool=source-map --progress --colors --watch
set NODE_ENV=development
webpack --devtool=source-map --progress --colors --watch
goto quit
::===========================================================
:: publish : Production environment
::===========================================================
:publish
@echo webpack -p --progress --colors
set NODE_ENV=production
webpack -p --progress --colors
goto quit
::===========================================================
:: quit : Quit batch script.
::===========================================================
:quit
@echo npmw batch quit.
exit /b 0