From ecd22c9e68c702cdabf97a7b4e367b6c124eb0f6 Mon Sep 17 00:00:00 2001 From: "Andrew C. Dvorak" Date: Mon, 19 Mar 2018 14:41:33 -0700 Subject: [PATCH 1/2] fix: Compile demo CSS/JS during `npm run build` --- demos/webpack.config.js | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/demos/webpack.config.js b/demos/webpack.config.js index cba4e8b816b..d00844efa40 100644 --- a/demos/webpack.config.js +++ b/demos/webpack.config.js @@ -36,6 +36,7 @@ const jsBundleFactory = new JsBundleFactory({env, pathResolver, globber, pluginF const DEMO_BASE_DIR_ABSOLUTE_PATH = pathResolver.getAbsolutePath('/demos'); const OUTPUT = { + fsDirAbsolutePath: pathResolver.getAbsolutePath('/build'), httpDirAbsolutePath: '/assets/', }; diff --git a/package.json b/package.json index 58c2fe0eb3b..495d396b777 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "description": "Material Components Web", "license": "Apache-2.0", "scripts": { - "build": "npm run clean && mkdirp build && webpack --progress --colors", + "build": "npm run clean && mkdirp build && webpack --progress --colors && webpack --config=demos/webpack.config.js --progress --colors", "build:min": "mkdirp build && cross-env MDC_ENV=production webpack -p --progress --colors", "changelog": "standard-changelog -i CHANGELOG.md -k packages/material-components-web/package.json -w", "clean": "del-cli build/** build .closure-tmp/** .closure-tmp", From 7b8aca4ecd2e4428209bc146946257bf0a013fab Mon Sep 17 00:00:00 2001 From: "Andrew C. Dvorak" Date: Mon, 19 Mar 2018 14:43:49 -0700 Subject: [PATCH 2/2] WIP: Update golden.json --- test/build/goldens/build-config-dev-env.golden.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/build/goldens/build-config-dev-env.golden.json b/test/build/goldens/build-config-dev-env.golden.json index 9ca47f7ed1b..38d3e0ab529 100644 --- a/test/build/goldens/build-config-dev-env.golden.json +++ b/test/build/goldens/build-config-dev-env.golden.json @@ -3,6 +3,7 @@ "name": "main-js-combined", "entry": "/packages/material-components-web/index.js", "output": { + "path": "/build", "publicPath": "/assets/", "filename": "material-components-web.js", "libraryTarget": "umd", @@ -74,6 +75,7 @@ "typography": "/demos/typography.scss" }, "output": { + "path": "/build", "publicPath": "/assets/", "filename": "[name].css.js" }, @@ -122,6 +124,9 @@ "id": 5, "options": {} }, + { + "cleanupDirRelativePath": "/build" + }, { "options": { "banner": "/*!\n Material Components for the Web\n Copyright (c) 2018 Google Inc.\n License: Apache-2.0\n*/", @@ -139,6 +144,7 @@ "theme/index": "/demos/theme/index.js" }, "output": { + "path": "/build", "publicPath": "/assets/", "filename": "[name].js", "libraryTarget": "umd",