Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
majidbilal committed Jul 13, 2018
0 parents commit 8e0ccb4
Show file tree
Hide file tree
Showing 19 changed files with 15,246 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/node_modules
42 changes: 42 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
const gulp = require('gulp');
const browserSync = require('browser-sync').create();
const sass = require('gulp-sass');

// Compile Sass & Inject into browser
gulp.task('sass', function(){
return gulp.src(['node_modules/bootstrap/scss/bootstrap.scss', 'src/scss/*.scss'])
.pipe(sass())
.pipe(gulp.dest("src/css"))
.pipe(browserSync.stream());
})

// Move Js files to our src/js
gulp.task('js', function(){
return gulp.src(['node_modules/bootstrap/dist/js/bootstrap.min.js', 'node_modules/jquery/dist/jquery.min.js', 'node_modules/popper.js/dist/umd/popper.min.js'])
.pipe(gulp.dest("src/js"))
.pipe(browserSync.stream());
})

//Watch Sass & Server
gulp.task('serve', ['sass'], function(){
browserSync.init({
server: "./src"
});

gulp.watch(['node_modules/bootstrap/scss/bootstrap.scss', 'src/scss/*.scss'], ['sass']);
gulp.watch("src/*.html").on('change', browserSync.reload);
})

// Move Fonts folder to src
gulp.task('fonts', function(){
return gulp.src('node_modules/font-awesome/fonts/*')
.pipe(gulp.dest("src/fonts"));
})

//Move Font Awesome css to src
gulp.task('fa', function(){
return gulp.src('node_modules/font-awesome/css/font-awesome.min.css')
.pipe(gulp.dest("src/css"));
})

gulp.task('default', ['js', 'serve', 'fa', 'fonts']);
Loading

0 comments on commit 8e0ccb4

Please sign in to comment.