Skip to content

Commit 6153aa6

Browse files
committed
Merge pull request #88 from ParsePlatform/flovilmart.npmDist
Removes gulp
2 parents 96eb6f8 + 548b72d commit 6153aa6

File tree

5 files changed

+55
-34
lines changed

5 files changed

+55
-34
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ bundles/
44
PIG/bundles/
55
Parse-Dashboard/public/bundles/
66
Parse-Dashboard/parse-dashboard-config.json
7-
dist/
87
npm-debug.log
98

109
// vim .swp

bin/parse-dashboard

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require('../dist/Parse-Dashboard');
2+
require('../Parse-Dashboard');

gulpfile.js

Lines changed: 0 additions & 28 deletions
This file was deleted.

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
},
99
"license": "LicenseRef-LICENSE",
1010
"files": [
11-
"dist"
11+
"Parse-Dashboard",
12+
"bin"
1213
],
1314
"dependencies": {
1415
"babel-runtime": "~5.8.25",
@@ -32,7 +33,6 @@
3233
"babel-loader": "~5.3.0",
3334
"babel-plugin-remove-proptypes": "~1.0.0",
3435
"css-loader": "~0.18.0",
35-
"gulp": "^3.9.1",
3636
"http-server": "~0.8.5",
3737
"immutable-devtools": "~0.0.4",
3838
"jest-cli": "^0.7.1",
@@ -51,8 +51,8 @@
5151
"build": "NODE_ENV=production webpack --config webpack/production.config.js && webpack --config webpack/PIG.config.js",
5252
"test": "NODE_PATH=./node_modules jest",
5353
"generate": "node scripts/generate.js",
54-
"prepublish": "gulp",
55-
"start": "node ./dist/Parse-Dashboard/index.js"
54+
"prepublish": "webpack --config webpack/publish.config.js --progress",
55+
"start": "node ./Parse-Dashboard/index.js"
5656
},
5757
"bin": {
5858
"parse-dashboard": "./bin/parse-dashboard"

webpack/publish.config.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright (c) 2016-present, Parse, LLC
3+
* All rights reserved.
4+
*
5+
* This source code is licensed under the license found in the LICENSE file in
6+
* the root directory of this source tree.
7+
*/
8+
var configuration = require('./base.config.js');
9+
10+
configuration.entry = {dashboard: './dashboard/index.js'};
11+
configuration.output.path = './Parse-Dashboard/public/bundles';
12+
13+
var webpack = require('webpack');
14+
15+
// Add propType removal to Babel
16+
var loaders = configuration.module.loaders;
17+
for (var i = 0; i < loaders.length; i++) {
18+
if (loaders[i].loader === 'babel-loader') {
19+
if (!loaders[i].query.plugins) {
20+
loaders[i].query.plugins = [];
21+
}
22+
loaders[i].query.plugins.push('babel-plugin-remove-proptypes');
23+
break;
24+
}
25+
}
26+
27+
// Enable minification
28+
configuration.plugins.push(
29+
new webpack.DefinePlugin({
30+
'process.env': {
31+
'NODE_ENV': '"production"'
32+
}
33+
}),
34+
new webpack.optimize.UglifyJsPlugin({
35+
compress: {
36+
warnings: false
37+
}
38+
}),
39+
new webpack.optimize.OccurenceOrderPlugin(),
40+
function() {
41+
this.plugin('done', function(stats) {
42+
if (stats.compilation.errors && stats.compilation.errors.length) {
43+
console.log(stats.compilation.errors);
44+
process.exit(1);
45+
}
46+
});
47+
}
48+
);
49+
50+
module.exports = configuration;

0 commit comments

Comments
 (0)