From 50545c59453120a5e270e8947a77ceeed65eb9de Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Mon, 21 Apr 2014 11:40:26 +0300 Subject: [PATCH 01/17] store bower components in bower_components directory --- .bowerrc | 3 --- .gitignore | 2 +- README.md | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 .bowerrc diff --git a/.bowerrc b/.bowerrc deleted file mode 100644 index 3c5e8c3..0000000 --- a/.bowerrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "directory" : "vendor" -} diff --git a/.gitignore b/.gitignore index ec0836a..43f3bc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ node_modules +bower_components public -vendor diff --git a/README.md b/README.md index 99ef320..1770d27 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Now to use jQuery in your frontend code, you'll need to add jQuery to "browser" ... "browser": { - "jquery": "./vendor/jquery/dist/jquery.js" + "jquery": "./bower_components/jquery/dist/jquery.js" }, "browserify-shim": { "jquery": "$" From b80fec2436b385a9cd579b33ccecce42a80db125 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 22 Apr 2014 12:47:23 +0300 Subject: [PATCH 02/17] move watchify under watch task --- gulpfile.coffee | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 0879297..cf0176f 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -22,22 +22,15 @@ production = process.env.NODE_ENV is 'production' gulp.task 'coffee', -> - bundle = watchify('./src/coffee/main.coffee') + bundle = browserify('./src/coffee/main.coffee') - rebundle = -> + build = bundle.bundle(debug: not production) + .pipe(source('bundle.js')) - build = bundle.bundle(debug: not production) - .pipe(source('bundle.js')) + build.pipe(streamify(uglify())) if production - build.pipe(streamify(uglify())) if production - - build - .pipe(gulp.dest('./public/js/')) - .pipe(livereload(reloadServer)) - - bundle.on 'update', rebundle unless production - - rebundle() + build + .pipe(gulp.dest('./public/js/')) gulp.task 'jade', -> gulp @@ -71,12 +64,23 @@ gulp.task "server", -> .listen 9001 gulp.task "watch", -> - reloadServer.listen 35729, (err) -> - console.error err if err? + reloadServer.listen 35729 - gulp.watch "src/jade/*.jade", ["jade"] - gulp.watch "src/stylus/*.styl", ["stylus"] - gulp.watch "src/assets/**/*.*", ["assets"] + gulp.watch "src/jade/*.jade", ["jade"] + gulp.watch "src/stylus/*.styl", ["stylus"] + gulp.watch "src/assets/**/*.*", ["assets"] + + bundle = watchify('./src/coffee/main.coffee') + + bundle.on 'update', -> + build = bundle.bundle(debug: not production) + .pipe(source('bundle.js')) + + build + .pipe(gulp.dest('./public/js/')) + .pipe(livereload(reloadServer)) + + .emit 'update' gulp.task "build", ["coffee", "jade", "stylus", "assets"] gulp.task "default", ["build", "watch", "server"] From 541bedb8e87f57d3e3a3dadebae7559f07a8ec4e Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 22 Apr 2014 12:49:55 +0300 Subject: [PATCH 03/17] rename tasks --- gulpfile.coffee | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index cf0176f..b1e0f92 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -20,7 +20,7 @@ reloadServer = lr() production = process.env.NODE_ENV is 'production' -gulp.task 'coffee', -> +gulp.task 'scripts', -> bundle = browserify('./src/coffee/main.coffee') @@ -32,14 +32,14 @@ gulp.task 'coffee', -> build .pipe(gulp.dest('./public/js/')) -gulp.task 'jade', -> +gulp.task 'templates', -> gulp .src('src/jade/*.jade') .pipe(jade(pretty: not production)) .pipe(gulp.dest('public/')) .pipe livereload(reloadServer) -gulp.task 'stylus', -> +gulp.task 'styles', -> styles = gulp .src('src/stylus/style.styl') .pipe(stylus({set: ['include css']})) @@ -66,9 +66,9 @@ gulp.task "server", -> gulp.task "watch", -> reloadServer.listen 35729 - gulp.watch "src/jade/*.jade", ["jade"] - gulp.watch "src/stylus/*.styl", ["stylus"] - gulp.watch "src/assets/**/*.*", ["assets"] + gulp.watch 'src/jade/*.jade', ['templates'] + gulp.watch 'src/stylus/*.styl', ['styles'] + gulp.watch 'src/assets/**/*.*', ['assets'] bundle = watchify('./src/coffee/main.coffee') @@ -82,5 +82,5 @@ gulp.task "watch", -> .emit 'update' -gulp.task "build", ["coffee", "jade", "stylus", "assets"] +gulp.task "build", ['scripts', 'templates', 'styles', 'assets'] gulp.task "default", ["build", "watch", "server"] From 0e003a4372f2832b26879c50799abe8024f381ea Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 22 Apr 2014 13:00:06 +0300 Subject: [PATCH 04/17] move paths to config object --- gulpfile.coffee | 48 +++++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index b1e0f92..40d1bbd 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -20,40 +20,58 @@ reloadServer = lr() production = process.env.NODE_ENV is 'production' +paths = + scripts: + source: './src/coffee/main.coffee' + destination: './public/js/' + filename: 'bundle.js' + templates: + source: './src/jade/*.jade' + watch: './src/jade/*.jade' + destination: './public/' + styles: + source: './src/stylus/style.styl' + watch: './src/stylus/*.styl' + destination: './public/css/' + assets: + source: './src/assets/**/*.*' + watch: './src/assets/**/*.*' + destination: './public/' + gulp.task 'scripts', -> - bundle = browserify('./src/coffee/main.coffee') + bundle = browserify paths.scripts.source build = bundle.bundle(debug: not production) - .pipe(source('bundle.js')) + .pipe source paths.scripts.filename build.pipe(streamify(uglify())) if production build - .pipe(gulp.dest('./public/js/')) + .pipe gulp.dest paths.scripts.destination gulp.task 'templates', -> gulp - .src('src/jade/*.jade') + .src paths.templates.source .pipe(jade(pretty: not production)) - .pipe(gulp.dest('public/')) + .pipe gulp.dest paths.templates.destination .pipe livereload(reloadServer) gulp.task 'styles', -> styles = gulp - .src('src/stylus/style.styl') + .src paths.styles.source .pipe(stylus({set: ['include css']})) .pipe(prefix("last 1 version", "> 1%", "ie 8")) styles.pipe(CSSmin()) if production - styles.pipe(gulp.dest('public/css/')) + styles.pipe gulp.dest paths.styles.destination .pipe livereload reloadServer gulp.task 'assets', -> gulp - .src('src/assets/**/*.*') - .pipe gulp.dest 'public/' + .src paths.assets.source + .pipe gulp.dest paths.assets.destination gulp.task "server", -> staticFiles = new nodeStatic.Server './public' @@ -66,18 +84,18 @@ gulp.task "server", -> gulp.task "watch", -> reloadServer.listen 35729 - gulp.watch 'src/jade/*.jade', ['templates'] - gulp.watch 'src/stylus/*.styl', ['styles'] - gulp.watch 'src/assets/**/*.*', ['assets'] + gulp.watch paths.templates.watch, ['templates'] + gulp.watch paths.styles.watch, ['styles'] + gulp.watch paths.assets.watch, ['assets'] - bundle = watchify('./src/coffee/main.coffee') + bundle = watchify paths.scripts.source bundle.on 'update', -> build = bundle.bundle(debug: not production) - .pipe(source('bundle.js')) + .pipe source paths.scripts.filename build - .pipe(gulp.dest('./public/js/')) + .pipe gulp.dest paths.scripts.destination .pipe(livereload(reloadServer)) .emit 'update' From 31d25b1a844407dfec957a095a217af21cdb9bc3 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 22 Apr 2014 13:00:16 +0300 Subject: [PATCH 05/17] fix css minification --- gulpfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 40d1bbd..b1f04d1 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -63,7 +63,7 @@ gulp.task 'styles', -> .pipe(stylus({set: ['include css']})) .pipe(prefix("last 1 version", "> 1%", "ie 8")) - styles.pipe(CSSmin()) if production + styles = styles.pipe(CSSmin()) if production styles.pipe gulp.dest paths.styles.destination .pipe livereload reloadServer From c3e190309f6676931bb0ac9c1b45a8cc16016996 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 22 Apr 2014 13:06:33 +0300 Subject: [PATCH 06/17] create prefixes for 2 latest versions of chrome, firefox & ios --- gulpfile.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index b1f04d1..705cbf3 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -61,7 +61,7 @@ gulp.task 'styles', -> styles = gulp .src paths.styles.source .pipe(stylus({set: ['include css']})) - .pipe(prefix("last 1 version", "> 1%", "ie 8")) + .pipe prefix 'last 2 versions', 'Chrome 34', 'Firefox 28', 'iOS 7' styles = styles.pipe(CSSmin()) if production From 4b6192b37c8db309ad8507385e7456f64ba77b84 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Wed, 23 Apr 2014 17:23:02 +0300 Subject: [PATCH 07/17] add handlers for error events so gulp doesnt't crash every time an error event is emitted watchify will probably need some special treatment but this will do for now --- gulpfile.coffee | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/gulpfile.coffee b/gulpfile.coffee index 705cbf3..4e8856a 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -38,11 +38,17 @@ paths = watch: './src/assets/**/*.*' destination: './public/' +handleError = (err) -> + gutil.log err + gutil.beep() + this.emit 'end' + gulp.task 'scripts', -> bundle = browserify paths.scripts.source build = bundle.bundle(debug: not production) + .on 'error', handleError .pipe source paths.scripts.filename build.pipe(streamify(uglify())) if production @@ -54,6 +60,7 @@ gulp.task 'templates', -> gulp .src paths.templates.source .pipe(jade(pretty: not production)) + .on 'error', handleError .pipe gulp.dest paths.templates.destination .pipe livereload(reloadServer) @@ -61,6 +68,7 @@ gulp.task 'styles', -> styles = gulp .src paths.styles.source .pipe(stylus({set: ['include css']})) + .on 'error', handleError .pipe prefix 'last 2 versions', 'Chrome 34', 'Firefox 28', 'iOS 7' styles = styles.pipe(CSSmin()) if production @@ -92,6 +100,8 @@ gulp.task "watch", -> bundle.on 'update', -> build = bundle.bundle(debug: not production) + .on 'error', handleError + .pipe source paths.scripts.filename build From 09d4fe4d066b28647a21638bda0d594525e8fc7a Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Thu, 24 Apr 2014 13:54:33 +0300 Subject: [PATCH 08/17] Update README.md Section about using JavaScript instead of CoffeeScript --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 1770d27..86708e9 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,22 @@ Now your should be able to require jQuery in your coffee files $ = require 'jquery' +## Using JavaScript instead of CoffeeScript +Remove coffeeify transform from package.json file (browserify.transform field) +`````` +"browserify": { + "transform": ["browserify-shim"] +} +`````` + +and change the ".coffee" extension to ".js" from gulpfile.coffee +`````` +paths = + scripts: + source: './src/coffee/main.js' +````` + +You also can change the directory name to scripts or what ever. ## Development guidelines * **public** - directory should be dedicated only to compiled/copied files from **src** - directory. From bcc61b0bf224a67d2c707298bd4f12965db6634d Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 29 Apr 2014 12:16:04 +0300 Subject: [PATCH 09/17] add .coffee extension to browserify extensions --- gulpfile.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 4e8856a..604bbb8 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -45,7 +45,9 @@ handleError = (err) -> gulp.task 'scripts', -> - bundle = browserify paths.scripts.source + bundle = browserify + entries: [paths.scripts.source] + extensions: ['.coffee'] build = bundle.bundle(debug: not production) .on 'error', handleError @@ -96,7 +98,9 @@ gulp.task "watch", -> gulp.watch paths.styles.watch, ['styles'] gulp.watch paths.assets.watch, ['assets'] - bundle = watchify paths.scripts.source + bundle = watchify + entries: [paths.scripts.source] + extensions: ['.coffee'] bundle.on 'update', -> build = bundle.bundle(debug: not production) From 4890ebe0bf96b00abb6794bc4768aa03375f649d Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Mon, 5 May 2014 14:30:09 +0300 Subject: [PATCH 10/17] replace node-static with ecstatic --- gulpfile.coffee | 13 +++++-------- package.json | 4 ++-- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 604bbb8..23f45d6 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -11,7 +11,7 @@ streamify = require 'gulp-streamify' rename = require 'gulp-rename' uglify = require 'gulp-uglify' coffeeify = require 'coffeeify' -nodeStatic = require 'node-static' +ecstatic = require 'ecstatic' lr = require 'tiny-lr' livereload = require 'gulp-livereload' plumber = require 'gulp-plumber' @@ -83,13 +83,10 @@ gulp.task 'assets', -> .src paths.assets.source .pipe gulp.dest paths.assets.destination -gulp.task "server", -> - staticFiles = new nodeStatic.Server './public' - require('http').createServer (req, res) -> - req.addListener 'end', -> - staticFiles.serve req, res - req.resume() - .listen 9001 +gulp.task 'server', -> + require('http') + .createServer ecstatic root: __dirname + '/public' + .listen 9001 gulp.task "watch", -> reloadServer.listen 35729 diff --git a/package.json b/package.json index 5ddc190..7a52969 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "gulp-util": "~2.2.9", "gulp-stylus": "0.0.9", "gulp-jade": "~0.3.0", - "node-static": "~0.7.3", "gulp-minify-css": "~0.2.0", "tiny-lr": "0.0.5", "gulp-livereload": "~0.2.0", @@ -35,7 +34,8 @@ "vinyl-source-stream": "~0.1.1", "coffeeify": "~0.6.0", "gulp": "~3.6.0", - "watchify": "~0.6.3" + "watchify": "~0.6.3", + "ecstatic": "~0.5.1" }, "browser": {}, "browserify-shim": {}, From d028775eab4f07b157a1c9e03afb75d288b3e325 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Mon, 5 May 2014 14:51:43 +0300 Subject: [PATCH 11/17] update README --- README.md | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 86708e9..34d6302 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Project template for [gulp.js](http://gulpjs.com/) + -## What it does +### What it does * [Jade](jade-lang.com) files to HTML * [Stylus](http://learnboost.github.io/stylus) files to CSS * [CoffeeScript](http://coffeescript.org/) files to Javascript through [browserify](http://browserify.org/) @@ -18,7 +19,7 @@ npm start open http://localhost:9001 in your browser ```` -## Commands +## CLI Commands * npm install * Installs server-side dependencies from NPM and client-side dependencies from Bower * npm start @@ -30,22 +31,24 @@ Minification, uglification and other tasks you're expected to run before deployi NODE_ENV=production npm run build +## Development guidelines +* **public** - directory should be dedicated only to compiled/copied files from **src** - directory. + It should be possible to delete directory completely and after **npm start** or **npm run build** everything should be as they were before the deletation. +* All backend dependencies should be installed with **npm**. Browser dependencies should be installed with **bower** or with **npm**. -## Adding 3rd party libraries +### Adding 3rd party libraries **Note**: If the package you are looking for can be found in NPM it's much easier to install it from there. After installing packages from NPM they can be required without any of the following instructions. bower install jquery --save -Now to use jQuery in your frontend code, you'll need to add jQuery to "browser" and "browserify-shim" sections of your package.json. Your package.json should be something like this: +Now to use jQuery in your frontend code, you'll need to add jQuery to "browser" section of your package.json. Your package.json should be something like this: ... "browser": { "jquery": "./bower_components/jquery/dist/jquery.js" }, - "browserify-shim": { - "jquery": "$" - }, + "browserify-shim": {}, "browserify": { "transform": [ "coffeeify", "browserify-shim" ] } @@ -55,11 +58,13 @@ Now your should be able to require jQuery in your coffee files $ = require 'jquery' -## Using JavaScript instead of CoffeeScript +For non-CommonJS compatible modules you have to use browserify-shim. Read more about it [here](https://github.com/thlorenz/browserify-shim). + +### Using JavaScript instead of CoffeeScript Remove coffeeify transform from package.json file (browserify.transform field) `````` "browserify": { - "transform": ["browserify-shim"] + "transform": ["browserify-shim"] } `````` @@ -72,10 +77,5 @@ paths = You also can change the directory name to scripts or what ever. -## Development guidelines -* **public** - directory should be dedicated only to compiled/copied files from **src** - directory. - It should be possible to delete directory completely and after **npm start** or **npm run build** everything should be as they were before the deletation. -* All backend dependencies should be installed with **npm**. Browser dependencies should be installed with **bower**. - -## Enable LiveReload +### Enable LiveReload Install [LiveReload for Chrome](https://chrome.google.com/webstore/detail/livereload/jnihajbhpnppcggbcgedagnkighmdlei?hl=en) From b9c99e624fb9736970088749f718fb99f149cf2d Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Mon, 5 May 2014 15:46:20 +0300 Subject: [PATCH 12/17] update watchify --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7a52969..cfe55ff 100644 --- a/package.json +++ b/package.json @@ -34,7 +34,7 @@ "vinyl-source-stream": "~0.1.1", "coffeeify": "~0.6.0", "gulp": "~3.6.0", - "watchify": "~0.6.3", + "watchify": "~0.8.3", "ecstatic": "~0.5.1" }, "browser": {}, From ce547017cd5bcf4ba34c0e5640326ad2034b1fa6 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Thu, 22 May 2014 14:32:41 +0300 Subject: [PATCH 13/17] update gulp-minify-css version --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index cfe55ff..89963fe 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "gulp-util": "~2.2.9", "gulp-stylus": "0.0.9", "gulp-jade": "~0.3.0", - "gulp-minify-css": "~0.2.0", "tiny-lr": "0.0.5", "gulp-livereload": "~0.2.0", "bower": "~1.2.8", @@ -35,7 +34,8 @@ "coffeeify": "~0.6.0", "gulp": "~3.6.0", "watchify": "~0.8.3", - "ecstatic": "~0.5.1" + "ecstatic": "~0.5.1", + "gulp-minify-css": "~0.3.4" }, "browser": {}, "browserify-shim": {}, From ba486e68b27b80b45da6a1746a03a26cea3618a4 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Thu, 12 Jun 2014 15:12:56 +0300 Subject: [PATCH 14/17] add .DS_Store files to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 43f3bc2..b51fa0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ node_modules bower_components public +.DS_Store From aaed254a5f9d5c25742f809182b22c1fbc31dcc6 Mon Sep 17 00:00:00 2001 From: Chang Wang Date: Mon, 23 Jun 2014 01:47:18 -0400 Subject: [PATCH 15/17] gulp > 3.7 directly supports .coffee --- gulpfile.js | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 gulpfile.js diff --git a/gulpfile.js b/gulpfile.js deleted file mode 100644 index c7f2b8b..0000000 --- a/gulpfile.js +++ /dev/null @@ -1,2 +0,0 @@ -require('coffee-script/register'); -require('./gulpfile.coffee'); From 97063d54ee7d738ec9cfa050bd509d4a5e964235 Mon Sep 17 00:00:00 2001 From: Chang Wang Date: Mon, 23 Jun 2014 02:09:07 -0400 Subject: [PATCH 16/17] devDependencies version bumps --- package.json | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 89963fe..d9ac95a 100644 --- a/package.json +++ b/package.json @@ -17,25 +17,25 @@ "coffee-script": "~1.7.1" }, "devDependencies": { - "gulp-rename": "~0.2.1", + "gulp-rename": "~1.2.0", "gulp-uglify": "~0.1.0", - "gulp-util": "~2.2.9", - "gulp-stylus": "0.0.9", - "gulp-jade": "~0.3.0", + "gulp-util": "~2.2.17", + "gulp-stylus": "1.0.2", + "gulp-jade": "~0.6.0", "tiny-lr": "0.0.5", - "gulp-livereload": "~0.2.0", - "bower": "~1.2.8", - "browserify-shim": "~3.3.1", - "gulp-plumber": "~0.5.6", - "gulp-autoprefixer": "0.0.6", - "browserify": "~3.33.0", + "gulp-livereload": "~2.1.0", + "bower": "~1.3.5", + "browserify-shim": "~3.6.0", + "gulp-plumber": "~0.6.3", + "gulp-autoprefixer": "0.0.7", + "browserify": "~4.1.11", "gulp-streamify": "0.0.5", "vinyl-source-stream": "~0.1.1", "coffeeify": "~0.6.0", - "gulp": "~3.6.0", - "watchify": "~0.8.3", - "ecstatic": "~0.5.1", - "gulp-minify-css": "~0.3.4" + "gulp": "~3.8.1", + "watchify": "~0.10.2", + "ecstatic": "~0.5.3", + "gulp-minify-css": "~0.3.5" }, "browser": {}, "browserify-shim": {}, From 6b1a8a5f8a78dcad7fdaac29f2a5767c060a8b57 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Mon, 23 Jun 2014 10:11:19 +0300 Subject: [PATCH 17/17] remove tinylr --- gulpfile.coffee | 10 ++++------ package.json | 1 - 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/gulpfile.coffee b/gulpfile.coffee index 23f45d6..7d06e2b 100644 --- a/gulpfile.coffee +++ b/gulpfile.coffee @@ -12,11 +12,9 @@ rename = require 'gulp-rename' uglify = require 'gulp-uglify' coffeeify = require 'coffeeify' ecstatic = require 'ecstatic' -lr = require 'tiny-lr' livereload = require 'gulp-livereload' plumber = require 'gulp-plumber' prefix = require 'gulp-autoprefixer' -reloadServer = lr() production = process.env.NODE_ENV is 'production' @@ -64,7 +62,7 @@ gulp.task 'templates', -> .pipe(jade(pretty: not production)) .on 'error', handleError .pipe gulp.dest paths.templates.destination - .pipe livereload(reloadServer) + .pipe livereload() gulp.task 'styles', -> styles = gulp @@ -76,7 +74,7 @@ gulp.task 'styles', -> styles = styles.pipe(CSSmin()) if production styles.pipe gulp.dest paths.styles.destination - .pipe livereload reloadServer + .pipe livereload() gulp.task 'assets', -> gulp @@ -89,7 +87,7 @@ gulp.task 'server', -> .listen 9001 gulp.task "watch", -> - reloadServer.listen 35729 + livereload.listen() gulp.watch paths.templates.watch, ['templates'] gulp.watch paths.styles.watch, ['styles'] @@ -107,7 +105,7 @@ gulp.task "watch", -> build .pipe gulp.dest paths.scripts.destination - .pipe(livereload(reloadServer)) + .pipe(livereload()) .emit 'update' diff --git a/package.json b/package.json index d9ac95a..639da2b 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,6 @@ "gulp-util": "~2.2.17", "gulp-stylus": "1.0.2", "gulp-jade": "~0.6.0", - "tiny-lr": "0.0.5", "gulp-livereload": "~2.1.0", "bower": "~1.3.5", "browserify-shim": "~3.6.0",