forked from ahmadajmi/markdown-arabic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.js
36 lines (30 loc) · 969 Bytes
/
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
'use strict';
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var browserify = require('browserify');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var concat = require('gulp-concat');
var rename = require('gulp-rename');
var minifyCSS = require('gulp-minify-css');
var stripCssComments = require('gulp-strip-css-comments');
// CSS task
gulp.task('css', function() {
return gulp.src(['./node_modules/bootstrap/dist/css/bootstrap.min.css', 'public/css/main.css'])
.pipe(minifyCSS())
.pipe(stripCssComments())
.pipe(concat('style.css'))
.pipe(rename('style.min.css'))
.pipe(gulp.dest('public/css'));
});
// JavaScript task
gulp.task('js', function() {
return browserify('./public/js/main.js')
.bundle()
.pipe(source('appp.js'))
.pipe(buffer())
.pipe(uglify())
.pipe(rename('app.min.js'))
.pipe(gulp.dest('./public/js/'));
});
gulp.task('default', ['css', 'js']);