Better gulp runner
This commit is contained in:
@@ -66,3 +66,4 @@ OurUmbraco.Site/App_Data/Documentation/
|
||||
OurUmbraco.Site/App_Data/NotificationTest/
|
||||
build/tools/node*
|
||||
wwwcache/
|
||||
build/toolsnode.js.*/
|
||||
|
||||
@@ -4,24 +4,24 @@
|
||||
"description": "Umbraco Our gulpjs config",
|
||||
"main": "gulpfile.js",
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-autoprefixer": "^3.1.0",
|
||||
"gulp-clean": "0.3.x",
|
||||
"gulp-combine-media-queries": "0.2.x",
|
||||
"gulp-concat": "2.2.x",
|
||||
"gulp-imagemin": "0.6.x",
|
||||
"gulp-jshint": "^2.0.4",
|
||||
"gulp-minify-css": "1.1.x",
|
||||
"gulp-rename": "1.2.x",
|
||||
"gulp-sass": "^2.2.0",
|
||||
"gulp-svgmin": "0.4.x",
|
||||
"gulp-uglify": "^1.5.3",
|
||||
"gulp-util": "3.0.x",
|
||||
"gulp-watch": "0.6.x",
|
||||
"gulp-minify-css": "1.1.x",
|
||||
"gulp-sass": "^2.2.0",
|
||||
"gulp-combine-media-queries": "0.2.x",
|
||||
"gulp-imagemin": "0.6.x",
|
||||
"gulp-autoprefixer": "^3.1.0",
|
||||
"gulp-uglify": "^1.5.3",
|
||||
"gulp-jshint": "2.0.0",
|
||||
"gulp-concat": "2.2.x",
|
||||
"jshint-stylish": "0.2.x",
|
||||
"gulp-clean": "0.3.x",
|
||||
"gulp-svgmin": "0.4.x",
|
||||
"gulp-rename": "1.2.x"
|
||||
"jshint": "^2.9.4",
|
||||
"jshint-stylish": "0.2.x"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "gulp build --verbose"
|
||||
|
||||
@@ -10,7 +10,7 @@ NOTES:
|
||||
* Compression/Combination/Minification is not enabled unless debug="false" is specified on the 'compiliation' element in the web.config
|
||||
* A new version will invalidate both client and server cache and create new persisted files
|
||||
-->
|
||||
<clientDependency version="463511010" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
|
||||
<clientDependency version="49321111" fileDependencyExtensions=".js,.css" loggerType="Umbraco.Web.UI.CdfLogger, umbraco">
|
||||
|
||||
<!--
|
||||
This section is used for Web Forms only, the enableCompositeFiles="true" is optional and by default is set to true.
|
||||
|
||||
+25
-12
@@ -1,11 +1,16 @@
|
||||
@ECHO OFF
|
||||
SETLOCAL
|
||||
:: SETLOCAL is on, so changes to the path not persist to the actual user's path
|
||||
|
||||
SET release=%1
|
||||
SET toolsFolder=%CD%\tools\
|
||||
ECHO Installing Npm NuGet Package
|
||||
|
||||
SET nuGetFolder=%CD%\..\packages\
|
||||
ECHO Configured packages folder: %nuGetFolder%
|
||||
ECHO Current folder: %CD%
|
||||
|
||||
%CD%\tools\nuget.exe install Npm.js -OutputDirectory %nuGetFolder% -Verbosity quiet
|
||||
|
||||
SET toolsFolder=%CD%\tools
|
||||
SET nodeFileName=node-v4.5.0-win-x86.7z
|
||||
SET nodeExtractFolder=%toolsFolder%node.js.450
|
||||
IF NOT EXIST %nodeExtractFolder% (
|
||||
@@ -16,10 +21,21 @@ IF NOT EXIST %nodeExtractFolder% (
|
||||
)
|
||||
FOR /f "delims=" %%A in ('dir %nodeExtractFolder%\node* /b') DO SET "nodePath=%nodeExtractFolder%\%%A"
|
||||
|
||||
FOR /f "delims=" %%A in ('dir %nuGetFolder%node.js.* /b') do set "nodePath=%nuGetFolder%%%A\"
|
||||
FOR /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') do set "npmPath=%nuGetFolder%%%A\tools\"
|
||||
|
||||
ECHO Adding Npm and Node to path
|
||||
REM SETLOCAL is on, so changes to the path not persist to the actual user's path
|
||||
PATH=%npmPath%;%nodePath%;%PATH%
|
||||
|
||||
SET buildFolder=%CD%
|
||||
|
||||
ECHO Change directory to %CD%\..\OurUmbraco.Client\
|
||||
CD %CD%\..\OurUmbraco.Client\
|
||||
|
||||
SET nuGetFolder=%CD%\..\packages\
|
||||
FOR /f "delims=" %%A in ('dir %nuGetFolder%npm.js.* /b') DO SET "npmPath=%nuGetFolder%%%A\tools\"
|
||||
IF [%npmPath%] == [] GOTO :installnpm
|
||||
IF NOT [%npmPath%] == [] GOTO :build
|
||||
|
||||
:installnpm
|
||||
ECHO Downloading npm
|
||||
@@ -31,19 +47,16 @@ IF NOT [%npmPath%] == [] GOTO :build
|
||||
GOTO :build
|
||||
|
||||
:build
|
||||
ECHO Gulp build the client side files
|
||||
|
||||
PATH=%npmPath%;%nodePath%
|
||||
SET buildFolder=%CD%
|
||||
|
||||
ECHO Change directory to %CD%\..\OurUmbraco.Client\
|
||||
CD %CD%\..\OurUmbraco.Client\
|
||||
|
||||
ECHO Do npm install and the gulp build
|
||||
SET npm="%nodePath%\node.exe" "%npmPath%node_modules\npm\bin\npm-cli.js" %*
|
||||
%npm% cache clean
|
||||
|
||||
%npm% install
|
||||
%npm% install --save-dev jshint gulp-jshint
|
||||
%npm% install -g install gulp -g
|
||||
gulp
|
||||
gulp build
|
||||
|
||||
|
||||
ECHO Move back to the build folder
|
||||
CD %buildFolder%
|
||||
GOTO :EOF
|
||||
Binary file not shown.
Reference in New Issue
Block a user