summaryrefslogtreecommitdiffstats
path: root/afb-client/bower_components/tether/gulpfile.coffee
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2016-05-31 18:16:48 +0200
committerStephane Desneux <stephane.desneux@iot.bzh>2016-05-31 18:16:48 +0200
commit5b1e6cc132f44262a873fa8296a2a3e1017b0278 (patch)
tree43b2cd54e2e300b399ff3f2af4458a2c4ed8a144 /afb-client/bower_components/tether/gulpfile.coffee
parentf7d2f9ac4168ee5064580c666d508667a73cefc0 (diff)
parent85ace9c1ce9a98e9b8a22f045c7dd752b38d9129 (diff)
Merge afb-client
Diffstat (limited to 'afb-client/bower_components/tether/gulpfile.coffee')
-rw-r--r--afb-client/bower_components/tether/gulpfile.coffee65
1 files changed, 65 insertions, 0 deletions
diff --git a/afb-client/bower_components/tether/gulpfile.coffee b/afb-client/bower_components/tether/gulpfile.coffee
new file mode 100644
index 0000000..5b09c2b
--- /dev/null
+++ b/afb-client/bower_components/tether/gulpfile.coffee
@@ -0,0 +1,65 @@
+gulp = require('gulp')
+coffee = require('gulp-coffee')
+compass = require('gulp-compass')
+concat = require('gulp-concat')
+uglify = require('gulp-uglify')
+header = require('gulp-header')
+rename = require('gulp-rename')
+wrap = require('gulp-wrap-umd')
+
+pkg = require('./package.json')
+banner = "/*! #{ pkg.name } #{ pkg.version } */\n"
+
+gulp.task 'coffee', ->
+ gulp.src('./coffee/*')
+ .pipe(coffee())
+ .pipe(gulp.dest('./js/'))
+
+ gulp.src('./docs/coffee/*')
+ .pipe(coffee())
+ .pipe(gulp.dest('./docs/js/'))
+
+ gulp.src('./docs/welcome/coffee/*')
+ .pipe(coffee())
+ .pipe(gulp.dest('./docs/welcome/js/'))
+
+gulp.task 'concat', ->
+ gulp.src(['./js/utils.js', './js/tether.js', './js/constraint.js', './js/abutment.js', './js/shift.js'])
+ .pipe(concat('tether.js'))
+ .pipe(wrap(
+ namespace: 'Tether'
+ exports: 'this.Tether'
+ ))
+ .pipe(header(banner))
+ .pipe(gulp.dest('./'))
+
+gulp.task 'uglify', ->
+ gulp.src('./tether.js')
+ .pipe(uglify())
+ .pipe(header(banner))
+ .pipe(rename('tether.min.js'))
+ .pipe(gulp.dest('./'))
+
+gulp.task 'js', ->
+ gulp.run 'coffee', ->
+ gulp.run 'concat', ->
+ gulp.run 'uglify', ->
+
+gulp.task 'compass', ->
+ for path in ['', 'docs/', 'docs/welcome/']
+ gulp.src("./#{ path }sass/*")
+ .pipe(compass(
+ sass: "#{ path }sass"
+ css: "#{ path }css"
+ comments: false
+ ))
+ .pipe(gulp.dest("./#{ path }css"))
+
+gulp.task 'default', ->
+ gulp.run 'js', 'compass'
+
+ gulp.watch './**/*.coffee', ->
+ gulp.run 'js'
+
+ gulp.watch './**/*.sass', ->
+ gulp.run 'compass'