Skip to content

Commit

Permalink
update gulp to include runtime and .min
Browse files Browse the repository at this point in the history
  • Loading branch information
danalexilewis committed Aug 6, 2020
1 parent 943f433 commit 70131f9
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 4 deletions.
10 changes: 6 additions & 4 deletions gulpfile.babel.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
import gulp from 'gulp'
import replace from 'gulp-replace'
import rename from 'gulp-rename'
import ignore from 'gulp-ignore'

// DL: we need to overwrite the paths of any asset that we include in the build

const copyCss = (done) => {
gulp.src(['./build/static/css/main.*.chunk.css'])
.pipe(rename('community.css'))
.pipe(rename('community.min.css'))
.pipe(gulp.dest('./js-deliver'))
done()
}

const copyJs = (done) => {
gulp.src(['./build/static/js/main.*.chunk.js'])
.pipe(rename('community.main.js'))
.pipe(rename('community.main.min.js'))
.pipe(gulp.dest('./js-deliver'))
gulp.src(['./build/static/js/runtime~main.*.js'])
.pipe(rename('community-runtime.min.js'))
.pipe(gulp.dest('./js-deliver'))
gulp.src(['./build/static/js/*.chunk.js'])
.pipe(ignore.exclude('main.*'))
.pipe(rename('community.vendor.js'))
.pipe(rename('community.vendor.min.js'))
.pipe(gulp.dest('./js-deliver'))
done()
}
Expand Down
2 changes: 2 additions & 0 deletions js-deliver/community-runtime.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 70131f9

Please sign in to comment.