-
Notifications
You must be signed in to change notification settings - Fork 3.5k
ES6, webpack, Babel, libraries imported through npm, and NodeJS version #95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
1931519
to
6d396db
Compare
As far as I'm aware, this branch is now ready to merge. I'll leave it open for one more day in case anyone else would like to review it. |
@n1474335 do you want https://www.npmjs.com/package/cyberchef on npm? |
@@ -26,21 +26,55 @@ | |||
"url": "https://github.com/gchq/CyberChef/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's probably worth adding a prePublish hook for compiling the node bundle
node: { | ||
target: "node", | ||
entry: "./src/node/index.js", | ||
output: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should use https://www.npmjs.com/package/webpack-node-externals so that the node build doesn't contain all of the 3rd party deps
@graingert, yes if you could transfer the npm package over to me (https://www.npmjs.com/~n1474335), that would be great. Thanks for your comments about improving node integration and more generally all the work you did on ES6 and webpack - it was a very useful reference. |
@n1474335 added |
Summary
This pull request represents a substantial restructuring of the project. There are no visible changes to the web app itself, however a number of changes have been made to the build process and the repository structure.
Main changes
npm run
scripts.grunt node
and then imported and run as follows:src/core
containing all the code which handles the actual baking process, including all the operationssrc/core
should now aim to be cross-platform (i.e. it should work in NodeJS and the browser). Webpack handles a lot of this for you, however there will be some cases where care needs to be taken.src/web
containing the code required to run the web appsrc/node
containing the code required to run the NodeJS versionIssues this addresses
This pull request should address the following issues once merged:
#2 Use a modern library management system
#5 use babel and babel-preset-env
It will also become much easier to fix compatibility issues such as #39 (Drag item to Favourites on iPad does not work).
Known bugs
This number of changes will inevitably have introduced some bugs. If you have the time, please contribute tests and (ideally) bug fixes. I will leave this unmerged for a little while to give us a chance to go through it. If you have any comments or code reviews, I would be glad to hear them.
src/web/static/stats.txt
are not correctly populated when running a production buildwindow
anddocument
insrc/core
which will break the NodeJS version