From b10c4ffb8a3dd921ef04aa640ec9daec7e555b35 Mon Sep 17 00:00:00 2001 From: Jozef Butko Date: Sat, 22 Apr 2017 20:32:57 +0200 Subject: [PATCH] gulp build node-sass fix --- README.md | 17 +++++++++++++++++ js/scripts.js | 6 +++--- package.json | 14 ++++++++++---- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 242cb12..408ccad 100644 --- a/README.md +++ b/README.md @@ -35,12 +35,21 @@ npm install ## 2. Watch files ```bash +npm start +``` +or +```bash gulp ``` + - all SCSS/HTML will be watched for changes and injected into browser thanks to BrowserSync ## 3. Build production version ```bash +npm run build +``` +or +```bash gulp build ``` - this will process following tasks: @@ -55,11 +64,19 @@ gulp build ## 4. Start webserver without watch task ```bash +npm run server +``` +or +```bash gulp server ``` ## 5. Start webserver from build folder ```bash +npm run serverbuild +``` +or +```bash gulp server-build ``` diff --git a/js/scripts.js b/js/scripts.js index cc5dcda..d356931 100644 --- a/js/scripts.js +++ b/js/scripts.js @@ -3,11 +3,11 @@ /** * In genereal you should avoid to use jQuery code in AngularJS * apps, if you need any jQuery functionality create a directive - * + * */ $(document).ready(function() { - + }); -})( jQuery ); \ No newline at end of file +})( jQuery ); diff --git a/package.json b/package.json index 23c04c1..e36721d 100644 --- a/package.json +++ b/package.json @@ -16,14 +16,12 @@ "gulp-concat": "^2.4.3", "gulp-filter": "^2.0.0", "gulp-html-replace": "^1.4.4", - "gulp-imagemin": "^2.2.1", "gulp-load-plugins": "^0.10.0", "gulp-minify-css": "^1.2.4", "gulp-minify-html": "^0.1.8", "gulp-notify": "^2.1.0", "gulp-rename": "^1.2.0", "gulp-rev": "^3.0.1", - "gulp-sass": "^2.1.0", "gulp-size": "^1.2.0", "gulp-sourcemaps": "^1.3.0", "gulp-uglify": "^1.1.0", @@ -37,7 +35,11 @@ "watch": "^0.13.0" }, "scripts": { - "postinstall": "bower install --no-interactive --allow-root" + "start": "gulp", + "build": "gulp build", + "server": "gulp server", + "serverbuild": "gulp server-build", + "postinstall": "npm install gulp-sass gulp-imagemin --save&&bower install --no-interactive" }, "repository": { "type": "git", @@ -57,5 +59,9 @@ "bugs": { "url": "https://github.com/jbutko/AngularJS-Boilerplate/issues" }, - "homepage": "https://github.com/jbutko/AngularJS-Boilerplate" + "homepage": "https://github.com/jbutko/AngularJS-Boilerplate", + "dependencies": { + "gulp-imagemin": "^3.2.0", + "gulp-sass": "^3.1.0" + } }