Skip to content

Commit

Permalink
removed static build folder
Browse files Browse the repository at this point in the history
  • Loading branch information
zeevl committed Oct 7, 2016
1 parent 174a495 commit c3597cf
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 30 deletions.
12 changes: 8 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,18 @@ build/Release
# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
node_modules
app/node_modules

# OSX
.DS_Store

# App packaged
dist
release
main.js
main.js.map
static/*
!static/package.json
app/dist
app/main.js
app/main.js.map
app/bundle.js
app/bundle.js.map
app/style.css
app/style.css.map
2 changes: 1 addition & 1 deletion app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
{
const script = document.createElement('script');
script.src = (process.env.HOT)
? `http://localhost:${process.env.PORT || 3000}/static/bundle.js`
? `http://localhost:3000/dist/bundle.js`
: './bundle.js';
document.write(script.outerHTML);
}
Expand Down
2 changes: 1 addition & 1 deletion app/main.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if (process.env.NODE_ENV === 'production') {
if (process.env.NODE_ENV === 'development') {
require('electron-debug')(); // eslint-disable-line global-require
const path = require('path'); // eslint-disable-line
const p = path.join(__dirname, '..', 'static', 'node_modules'); // eslint-disable-line
const p = path.join(__dirname, '..', 'app', 'node_modules'); // eslint-disable-line
require('module').globalPaths.push(p); // eslint-disable-line
}

Expand Down
File renamed without changes.
34 changes: 15 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"build-main": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.electron.js --progress --profile --colors",
"build-renderer": "cross-env NODE_ENV=production node -r babel-register ./node_modules/webpack/bin/webpack --config webpack.config.production.js --progress --profile --colors",
"build": "npm run build-main && npm run build-renderer",
"start": "cross-env NODE_ENV=production electron ./static/",
"start": "cross-env NODE_ENV=production electron ./app/",
"start-hot": "cross-env HOT=1 NODE_ENV=development electron -r babel-register -r babel-polyfill ./app/main.development",
"postinstall": "concurrently \"install-app-deps\" \"node node_modules/fbjs-scripts/node/check-dev-engines.js package.json\"",
"dev": "concurrently --kill-others \"npm run hot-server\" \"npm run start-hot\"",
Expand Down Expand Up @@ -53,8 +53,7 @@
},
"directories": {
"buildResources": "build",
"output": "dist",
"app": "static"
"output": "dist"
},
"bin": {
"electron": "./node_modules/.bin/electron"
Expand Down Expand Up @@ -102,11 +101,13 @@
"concurrently": "^3.0.0",
"cross-env": "^3.0.0",
"css-loader": "^0.25.0",
"css-modules-require-hook": "^4.0.1",
"del": "^2.2.2",
"devtron": "^1.3.0",
"electron": "^1.3.4",
"electron-devtools-installer": "^2.0.1",
"electron-builder": "^5.26.0",
"electron-debug": "^1.0.1",
"electron-devtools-installer": "^2.0.1",
"electron-rebuild": "^1.2.1",
"enzyme": "^2.4.1",
"eslint": "^3.6.0",
Expand All @@ -124,9 +125,18 @@
"minimist": "^1.2.0",
"mocha": "^3.0.2",
"node-libs-browser": "^1.0.0",
"postcss": "^5.1.2",
"react": "^15.3.2",
"react-addons-test-utils": "^15.3.2",
"react-dom": "^15.3.2",
"react-redux": "^4.4.5",
"react-router": "^2.8.0",
"react-router-redux": "^4.0.6",
"redux": "^3.5.2",
"redux-logger": "^2.6.1",
"redux-thunk": "^2.1.0",
"sinon": "^1.17.6",
"source-map-support": "^0.4.2",
"spectron": "^3.3.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.2",
Expand All @@ -135,22 +145,8 @@
"webpack-merge": "^0.14.1",
"webpack-validator": "^2.2.7"
},
"dependencies": {
"css-modules-require-hook": "^4.0.1",
"electron-debug": "^1.0.1",
"font-awesome": "^4.6.3",
"postcss": "^5.1.2",
"react": "^15.3.2",
"react-dom": "^15.3.2",
"react-redux": "^4.4.5",
"react-router": "^2.8.0",
"react-router-redux": "^4.0.6",
"redux": "^3.5.2",
"redux-thunk": "^2.1.0",
"source-map-support": "^0.4.2"
},
"devEngines": {
"node": "4.x || 5.x || 6.x",
"npm": "2.x || 3.x"
}
}
}
2 changes: 1 addition & 1 deletion test/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('main window', function spec() {
before(async () => {
this.app = new Application({
path: electronPath,
args: ['static'],
args: [path.join(__dirname, '..', 'app')],
});
return this.app.start();
});
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.base.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default validate({
},

output: {
path: path.join(__dirname, 'static'),
path: path.join(__dirname, 'app'),
filename: 'bundle.js',

// https://github.com/webpack/webpack/issues/1114
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.development.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default validate(merge(baseConfig, {
],

output: {
publicPath: `http://localhost:${port}/static/`
publicPath: `http://localhost:${port}/dist/`
},

module: {
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.electron.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default validate(merge(baseConfig, {
// 'main.js' in root
output: {
path: __dirname,
filename: './static/main.js'
filename: './app/main.js'
},

plugins: [
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.production.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const config = validate(merge(baseConfig, {
],

output: {
publicPath: '../static/'
publicPath: '../dist/'
},

module: {
Expand Down

0 comments on commit c3597cf

Please sign in to comment.