Skip to content

Commit

Permalink
added new.js minified version for modern browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
WebReflection committed May 17, 2019
1 parent 4c1ba52 commit f76a43a
Show file tree
Hide file tree
Showing 10 changed files with 488 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -6,8 +6,8 @@

Bringing the [regularElements](https://github.com/WebReflection/regular-elements) goodness to a component based world.

* no polyfills needed for IE11+, it [optionally](https://github.com/WebReflection/regular-elements/#compatibility) works [even in IE9](https://webreflection.github.io/wicked-elements/test/)
* lightweight as in [~2K lightweight](https://unpkg.com/wicked-elements)
* no fancy polyfills needed for IE11+, it [optionally](https://github.com/WebReflection/regular-elements/#compatibility) works [even in IE9](https://webreflection.github.io/wicked-elements/test/)
* lightweight as in [~2K lightweight](https://unpkg.com/wicked-elements), with also a [1.7K brotli version](https://unpkg.com/wicked-elements/new.js), for modern browsers only, that drops all unnecessary polyfills for `WeakSet`, `CustomEvent`, `element.matches(...)` or `Object.assign` 🎉
* CPU & RAM friendly <sup><sub>(100% based on [handleEvent](https://medium.com/@WebReflection/dom-handleevent-a-cross-platform-standard-since-year-2000-5bf17287fd38) through prototypal inheritance)</sub></sup>
* components can exist at any time <sup><sub>(past, present, future)</sub></sup>
* no issues with classes, it works well with composed behaviors
Expand Down Expand Up @@ -131,4 +131,4 @@ wickedElements.define('...', class {

```

Bear in mind, if the array is empty all attributes changes will be nitified.
Bear in mind, if the array is empty all attributes changes will be notified.
27 changes: 27 additions & 0 deletions es.config.js
@@ -0,0 +1,27 @@
import resolve from 'rollup-plugin-node-resolve';
import includePaths from 'rollup-plugin-includepaths';

export default {
input: 'esm/index.js',
plugins: [
includePaths({
include: {
'@ungap/assign': 'modern/assign.js',
'@ungap/element-matches': 'modern/element-matches.js',
'@ungap/weakset': 'modern/weakset.js',
'@ungap/custom-event': 'modern/custom-event.js',
},
}),
resolve({
module: true
})
],
context: 'null',
moduleContext: 'null',
output: {
exports: 'named',
file: 'modern.js',
format: 'iife',
name: 'wickedElements'
}
};

0 comments on commit f76a43a

Please sign in to comment.