Skip to content

Commit

Permalink
feat(www): Build esm and es5 assets.
Browse files Browse the repository at this point in the history
  • Loading branch information
randytarampi committed Dec 12, 2018
1 parent 2a2c81c commit e72e925
Show file tree
Hide file tree
Showing 35 changed files with 2,941 additions and 1,344 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
node_modules
dist
build
es5
esm
docs
coverage
.nyc_output
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ jspm_packages
# Compiled resources
dist
build
es5
esm
.webpack
*.pdf_original

Expand Down
2 changes: 2 additions & 0 deletions .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
"**/node_modules/**",
"**/dist/**",
"**/build/**",
"**/es5/**",
"**/esm/**",
"**/docs/**",
"**/coverage/**",
"**/src/job-applications/**",
Expand Down
7 changes: 5 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -329,15 +329,18 @@ module.exports = (api) => {

case "publish":
case "client.esm": {
if (isDevelopment) {
plugins.push("react-hot-loader/babel");
}
presets = [
[
"@babel/preset-env",
{
targets: {
esmodules: true
},
modules: false,
useBuiltIns: "entry"
useBuiltIns: "entry",
modules: false
}
],
[
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module.exports.clean = ({relativePath, gulp}) => gulp.task("clean", () => {
const del = require("del");
const path = require("path");

const directories = [".serverless/", ".webpack/", ".dynamodb/", "coverage/", ".nyc_output/", "dist/", "build/"].map(directory => path.join(relativePath, directory));
const directories = [".serverless/", ".webpack/", ".dynamodb/", "coverage/", ".nyc_output/", "dist/", "build/", "esm/", "es5/"].map(directory => path.join(relativePath, directory));

return gulp.src(directories, {allowEmpty: true})
.pipe(vinylPaths(del));
Expand Down
Loading

0 comments on commit e72e925

Please sign in to comment.