Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
gulp deploy: build 404.html too
  • Loading branch information
irvin committed Oct 6, 2018
commit 05faa0bc64a4bf9ba01f7ff33d11882ff77b2ba9
6 changes: 3 additions & 3 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import replace from 'gulp-replace';
const app = express();

const build_path = '_public';
const deploy_path = './';

gulp.task('sass', () =>
gulp.src('sass/*.sass')
Expand Down Expand Up @@ -61,8 +62,7 @@ gulp.task('watch', () => {
});

gulp.task('inlinesource', function () {
return gulp.src(`${build_path}/index.html`)
// .pipe(debug())
return gulp.src([`${build_path}/index.html`, `${build_path}/404.html`])
// .pipe(debug(path.resolve(`${build_path}`)))
.pipe(replace(/<script type="text\/javascript" src="\/(js\/index.js)"><\/script>/g, '<div id="script"><script inline type="text/javascript" src="$1"></script></div>'))
/* // uncommand to inline all scripts / css
Expand All @@ -77,7 +77,7 @@ gulp.task('inlinesource', function () {
compress: false,
rootpath: path.resolve(`${build_path}`)
}))
.pipe(gulp.dest(`${build_path}/out`));
.pipe(gulp.dest(`${deploy_path}`));
});

gulp.task('build', ['jade', 'sass', 'js', 'assets']);
Expand Down