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

Rewrite code in ES5 #81

Merged
merged 1 commit into from
Jun 1, 2017
Merged

Rewrite code in ES5 #81

merged 1 commit into from
Jun 1, 2017

Conversation

neocotic
Copy link
Owner

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.

@neocotic neocotic added this to the 3.0.0 milestone May 31, 2017
@neocotic neocotic self-assigned this May 31, 2017
@neocotic neocotic changed the base branch from master to develop May 31, 2017 19:58
@neocotic
Copy link
Owner Author

neocotic commented Jun 1, 2017

Here's the difference in file sizes from 2.3.0:

Minified 2.3.0 Size (KB) New Size (KB) Decrease (%)
No 123 77 37.4
Yes 37 21 43.2

@neocotic neocotic mentioned this pull request Jun 1, 2017
4 tasks
@@ -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",
Copy link
Owner Author

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.

@neocotic neocotic merged commit 81a28f9 into develop Jun 1, 2017
@neocotic neocotic deleted the es5 branch June 1, 2017 01:07
@@ -63,55 +36,42 @@ module.exports = function(grunt) {
},

rollup: {
cjs: {
Copy link
Owner Author

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'
Copy link
Owner Author

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:

The download links in the README have been updated as part as this PR.

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

Successfully merging this pull request may close these issues.

None yet

1 participant