Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Compile demo CSS/JS during npm run build #2437

Merged
merged 2 commits into from
Mar 19, 2018
Merged
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 demos/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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/',
};

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 6 additions & 0 deletions test/build/goldens/build-config-dev-env.golden.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -74,6 +75,7 @@
"typography": "/demos/typography.scss"
},
"output": {
"path": "/build",
"publicPath": "/assets/",
"filename": "[name].css.js"
},
Expand Down Expand Up @@ -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*/",
Expand All @@ -139,6 +144,7 @@
"theme/index": "/demos/theme/index.js"
},
"output": {
"path": "/build",
"publicPath": "/assets/",
"filename": "[name].js",
"libraryTarget": "umd",
Expand Down