Added GulpJS development server task (gulp serve)

This commit is contained in:
Marcel Kapfer (mmk2410) 2016-05-30 22:55:54 +02:00
parent 27f2a6fd5f
commit b100eb0d3f
3 changed files with 13 additions and 1 deletions

View File

@ -36,4 +36,8 @@ and the rebuild the webapp with:
gulp
```
The webapp is accessible in the `dist/` directory
The webapp is accessible in the `dist/` directory. A development server can be started with
```
gulp serve
```

View File

@ -11,6 +11,7 @@ merge = require 'merge-stream'
path = require 'path'
fs = require 'fs'
glob = require 'glob'
connect = require 'gulp-connect'
gulp.task 'coffee', () ->
@ -98,6 +99,12 @@ gulp.task 'precache', (callback) ->
filePath = path.join dir, 'precache.json'
fs.writeFile filePath, JSON.stringify(files), callback
gulp.task 'serve', (callback) ->
connect.server({
port: 8080
root: 'dist'
})
gulp.task 'clean', del.bind null, ['dist']
gulp.task 'default', ['clean'], (cb) ->

View File

@ -29,6 +29,7 @@
"gulp-autoprefixer": "^2.1.0",
"gulp-cache": "^0.2.10",
"gulp-coffee": "^2.3.1",
"gulp-connect": "^4.0.0",
"gulp-if": "^1.2.5",
"gulp-imagemin": "^2.3.0",
"gulp-load-plugins": "^0.10.0",