Skip to content
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: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ bundles/
PIG/bundles/
Parse-Dashboard/public/bundles/
Parse-Dashboard/parse-dashboard-config.json
dist/
npm-debug.log

// vim .swp
Expand Down
2 changes: 1 addition & 1 deletion bin/parse-dashboard
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/usr/bin/env node
require('../dist/Parse-Dashboard');
require('../Parse-Dashboard');
28 changes: 0 additions & 28 deletions gulpfile.js

This file was deleted.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
},
"license": "LicenseRef-LICENSE",
"files": [
"dist"
"Parse-Dashboard",
"bin"
],
"dependencies": {
"babel-runtime": "~5.8.25",
Expand All @@ -32,7 +33,6 @@
"babel-loader": "~5.3.0",
"babel-plugin-remove-proptypes": "~1.0.0",
"css-loader": "~0.18.0",
"gulp": "^3.9.1",
"http-server": "~0.8.5",
"immutable-devtools": "~0.0.4",
"jest-cli": "^0.7.1",
Expand All @@ -51,8 +51,8 @@
"build": "NODE_ENV=production webpack --config webpack/production.config.js && webpack --config webpack/PIG.config.js",
"test": "NODE_PATH=./node_modules jest",
"generate": "node scripts/generate.js",
"prepublish": "gulp",
"start": "node ./dist/Parse-Dashboard/index.js"
"prepublish": "webpack --config webpack/publish.config.js --progress",
"start": "node ./Parse-Dashboard/index.js"
},
"bin": {
"parse-dashboard": "./bin/parse-dashboard"
Expand Down
50 changes: 50 additions & 0 deletions webpack/publish.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2016-present, Parse, LLC
* All rights reserved.
*
* This source code is licensed under the license found in the LICENSE file in
* the root directory of this source tree.
*/
var configuration = require('./base.config.js');

configuration.entry = {dashboard: './dashboard/index.js'};
configuration.output.path = './Parse-Dashboard/public/bundles';

var webpack = require('webpack');

// Add propType removal to Babel
var loaders = configuration.module.loaders;
for (var i = 0; i < loaders.length; i++) {
if (loaders[i].loader === 'babel-loader') {
if (!loaders[i].query.plugins) {
loaders[i].query.plugins = [];
}
loaders[i].query.plugins.push('babel-plugin-remove-proptypes');
break;
}
}

// Enable minification
configuration.plugins.push(
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': '"production"'
}
}),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
}
}),
new webpack.optimize.OccurenceOrderPlugin(),
function() {
this.plugin('done', function(stats) {
if (stats.compilation.errors && stats.compilation.errors.length) {
console.log(stats.compilation.errors);
process.exit(1);
}
});
}
);

module.exports = configuration;