Update node-sass build script for Windows
This commit is contained in:
parent
7f1ac9bea0
commit
4af09224d7
|
@ -0,0 +1,13 @@
|
|||
set "PLATFORM=win32"
|
||||
|
||||
set "NODE_API_VERSION=53"
|
||||
set "ELECTRON_VERSION=1.6.15"
|
||||
|
||||
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
|
||||
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%
|
||||
|
||||
set "NODE_API_VERSION=64"
|
||||
set "ELECTRON_VERSION=4.0.0-beta.7"
|
||||
|
||||
call ./scripts/build-node-sass.bat %PLATFORM% ia32 %NODE_API_VERSION% %ELECTRON_VERSION%
|
||||
call ./scripts/build-node-sass.bat %PLATFORM% x64 %NODE_API_VERSION% %ELECTRON_VERSION%
|
|
@ -1,9 +1,9 @@
|
|||
@echo off
|
||||
|
||||
set "ELECTRON=1.6.15"
|
||||
set "PLATFORM=win32"
|
||||
set "ARCH=ia32"
|
||||
set "VER=53"
|
||||
set "ELECTRON=%4"
|
||||
set "PLATFORM=%1"
|
||||
set "ARCH=%2"
|
||||
set "VER=%3"
|
||||
set "VENDOR_PATH=.\node_modules\node-sass\vendor"
|
||||
set "BUILD_PATH=.\node_modules\node-sass\build\Release\binding.node"
|
||||
|
||||
|
@ -26,25 +26,3 @@ if not exist %BUILD_PATH% (
|
|||
echo Copying %BUILD_PATH% to %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%
|
||||
copy %BUILD_PATH% %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%
|
||||
)
|
||||
|
||||
set "ARCH=x64"
|
||||
|
||||
echo Building %PLATFORM%-%ARCH% bindings
|
||||
call ./node_modules/.bin/electron-rebuild -v=%ELECTRON% -a=%ARCH% -m ./node_modules/node-sass
|
||||
|
||||
if exist %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%\binding.node (
|
||||
echo Deleting old %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%\binding.node
|
||||
del /S /Q %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%\*
|
||||
)
|
||||
|
||||
if not exist %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER% (
|
||||
echo Dir %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER% does not exist, creating.
|
||||
mkdir %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%
|
||||
)
|
||||
|
||||
if not exist %BUILD_PATH% (
|
||||
echo %BUILD_PATH% Does not exist
|
||||
) else (
|
||||
echo Copying %BUILD_PATH% to %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%
|
||||
copy %BUILD_PATH% %VENDOR_PATH%\%PLATFORM%-%ARCH%-%VER%
|
||||
)
|
|
@ -9,7 +9,7 @@ switch (process.platform) {
|
|||
});
|
||||
break;
|
||||
case 'win32':
|
||||
child_process.execSync(`scripts/rebuild-node-sass.bat`, {
|
||||
child_process.execSync(`scripts/build-node-sass-win32.bat`, {
|
||||
stdio: 'inherit'
|
||||
});
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue