Comments (6)
sorry ... what?
from document-register-element.
for example, when i include the CDNJS repo like below
<script src="//cdnjs.cloudflare.com/ajax/libs/document-register-element/0.5.3/document-register-element.js"
></script>
Could you also add a version that has the minified version of the JS file like
document-register-element.min.js"
from document-register-element.
the purpose of minification is to reduce the overall amount of bytes, right?
Why would you want 4 extra bytes per each minified URL? That would be eventually a no-brainer for a .max
version, or a .debug
one, who cares if the name contains those extra 4 bytes or more.
Accordingly, you might find that the CDN document-register-element.js is the minified version while to have the one that doesn't care about minification you can use document-register-element.max.js
As summary, there is a build process with a toolchain that makes files generation a straight forward and simple one shot procedure. If the purpose of minifing is to reduce as much as possible a file size, I find it illogical to have all minified files containing those pointless extra 4 .min
chars so welcome to my world where the unminified version is explicitly called .max.js
and the production one doesn't need any reminder in its own name and doesn't surely need to be bigger: it's minified for a reason!
Best Regards
from document-register-element.
I suppose that's a good point and I know the file is already minified, adding the .min. to the file name just maps well with all the other libraries in the CDN as they all have the *.min.js to the file so when I write a JS script that does a batch download for dependency injection, instead of looping through an array of files to download, I have to have a one-off hook that tests specifically for your file since there is no .min version. That's why I was requesting that.
from document-register-element.
when I write a JS script that does a batch download for dependency injection
If I understand correctly, that means you are not using the CDN for what it's being created for and you most likely need a hook to this repository and update whatever download only once and only when a new release is available.
You can grab it directly from here or you can simply use npm
like Google AMP is doing already.
The fact everyone else is doing it wrong doesn't usually mean who actually thought about it should do it wrong as well so I am afraid all my projects are like this and I'm here to tell everyone else they can improve instead of generating automatically dumbly named files.
Apologies for any inconvenient, but I am sure you've got my point so thanks in advance for your understanding.
from document-register-element.
the TL;DR version of this problem is: nobody needs non-minified version in production if not during debugging. That shouild be the naming exception, not the default one with a pointless .min
in it.
from document-register-element.
Related Issues (20)
- LifeCycle events order of nested custom elements inconsistent across Chrome and Firefox HOT 18
- Built-in elements don't work in Firefox HOT 6
- TypeError: new.target does not define a custom element HOT 3
- document.registerElement is deprecated and will be removed in M73 HOT 3
- Post-install script slowness HOT 3
- appreciate your feedback for custom element diagram HOT 8
- [Uncaught DOMException: Failed to execute 'registerElement' on 'Document'] when used in Chrome Extension HOT 16
- Functions are not evaluated in connectedCallback HOT 1
- `this` reference in contructor broken HOT 14
- Multiple instances of the polyfill leads to unexpected behaviour HOT 1
- error ""Failed to construct 'HTMLElement': Please use the 'new' operator"" when using with Angular/elements 8.2.0 HOT 2
- Refreshing a document inside an iframe which loads d-r-e breaks the polyfill and leaves document.createElement as undefined HOT 15
- `attributeChangedCallback()` bound value is invalid HOT 15
- Add DRE to Polyfill.io service HOT 1
- [QUESTION] Unable to get property '_isMounted' of undefiened. HOT 1
- TypeError - Object doesn't support property or method 'registerElement' HOT 3
- Time to compare again? (webcompents/custom-elements) HOT 2
- Polyfill does not seem to be working in IE 11 HOT 6
- postinstall fails in noexec enviornment HOT 1
- We unable to install latest version @1.14.7 HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from document-register-element.