Skip to content

Commit

Permalink
Merge pull request WebReflection#316 from WebReflection/unique-imports
Browse files Browse the repository at this point in the history
Fix WebReflection#315 - include same dependencies once
  • Loading branch information
WebReflection authored Dec 17, 2018
2 parents 349b8ad + cfe1b5c commit a082d60
Show file tree
Hide file tree
Showing 12 changed files with 420 additions and 317 deletions.
2 changes: 0 additions & 2 deletions cjs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const {observe, Tagger} = require('./objects/Updates.js');
const wire = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('./hyper/wire.js'));
const {content, weakly} = require('./hyper/wire.js');
const render = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('./hyper/render.js'));
const { G } = require('./shared/constants.js');

// all functions are self bound to the right context
// you can do the following
Expand All @@ -35,7 +34,6 @@ hyper.wire = wire;
// that don't necessarily need upfront polyfills
// i.e. those still targeting IE
hyper._ = {
global: G,
WeakMap,
WeakSet
};
Expand Down
2 changes: 1 addition & 1 deletion cjs/objects/Updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const CustomEvent = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/custom-event'));
const WeakSet = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/essential-weakset'));
const isArray = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/is-array'));

const createContent = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('@ungap/create-content'));

const disconnected = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('disconnected'));
const domdiff = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('domdiff'));
const domtagger = (m => m.__esModule ? /* istanbul ignore next */ m.default : /* istanbul ignore next */ m)(require('domtagger'));
Expand Down
3 changes: 0 additions & 3 deletions cjs/shared/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
'use strict';
const G = document.defaultView;
exports.G = G;

// Node.CONSTANTS
// 'cause some engine has no global Node defined
// (i.e. Node, NativeScript, basicHTML ... )
Expand Down
6 changes: 3 additions & 3 deletions esm.js

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions esm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Intent from './objects/Intent.js';
import {observe, Tagger} from './objects/Updates.js';
import wire, {content, weakly} from './hyper/wire.js';
import render from './hyper/render.js';
import { G } from './shared/constants.js';

// all functions are self bound to the right context
// you can do the following
Expand All @@ -32,7 +31,6 @@ hyper.wire = wire;
// that don't necessarily need upfront polyfills
// i.e. those still targeting IE
hyper._ = {
global: G,
WeakMap,
WeakSet
};
Expand Down
2 changes: 1 addition & 1 deletion esm/objects/Updates.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import CustomEvent from '@ungap/custom-event';
import WeakSet from '@ungap/essential-weakset';
import isArray from '@ungap/is-array';

import createContent from '@ungap/create-content';

import disconnected from 'disconnected';
import domdiff from 'domdiff';
import domtagger from 'domtagger';
Expand Down
2 changes: 0 additions & 2 deletions esm/shared/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export const G = document.defaultView;

// Node.CONSTANTS
// 'cause some engine has no global Node defined
// (i.e. Node, NativeScript, basicHTML ... )
Expand Down
Loading

0 comments on commit a082d60

Please sign in to comment.