-
Notifications
You must be signed in to change notification settings - Fork 796
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
Yet Another Switch to CommonJS #456
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Dec 16, 2016
Closed
cfbc40f
to
4c9a0b6
Compare
Updates:
|
Updates:
|
- More common that js/.
- Minimally invasive first pass conversion to CommonJS usage. - Change `forge.js` to be top-level container. Preserve code style of files adding properties to the `forge` object. - Add `index.js` as main node file. `require` other files as `forge.js` did before. - Remove boilerplate from all files. - Change dependencies into `require` calls.
- Minimally invasive first pass conversion to CommonJS usage. - Keep IIFEs to avoid re-indent of all test code. - Keep CAPS var style to avoid large diff. - Remove boilerplate from all files. - Change dependencies into `require` calls.
- Needed for tools like browserify due to early return call.
- Remove abilty to create a new forge container by calling the top-level container with new options. Doing this correctly would add too much implementation complexity compared to its usefulness. - Move global options to the forge.options object. - Change disableNativeCode option to usePureJavaScript.
Use common Node.js checking logic.
- Add jshint dependency. - Allow ES2015 for jshint.
- Update dependencies: remove almond and requirejs, add webpack. - Add Browserify support to package.json. - Add `npm run build` command. - Build both un-minimized and minimized with sourcemap bundles. - Output built files to dist/. - Update README.
- Update READMEs. - Add Karma support. - Karma plugins: webpack, mocha, phantomjs, chrome, firefox. - Remove requirejs test method in favor of webpack builds. - Update dependencies. - Simplify manual browser test files. - Remove "browser" test in favor of Karma.
- Move files: - Examples to examples/. - Tests to tests/. - Test server to tests/. - Core unit tests to tests/unit/. - Legacy browser tests to tests/legacy/. - Benchmarks to tests/benchmarks/. - WebSockets related to tests/websockets/. - Issue related to tests/issues/. - Support files to root. - Test deps added to main package.json. - Update paths everywhere. - Built bundles: - Support building multiple configurations. - dist/forge.js: core forge. - dist/forge.all.js: core + extra utils + networking. - Update lib/form.js, lib/xhr.js to CommonJS. - Update READMEs. - Update test server with appropriate files. - Add primary test index. - Update legacy index and files for new layout. - Update tests to use single forge bundles. - Remove test trailing whitespace. - Turn off legacy test scrolling due to performance.
- Move ToC closer to top. - Add more to ToC. - Update build and test sections. - Misc changes and fixes.
- Move to DRY code. - Use short and easy to visually scan functions: _I_(), _IN(). - Saves many bytes of duplicated strings in output bundles.
- Remove custom ssl module and build support. - Remove Python test server (replaced by Node.js server). - Update README.
dlongley
reviewed
Jan 10, 2017
|
||
### Removed | ||
|
||
- Can no longer call `forge({...})` to create new instances. |
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 include a **BREAKING**
prefix.
dlongley
approved these changes
Jan 10, 2017
This was referenced Jan 11, 2017
Closed
Closed
Closed
Closed
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is another attempt at a CommonJS switch. It's similar to #357 but attempts to change the code structure less and adds testings updates.
requires()
build up the forge object may be a questionable style but lets address that later.forge.options
object. For now only including the renameddisableNativeCode
asusePureJavaScript
../tests/
./nodejs
to root dirAs this is a rather major change it needs testing and feedback before hitting master. At a minimum the bower issue needs solving. Please test and leave comments, thanks!