Skip to content
This repository has been archived by the owner on Jun 28, 2021. It is now read-only.

Fixes 438 #448

Merged
merged 18 commits into from
Aug 14, 2016
Merged

Fixes 438 #448

merged 18 commits into from
Aug 14, 2016

Conversation

mmahalwy
Copy link
Contributor

  • Fixes 438
  • Fixes the hot module reloading that @sharabash missed
  • Adds server compilation via babel, this needs to be tested @ahmedre

This should inshallah squeeze some speed on the server and client side.

"start": "NODE_PATH=\"./src\" node ./start",
"build": "node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js",
"build": "npm run build:client & npm run build:server",
"build:server": "babel src -d dist -D",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you might want to include --copy-files to copy over any none js files.

http://stackoverflow.com/questions/32642685/babel-cli-copy-nonjs-files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-D does that :)

@mmahalwy mmahalwy added this to the slim-down components milestone Aug 14, 2016
@mmahalwy
Copy link
Contributor Author

mmahalwy commented Aug 14, 2016

@ahmedre seems i need to do a kick commit for the changes to work... although it is a life saver. My dockerfile changes are not even propogating...

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

so two things:

  1. you don't need a kick update - you can just add a comment that says "rebuild" and it'll rebuild.
  2. yep, Dockerfile changes are ignored by default for security purposes. i'll test manually insha'Allah and update.

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

fails with node 6.3:

npm info lifecycle quran@1.0.0~build:client: Failed to exec build:client script
npm ERR! Linux 4.4.0-34-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build:client"
npm ERR! node v6.3.1
npm ERR! npm  v3.10.3
npm ERR! code ELIFECYCLE
npm ERR! quran@1.0.0 build:client: `node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the quran@1.0.0 build:client script 'node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the quran package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs quran
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls quran
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /quran/npm-debug.log

and with node 5.10.0:

npm info lifecycle quran@1.0.0~build:client: Failed to exec build:client script
npm ERR! Linux 4.4.0-34-generic
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "build:client"
npm ERR! node v5.10.0
npm ERR! npm  v3.8.3
npm ERR! code ELIFECYCLE
npm ERR! quran@1.0.0 build:client: `node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the quran@1.0.0 build:client script 'node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the quran package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node ./node_modules/webpack/bin/webpack.js --config webpack/prod.config.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs quran
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls quran
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /quran/npm-debug.log

will update with more information in a bit insha'Allah.

@@ -20,6 +20,7 @@ module.exports = {
sourceMapFilename: '[name]-[chunkhash].map.js'

},
context: path.resolve(__dirname, '../src'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change ../src to ..

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

line 30 - change ./client.js to ./src/client.js

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

after the above changes made, the image builds, but unfortunately doesn't work - the server continues, in an infinite loop, to do:

05:21:43 server.prod-0 [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)
05:21:43 server.prod-1 [webpack-isomorphic-tools] (waiting for the first Webpack build to finish)

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32781

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32782

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32783

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32784

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32787

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32789

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32790

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32792

@ahmedre
Copy link
Contributor

ahmedre commented Aug 14, 2016

Deployed to: http://staging.quran.com:32795

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants