-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgulpfile.js
70 lines (55 loc) · 1.31 KB
/
gulpfile.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/**
* Construction and common tasks
* from the front-end implementation
* @author David Avellaneda / Monoku Team
*/
/**
* Node Modules and Gulp Pipes
*/
var gulp = require('gulp'),
autoprefixer = require('gulp-autoprefixer'),
concat = require('gulp-changed'),
concat = require('gulp-concat'),
compass = require('gulp-compass'),
header = require('gulp-header'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
watch = require('gulp-watch'),
require = require('requirejs'),
shell = require('shelljs'),
doT = require('dot')
/**
* Banner
*/
var bannerStr = 'Monomi[{{=it.module}}] by Monoku {{=new Date()}}',
bannerTmpl = doT.template( bannerStr ),
banner = function( module ){
return '/*! ' + bannerTmpl({ module: module }) + ' */\n'
}
/**
* Paths
*/
var BASE = 'content/js/',
BOWER = 'content/components/',
DIST = 'content/dist/'
gulp.task('default', ['dist-js'], function() {
})
/**
* JavaScript Compilation
*/
gulp.task('dist-js', function() {
shell.exec('rm -rf ' + DIST)
// TODO build requirejs
gulp.src([
// <!-- bower:js -->
// <!-- endbower -->
])
.pipe( concat('app.js') )
.pipe( uglify() )
.pipe( header( banner('App') ))
.pipe( gulp.dest( DIST ) )
// say('compiled: admin')
})
// TODO Watch
// TODO Build Compass with autoprefix
// TODO Retina?