Skip to content
This repository has been archived by the owner on Sep 27, 2022. It is now read-only.

Add package.json, port to Gulp 4 #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v14.16.0
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Conduit's Bootstrap [(see it live on GH pages)](http://gothinkster.github.io/conduit/)

1. Pull repo
2. Update bootstrap submodule
3. npm install
4. Run `gulp`
```
npm install
npx gulp`
```

The CSS and sample static HTML are generated under `app/`, and a development server also starts running.
21 changes: 9 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
var gulp = require('gulp');
var template = require('gulp-template');
var server = require('gulp-server-livereload');
var livereload = require('gulp-livereload');
var sass = require('gulp-sass');
var minifyCss = require('gulp-minify-css');
var fs = require('fs');
var gutil = require('gulp-util');

gulp.task('styles', function() {
gulp.src('./scss/style.scss')
return gulp.src('./scss/style.scss')
.pipe(sass().on('error', sass.logError))
.pipe(minifyCss({compatibility: 'ie9'}))
.pipe(gulp.dest('./app/css/'))
.pipe(livereload())
});

gulp.task('templates', function () {
Expand All @@ -32,19 +33,15 @@ gulp.task('templates', function () {
return gulp.src(['./pages/*.html'])
.pipe(template(templates))
.on('error', gutil.log)
.pipe(gulp.dest('./app'));
.pipe(gulp.dest('./app'))
.pipe(livereload());
});

// Watch task
gulp.task('default',function() {
// run task initially, after that watch
gulp.start(['styles', 'templates']);
gulp.watch('./scss/*.scss',['styles']);
gulp.watch('pages/**/*.html',['templates']);
gulp.src('./app')
.pipe(server({
livereload: true,
directoryListing: false,
open: true
}));
gulp.parallel(['styles', 'templates'])();
livereload.listen({port: 3001});
gulp.watch('./scss/*.scss', gulp.series('styles'));
gulp.watch('pages/**/*.html', gulp.series('templates'));
});
Loading