Skip to content

Commit 0abb867

Browse files
committed
fix build setup
1 parent f323f1a commit 0abb867

261 files changed

Lines changed: 7219 additions & 38378 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
#Standard ignores:
3-
node_modules/
3+
/node_modules/
44

55
#Misc:
66
.DS_Store

gulpfile.js

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
var gulp = require('gulp');
2+
var sass = require('gulp-sass');
3+
var header = require('gulp-header');
4+
var cleanCSS = require('gulp-clean-css');
5+
var rename = require("gulp-rename");
6+
var uglify = require('gulp-uglify');
7+
var pkg = require('./package.json');
8+
var browserSync = require('browser-sync').create();
9+
10+
// Set the banner content
11+
var banner = ['/*!\n',
12+
' * Start Bootstrap - <%= pkg.title %> v<%= pkg.version %> (<%= pkg.homepage %>)\n',
13+
' * Copyright 2013-' + (new Date()).getFullYear(), ' <%= pkg.author %>\n',
14+
' * Licensed under <%= pkg.license %> (https://github.com/BlackrockDigital/<%= pkg.name %>/blob/master/LICENSE)\n',
15+
' */\n',
16+
''
17+
].join('');
18+
19+
// Copy third party libraries from /node_modules into /public
20+
gulp.task('public', function() {
21+
22+
// Bootstrap
23+
gulp.src([
24+
'./node_modules/bootstrap/dist/**/*',
25+
'!./node_modules/bootstrap/dist/css/bootstrap-grid*',
26+
'!./node_modules/bootstrap/dist/css/bootstrap-reboot*'
27+
])
28+
.pipe(gulp.dest('./public/bootstrap'))
29+
30+
// Font Awesome
31+
gulp.src([
32+
'./node_modules/font-awesome/**/*',
33+
'!./node_modules/font-awesome/{less,less/*}',
34+
'!./node_modules/font-awesome/{scss,scss/*}',
35+
'!./node_modules/font-awesome/.*',
36+
'!./node_modules/font-awesome/*.{txt,json,md}'
37+
])
38+
.pipe(gulp.dest('./public/font-awesome'))
39+
40+
// jQuery
41+
gulp.src([
42+
'./node_modules/jquery/dist/*',
43+
'!./node_modules/jquery/dist/core.js'
44+
])
45+
.pipe(gulp.dest('./public/jquery'))
46+
47+
// jQuery Easing
48+
gulp.src([
49+
'./node_modules/jquery.easing/*.js'
50+
])
51+
.pipe(gulp.dest('./public/jquery-easing'))
52+
53+
// Magnific Popup
54+
gulp.src([
55+
'./node_modules/magnific-popup/dist/*'
56+
])
57+
.pipe(gulp.dest('./public/magnific-popup'))
58+
59+
// Scrollreveal
60+
gulp.src([
61+
'./node_modules/scrollreveal/dist/*.js'
62+
])
63+
.pipe(gulp.dest('./public/scrollreveal'))
64+
65+
});
66+
67+
// Compile SCSS
68+
gulp.task('css:compile', function() {
69+
return gulp.src('./scss/**/*.scss')
70+
.pipe(sass.sync({
71+
outputStyle: 'expanded'
72+
}).on('error', sass.logError))
73+
.pipe(gulp.dest('./css'))
74+
});
75+
76+
// Minify CSS
77+
gulp.task('css:minify', ['css:compile'], function() {
78+
return gulp.src([
79+
'./css/*.css',
80+
'!./css/*.min.css'
81+
])
82+
.pipe(cleanCSS())
83+
.pipe(rename({
84+
suffix: '.min'
85+
}))
86+
.pipe(gulp.dest('./css'))
87+
.pipe(browserSync.stream());
88+
});
89+
90+
// CSS
91+
gulp.task('css', ['css:compile', 'css:minify']);
92+
93+
// Minify JavaScript
94+
gulp.task('js:minify', function() {
95+
return gulp.src([
96+
'./js/*.js',
97+
'!./js/*.min.js'
98+
])
99+
.pipe(uglify())
100+
.pipe(rename({
101+
suffix: '.min'
102+
}))
103+
.pipe(gulp.dest('./js'))
104+
.pipe(browserSync.stream());
105+
});
106+
107+
// JS
108+
gulp.task('js', ['js:minify']);
109+
110+
// Default task
111+
gulp.task('default', ['css', 'js', 'public']);
112+
113+
// Configure the browserSync task
114+
gulp.task('browserSync', function() {
115+
browserSync.init({
116+
server: {
117+
baseDir: "./"
118+
}
119+
});
120+
});
121+
122+
// Dev task
123+
gulp.task('dev', ['css', 'js', 'browserSync'], function() {
124+
gulp.watch('./scss/*.scss', ['css']);
125+
gulp.watch('./js/*.js', ['js']);
126+
gulp.watch('./*.html', browserSync.reload);
127+
});

node_modules/.bin/mime

Lines changed: 0 additions & 1 deletion
This file was deleted.

node_modules/accepts/HISTORY.md

Lines changed: 0 additions & 212 deletions
This file was deleted.

node_modules/accepts/LICENSE

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)