forked from Iza-H/borrow_memo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
67 lines (54 loc) · 1.85 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
/**
* Created by izabela on 17/08/16.
*/
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var minifyCss = require("gulp-minify-css");
var clean = require('gulp-clean');
var paths = {
'bower':'./bower_components',
'assets':"./assets",
'libs': [
'./node_modules/angular/angular.min.js',
'./node_modules/angular/angular.min.js.map',
'./node_modules/angular-route/angular-route.min.js',
'./node_modules/angular-route/angular-route.min.js.map',
'./bower_components/ng-dialog/js/ngDialog.min.js',
'./bower_components/angularfire/dist/angularfire.min.js',
'./bower_components/firebase/firebase.js'
],
'libs_css' :['./bower_components/ng-dialog/css/ngDialog.min.css',
'./bower_components/ng-dialog/css/ngDialog-theme-default.min.css',],
'destination_libs' : './app/libs',
'destination_libs_css' : './app/styles/css',
}
gulp.task('styles', function(){
return gulp.src([
paths.assets + '/_scss/main.scss'
])
.pipe(sass())
.pipe(concat('main.css'))
.pipe(minifyCss()) // Make the file titchy tiny small
.pipe(gulp.dest('./app/styles/css'))
});
// Delete the directory with libraries:
gulp.task('clean_libs', function() {
return gulp.src( paths.destination_libs )
.pipe(clean());
});
gulp.task('copy', ['clean_libs'], function() {
gulp.src(paths.libs)
.pipe(gulp.dest( paths.destination_libs ));
}
)
gulp.task('copy_css', function() {
gulp.src(paths.libs_css)
.pipe(gulp.dest( paths.destination_libs_css ));
}
);
gulp.task('watch', function(){
gulp.watch('./assets/styles/**/*.sccs', ['styles']);
//gulp.watch('./assets/styles/**/*.js', ['scripts'])
});