@@ -5,83 +5,83 @@ var gulp = require('gulp');
55var $ = require ( 'gulp-load-plugins' ) ( ) ;
66
77gulp . task ( 'styles' , function ( ) {
8- return gulp . src ( 'app/styles/main.scss' )
9- . pipe ( $ . rubySass ( { style : 'expanded' } ) )
10- . pipe ( $ . autoprefixer ( 'last 1 version' ) )
11- . pipe ( gulp . dest ( '.tmp/styles' ) )
12- . pipe ( $ . size ( ) ) ;
8+ return gulp . src ( 'app/styles/main.scss' )
9+ . pipe ( $ . rubySass ( { style : 'expanded' } ) )
10+ . pipe ( $ . autoprefixer ( 'last 1 version' ) )
11+ . pipe ( gulp . dest ( '.tmp/styles' ) )
12+ . pipe ( $ . size ( ) ) ;
1313} ) ;
1414
1515gulp . task ( 'scripts' , function ( ) {
16- return gulp . src ( 'app/scripts/**/*.js' )
17- . pipe ( $ . jshint ( ) )
18- . pipe ( $ . jshint . reporter ( $ . jshintStylish ) )
19- . pipe ( $ . size ( ) ) ;
16+ return gulp . src ( 'app/scripts/**/*.js' )
17+ . pipe ( $ . jshint ( ) )
18+ . pipe ( $ . jshint . reporter ( $ . jshintStylish ) )
19+ . pipe ( $ . size ( ) ) ;
2020} ) ;
2121
2222gulp . task ( 'partials' , function ( ) {
2323 return gulp . src ( 'app/partials/**/*.html' )
24- . pipe ( $ . minifyHtml ( {
25- empty : true ,
26- spare : true ,
27- quotes : true
28- } ) )
29- . pipe ( $ . ngHtml2js ( {
30- moduleName : "<%= appname %>" ,
31- prefix : "partials/"
32- } ) )
33- . pipe ( gulp . dest ( ".tmp/partials" ) )
34- . pipe ( $ . size ( ) ) ;
24+ . pipe ( $ . minifyHtml ( {
25+ empty : true ,
26+ spare : true ,
27+ quotes : true
28+ } ) )
29+ . pipe ( $ . ngHtml2js ( {
30+ moduleName : "<%= appname %>" ,
31+ prefix : "partials/"
32+ } ) )
33+ . pipe ( gulp . dest ( ".tmp/partials" ) )
34+ . pipe ( $ . size ( ) ) ;
3535} ) ;
3636
3737gulp . task ( 'html' , [ 'styles' , 'scripts' , 'partials' ] , function ( ) {
38- var jsFilter = $ . filter ( '**/*.js' ) ;
39- var cssFilter = $ . filter ( '**/*.css' ) ;
38+ var jsFilter = $ . filter ( '**/*.js' ) ;
39+ var cssFilter = $ . filter ( '**/*.css' ) ;
4040
41- return gulp . src ( 'app/*.html' )
42- . pipe ( $ . inject ( gulp . src ( '.tmp/partials/**/*.js' ) , {
43- read : false ,
44- starttag : '<!-- inject:partials -->' ,
45- addRootSlash : false ,
46- ignorePath : '.tmp'
47- } ) )
48- . pipe ( $ . useref . assets ( ) )
49- . pipe ( $ . rev ( ) )
50- . pipe ( jsFilter )
51- . pipe ( $ . ngmin ( ) )
52- . pipe ( $ . uglify ( ) )
53- . pipe ( jsFilter . restore ( ) )
54- . pipe ( cssFilter )
55- . pipe ( $ . csso ( ) )
56- . pipe ( cssFilter . restore ( ) )
57- . pipe ( $ . useref . restore ( ) )
58- . pipe ( $ . useref ( ) )
59- . pipe ( $ . revReplace ( ) )
60- . pipe ( gulp . dest ( 'dist' ) )
61- . pipe ( $ . size ( ) ) ;
41+ return gulp . src ( 'app/*.html' )
42+ . pipe ( $ . inject ( gulp . src ( '.tmp/partials/**/*.js' ) , {
43+ read : false ,
44+ starttag : '<!-- inject:partials -->' ,
45+ addRootSlash : false ,
46+ ignorePath : '.tmp'
47+ } ) )
48+ . pipe ( $ . useref . assets ( ) )
49+ . pipe ( $ . rev ( ) )
50+ . pipe ( jsFilter )
51+ . pipe ( $ . ngmin ( ) )
52+ . pipe ( $ . uglify ( ) )
53+ . pipe ( jsFilter . restore ( ) )
54+ . pipe ( cssFilter )
55+ . pipe ( $ . csso ( ) )
56+ . pipe ( cssFilter . restore ( ) )
57+ . pipe ( $ . useref . restore ( ) )
58+ . pipe ( $ . useref ( ) )
59+ . pipe ( $ . revReplace ( ) )
60+ . pipe ( gulp . dest ( 'dist' ) )
61+ . pipe ( $ . size ( ) ) ;
6262} ) ;
6363
6464gulp . task ( 'images' , function ( ) {
65- return gulp . src ( 'app/images/**/*' )
66- . pipe ( $ . cache ( $ . imagemin ( {
67- optimizationLevel : 3 ,
68- progressive : true ,
69- interlaced : true
70- } ) ) )
71- . pipe ( gulp . dest ( 'dist/images' ) )
72- . pipe ( $ . size ( ) ) ;
65+ return gulp . src ( 'app/images/**/*' )
66+ . pipe ( $ . cache ( $ . imagemin ( {
67+ optimizationLevel : 3 ,
68+ progressive : true ,
69+ interlaced : true
70+ } ) ) )
71+ . pipe ( gulp . dest ( 'dist/images' ) )
72+ . pipe ( $ . size ( ) ) ;
7373} ) ;
7474
7575gulp . task ( 'fonts' , function ( ) {
76- return $ . bowerFiles ( )
77- . pipe ( $ . filter ( '**/*.{eot,svg,ttf,woff}' ) )
78- . pipe ( $ . flatten ( ) )
79- . pipe ( gulp . dest ( 'dist/fonts' ) )
80- . pipe ( $ . size ( ) ) ;
76+ return $ . bowerFiles ( )
77+ . pipe ( $ . filter ( '**/*.{eot,svg,ttf,woff}' ) )
78+ . pipe ( $ . flatten ( ) )
79+ . pipe ( gulp . dest ( 'dist/fonts' ) )
80+ . pipe ( $ . size ( ) ) ;
8181} ) ;
8282
8383gulp . task ( 'clean' , function ( ) {
84- return gulp . src ( [ '.tmp' , 'dist' ] , { read : false } ) . pipe ( $ . clean ( ) ) ;
84+ return gulp . src ( [ '.tmp' , 'dist' ] , { read : false } ) . pipe ( $ . clean ( ) ) ;
8585} ) ;
8686
8787gulp . task ( 'build' , [ 'html' , 'partials' , 'images' , 'fonts' ] ) ;
0 commit comments