Skip to content

Commit

Permalink
Minify walt-explorer builds (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
randy7d0 authored and ballercat committed Oct 28, 2018
1 parent a8e952a commit 84a66a1
Show file tree
Hide file tree
Showing 29 changed files with 3,968 additions and 1,866 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5,802 changes: 3,939 additions & 1,863 deletions packages/walt-docs/package-lock.json → packages/walt-explorer/package-lock.json

Large diffs are not rendered by default.

@@ -1,12 +1,12 @@
{
"name": "walt-docs",
"name": "walt-explorer",
"version": "1.1.8",
"description": "WAlt documentation",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server -d --hot --inline",
"start-container": "webpack-dev-server -d --hot --inline --host=$(hostname -I | xargs)",
"build": "webpack && cp index.html explorer.js explorer.js.map walt.png ../../docs/",
"build": "cross-env NODE_ENV=production webpack && cp index.html explorer.js explorer.js.map walt.png ../../docs/",
"prettier": "prettier",
"preversion": "npm run build"
},
Expand Down Expand Up @@ -57,18 +57,20 @@
"sass-loader": "6.0.6",
"style-loader": "0.18.2",
"url-loader": "0.5.9",
"webpack": "3.6.0",
"webpack": "^3.6.0",
"webpack-dev-server": "2.8.2"
},
"dependencies": {
"codemirror": "5.29.0",
"cross-env": "^5.2.0",
"prop-types": "15.5.10",
"ramda": "0.25.0",
"react": "15.6.1",
"react-codemirror2": "2.0.2",
"react-dom": "15.6.1",
"semantic-ui-css": "2.2.12",
"semantic-ui-react": "0.73.1",
"uglifyjs-webpack-plugin": "^1.3.0",
"walt-compiler": "^0.17.0",
"walt-plugin-syntax-closure": "^0.2.8"
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
@@ -1,4 +1,7 @@
const path = require("path");
const webpack=require('webpack');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');


module.exports = {
context: __dirname + "/src",
Expand All @@ -17,6 +20,9 @@ module.exports = {
extensions: [".js", ".jsx", ".json", ".scss", ".css", ".walt"]
},

plugins: [
],

module: {
loaders: [
{
Expand Down Expand Up @@ -48,3 +54,21 @@ module.exports = {
]
}
};

if (process.env.NODE_ENV === "production") {
module.exports.plugins.push(

new UglifyJsPlugin({
sourceMap: true,
cache: true,
parallel: true,
}),

new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify('production'),
}
}),

);
}

0 comments on commit 84a66a1

Please sign in to comment.