-
Notifications
You must be signed in to change notification settings - Fork 215
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
Rewrite code in ES5 #81
Conversation
Here's the difference in file sizes from 2.3.0:
|
@@ -39,15 +38,13 @@ | |||
"grunt-eslint": "^19.0.0", | |||
"grunt-rollup": "^1.0.1", | |||
"load-grunt-tasks": "^3.5.2", | |||
"rollup-plugin-babel": "^2.7.1", | |||
"micromatch": "^2.3.11", |
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.
We don't use this, but I found that it rollup-plugin-commonjs
was failing because it depended on this indirectly via rollup-pluginutils
and, for some unknown reason, it was not being installed by npm@5.
@@ -63,55 +36,42 @@ module.exports = function(grunt) { | |||
}, | |||
|
|||
rollup: { | |||
cjs: { |
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.
I'd like to highlight that the CommonJS distribution file has been removed and is no longer generated by the build since Node.js modules will now import the src/runtime/node.js
module directly as it is the new "main" entry in package.json
.
@@ -144,7 +101,7 @@ module.exports = function(grunt) { | |||
} | |||
}, | |||
files: { | |||
'dist/umd/qrious.min.js': 'src/runtime/browser.js' | |||
'dist/qrious.min.js': 'src/runtime/browser.js' |
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.
Since UMD is now the only distribution format that's generated by the build, I've moved its files to the dist
directory directly instead of under the umd
sub-directory.
This will be a breaking changed for those using the CDN download links referenced in the README, but I fear that it's best. If I get enough kickback, I might add symbolic links, otherwise, I will recommend that they simply change their URLs as follows for the 2.3.0:
- https://cdn.rawgit.com/neocotic/qrious/2.3.x/dist/umd/qrious.js
- https://cdn.rawgit.com/neocotic/qrious/2.3.x/dist/umd/qrious.min.js
The download links in the README have been updated as part as this PR.
In an effort to reduce the library size (see #59) and to simplify the build process, I have rewritten the entire code base in plain ES5 and removed babel and ES6 modules.