Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Commit

Permalink
0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
pbarbiero committed Feb 24, 2017
1 parent 90d0b85 commit b4f8eeb
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
*.DS_Store
dist/bundle.js
dist/bundle.css
builds/
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ If you like this project, check out _enhanced-electron-react-boilerplate_ which
_You have two options, an automatic build or two manual steps_

###### One Shot
* Run `npm run package` to have webpack compile your application into `dist/bundle.js` and `dist/index.html`, and then an electron-packager run will be triggered for the current platform/arch using asar archives
* _Not yet available_
* Run `npm run package` to have webpack compile your application into `dist/bundle.js` and `dist/index.html`, and then an electron-packager run will be triggered for the current platform/arch, outputting to `builds/`

###### Manual
_Recommendation: Update the "postpackage" script call in package.json to specify parameters as you choose and use the `npm run package` command instead of running these steps manually_
* Run `npm run build` to have webpack compile and output your bundle to `dist/bundle.js`
* Then you can call electron-packager directly with any commands you choose

If you want to test the production build (In case you think Babili might be breaking something) after running `npm run build` you can then call `npm run testProd`
If you want to test the production build (In case you think Babili might be breaking something) after running `npm run build` you can then call `npm run testProd`. This will cause electron to load off of the `dist/` build instead of looking for the webpack-dev-server instance.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "basic-electron-react-boilerplate",
"version": "0.1.0",
"version": "0.2.0",
"description": "Minimal and modern react+electron+webpack boilerplate",
"author": "Phillip Barbiero",
"homepage": "https://github.com/PhillMcKraken/basic-electron-react-boilerplate",
Expand All @@ -15,7 +15,8 @@
"testProd": "electron main.js --noDevServer",
"dev": "webpack-dev-server --hot --host 0.0.0.0 --config=./webpack.dev.config.js",
"build": "webpack --config webpack.build.config.js",
"package": "webpack --config webpack.build.config.js"
"package": "webpack --config webpack.build.config.js",
"postpackage": "electron-packager ./ --out=./builds"
},
"devDependencies": {
"babel-core": "^6.23.1",
Expand All @@ -25,6 +26,7 @@
"babili-webpack-plugin": "0.0.10",
"css-loader": "^0.26.1",
"electron": "^1.4.15",
"electron-packager": "^8.5.2",
"extract-text-webpack-plugin": "^2.0.0-rc.3",
"html-webpack-plugin": "^2.28.0",
"react": "^15.4.2",
Expand Down
4 changes: 2 additions & 2 deletions webpack.build.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ module.exports = {
new ExtractTextPlugin("bundle.css"),
new webpack.DefinePlugin({
'process.env.NODE_ENV': '"production"',
})/*,
new BabiliPlugin()*/
}),
new BabiliPlugin()
],
stats: {
colors: true,
Expand Down
5 changes: 0 additions & 5 deletions webpack.dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ module.exports = {
{ loader: 'style-loader' },
{ loader: 'css-loader' }
], include: defaultInclude },
/*{ test: /\.less$/, use: [
{ loader: 'style-loader' },
{ loader: 'css-loader' },
{ loader: 'less-loader' }
], include: defaultInclude },*/
{ test: /\.js?$/, use: [
{ loader: 'babel-loader' }
], include: defaultInclude }
Expand Down

0 comments on commit b4f8eeb

Please sign in to comment.