This repository was archived by the owner on Feb 2, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgulpfile.js
More file actions
38 lines (35 loc) · 1.7 KB
/
gulpfile.js
File metadata and controls
38 lines (35 loc) · 1.7 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
var gulp = require('gulp'),
less = require('gulp-less'),
del = require('del'),
postcss = require('gulp-postcss'),
cssnano = require('gulp-cssnano'),
concat = require('gulp-concat'),
mergecss = require('postcss-merge-selectors'),
path = require('path');
gulp.task('default', ['clean', 'build', 'site']);
gulp.task('build', function () {
return gulp.src('src/less/bootstrap-csstree.less')
.pipe(less({paths: [path.join(__dirname, 'less', 'includes')]}))
.pipe(postcss([mergecss()]))
.pipe(cssnano())
.pipe(gulp.dest('dist')).pipe(gulp.dest('public_html'));
});
gulp.task('site', function () {
gulp.src([ "src/demo/index.js", "src/demo/index.html", "src/demo/folders.json", "src/demo/tree-template.html"]).pipe(gulp.dest('public_html'));
gulp.src([ "node_modules/bootstrap/dist/css/bootstrap.css",
"node_modules/bootstrap/dist/css/bootstrap-theme.css"
]).pipe(cssnano()).pipe(concat("vendors.css")).pipe(gulp.dest('public_html/css'));
gulp.src([ "node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.eot",
"node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.svg",
"node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf",
"node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff",
"node_modules/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2"
]).pipe(gulp.dest('public_html/fonts'));
return gulp.src([ "node_modules/jquery/dist/jquery.min.js",
"node_modules/angular/angular.min.js",
"node_modules/bootstrap/dist/js/bootstrap.min.js"
]).pipe(concat("vendors.js")).pipe(gulp.dest('public_html/js'));
});
gulp.task('clean', function () {
return del.sync(['dist/**/*', 'public_html/**/*']);
});