Skip to content
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

Use a modern library management system #2

Closed
graingert opened this issue Nov 28, 2016 · 4 comments
Closed

Use a modern library management system #2

graingert opened this issue Nov 28, 2016 · 4 comments

Comments

@graingert
Copy link

Currently all your libs are manually specified:

https://github.com/gchq/CyberChef/blob/master/Gruntfile.js#L46-L125

This is a DRY violation and a pain to maintain.

Choose a modern module bundler: webpack, rollup, bunch etc: https://webpack.js.org/get-started/why-webpack/#comparison

@Synchro Synchro mentioned this issue Dec 8, 2016
@n1474335 n1474335 changed the title use a modern module bundler to automatically load dependcies based on ES2015+ module imports. Use a modern library management system Dec 20, 2016
@n1474335
Copy link
Member

This will now be the master ticket for library management queries and updates.

Details from #43:

Library management is something that I hope to improve in the coming months. At the moment, any libraries used in the app itself (as opposed to those used in the build process) should be stored in src/js/lib or src/css/lib and then added to Gruntfile.js to get incorporated into the build.

Ultimately we'll probably use some sort of bundler like webpack, but there are various considerations to be made before we decide which route to go down.

I've written up some Design Principals and one of them centres around not using too many libraries unless absolutely necessary. If you're going to utilise every feature available in the library, it's probably worthwhile, but if not it can lead to bloat which everyone will have to download even if they never touch that operation. Vanilla JS is preferred if reasonable.

@graingert
Copy link
Author

Do not store libraries in src/js/lib or src/css/lib this unnecessarily separates file types and keeps the libraries in the code base. All libraries should go in node_modules and be managed by npm/yarn

@graingert
Copy link
Author

@n1474335 re design principals underscore_lower_case is not recommended in JavaScript projects.

@n1474335
Copy link
Member

Completed in #95

n1474335 pushed a commit that referenced this issue Jul 3, 2017
n1474335 pushed a commit that referenced this issue Dec 19, 2017
mattnotmitt pushed a commit to mattnotmitt/CyberChef that referenced this issue Jan 3, 2018
n1474335 pushed a commit that referenced this issue Jul 4, 2019
Bring branch up to date with gchq/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants