forked from ongr-io/demo.ongr.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGulpfile.js
More file actions
42 lines (36 loc) · 1.22 KB
/
Gulpfile.js
File metadata and controls
42 lines (36 loc) · 1.22 KB
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
'use strict';
var gulp = require('gulp');
var sass = require('gulp-sass');
var concat = require('gulp-concat');
var uglify = require('gulp-uglify');
var dir = {
assets: './src/ONGR/DemoBundle/Resources/public/',
dist: './src/ONGR/DemoBundle/Resources/public/dist/',
bower: './bower_components/',
bootstrapJS: './bower_components/bootstrap-sass/assets/javascripts/bootstrap/'
};
gulp.task('sass', function() {
gulp.src(dir.assets + 'style/**/*.scss')
.pipe(sass({ outputStyle: 'compressed' }).on('error', sass.logError))
.pipe(gulp.dest(dir.dist));
});
gulp.task('scripts', function() {
gulp.src([
dir.bower + 'jquery/dist/jquery.min.js',
// Bootstrap JS modules
dir.bootstrapJS + 'transition.js',
dir.bootstrapJS + 'carousel.js',
dir.bootstrapJS + 'dropdown.js',
dir.bootstrapJS + 'tab.js',
// Main JS file
dir.assets + 'scripts/main.js'
])
.pipe(concat('ongr.js'))
.pipe(uglify())
.pipe(gulp.dest(dir.dist));
});
gulp.task('fonts', function() {
gulp.src(dir.bower + 'bootstrap-sass/assets/fonts/**')
.pipe(gulp.dest('./web/fonts'));
});
gulp.task('default', ['sass', 'scripts', 'fonts']);