├── .gitignore ├── gulpfile.js ├── package-lock.json ├── package.json └── src ├── index.html └── scss └── main.scss /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | src/css 3 | src/fonts 4 | src/js 5 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | const gulp = require('gulp'); 2 | const browserSync = require('browser-sync').create(); 3 | const sass = require('gulp-sass'); 4 | 5 | gulp.task('sass', () => { 6 | return gulp.src([ 7 | 'node_modules/bootstrap/scss/bootstrap.scss', 8 | 'src/scss/*.scss' 9 | ]) 10 | .pipe(sass({outputStyle: 'compressed'})) 11 | .pipe(gulp.dest('src/css')) 12 | .pipe(browserSync.stream()); 13 | }); 14 | 15 | gulp.task('js', () => { 16 | return gulp.src([ 17 | 'node_modules/bootstrap/dist/js/bootstrap.min.js', 18 | 'node_modules/jquery/dist/jquery.min.js', 19 | 'node_modules/popper.js/dist/umd/popper.min.js' 20 | ]) 21 | .pipe(gulp.dest('src/js')) 22 | .pipe(browserSync.stream()); 23 | }); 24 | 25 | gulp.task('serve', ['sass'], () => { 26 | browserSync.init({ 27 | server: './src' 28 | }); 29 | 30 | gulp.watch([ 31 | 'node_modules/bootstrap/scss/bootstrap.min.scss', 32 | 'src/scss/*.scss' 33 | ], ['sass']); 34 | 35 | gulp.watch('src/*.html').on('change', browserSync.reload); 36 | 37 | }); 38 | 39 | gulp.task('font-awesome', () => { 40 | return gulp.src('node_modules/font-awesome/css/font-awesome.min.css') 41 | .pipe(gulp.dest('src/css')); 42 | }) 43 | 44 | gulp.task('fonts', () => { 45 | return gulp.src('node_modules/font-awesome/fonts/*') 46 | .pipe(gulp.dest('src/fonts')); 47 | }); 48 | 49 | gulp.task('default', ['js', 'serve', 'font-awesome', 'fonts']) 50 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap4-init-template", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "gulp" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "bootstrap": "^4.0.0", 14 | "font-awesome": "^4.7.0", 15 | "jquery": "^3.3.1", 16 | "popper.js": "^1.12.9" 17 | }, 18 | "devDependencies": { 19 | "browser-sync": "^2.23.6", 20 | "gulp": "^3.9.1", 21 | "gulp-cli": "^2.0.1", 22 | "gulp-sass": "^3.1.0" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Bootstrap Init Template 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |

Template Boostrap

14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /src/scss/main.scss: -------------------------------------------------------------------------------- 1 | body { 2 | background: #000; 3 | color: #fff; 4 | } 5 | --------------------------------------------------------------------------------