diff --git a/example/.gitignore b/example/.gitignore deleted file mode 100644 index ceeb8a45..00000000 --- a/example/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules -public/index.js \ No newline at end of file diff --git a/example/webpack1/.babelrc b/example/webpack1/.babelrc deleted file mode 100644 index a8983579..00000000 --- a/example/webpack1/.babelrc +++ /dev/null @@ -1,5 +0,0 @@ -{ - "presets": [ - [ "es2015" ] - ] -} \ No newline at end of file diff --git a/example/webpack1/package.json b/example/webpack1/package.json deleted file mode 100644 index 4dbd0260..00000000 --- a/example/webpack1/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "svelte-loader-example", - "version": "0.0.0", - "description": "Example using svelte-loader", - "main": "index.js", - "private": true, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1", - "bundle": "webpack --display-error-details" - }, - "license": "MIT", - "devDependencies": { - "babel-core": "^6.18.2", - "babel-loader": "^6.2.8", - "babel-preset-es2015": "^6.18.0", - "svelte-loader": "1.0.0", - "webpack": "^1.0.0" - }, - "dependencies": { - "svelte": "^1.1.3" - } -} diff --git a/example/webpack1/public/index.html b/example/webpack1/public/index.html deleted file mode 100644 index f073517d..00000000 --- a/example/webpack1/public/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - -
-- -
- - - - \ No newline at end of file diff --git a/example/webpack1/public/index.js b/example/webpack1/public/index.js deleted file mode 100644 index fc8a739c..00000000 --- a/example/webpack1/public/index.js +++ /dev/null @@ -1,597 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ exports: {}, -/******/ id: moduleId, -/******/ loaded: false -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.loaded = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports, __webpack_require__) { - - module.exports = __webpack_require__(1); - - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _counter = __webpack_require__(2); - - var _counter2 = _interopRequireDefault(_counter); - - function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - - var counter = new _counter2.default({ - target: document.querySelector('#counter') - }); /* global document */ - - document.querySelector('#reset-counter').addEventListener('click', function () { - counter.set({ count: 0 }); - }); - -/***/ }, -/* 2 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - var Header = __webpack_require__(3); - - Header = Header && Header.__esModule ? Header['default'] : Header; - - var template = function () { - return { - data: function data() { - return { - count: 0 - }; - }, - - components: { - Header: Header - } - }; - }(); - - function renderMainFragment(root, component) { - var header_initialData = { - dude: "walt" - }; - - if ('count' in root) header_initialData.count = root.count; - var header = new template.components.Header({ - target: null, - _root: component._root || component, - data: header_initialData - }); - - var header_updating = false; - - component._bindings.push(function () { - if (header._torndown) return; - header.observe('count', function (value) { - header_updating = true; - component._set({ count: value }); - header_updating = false; - }); - }); - - header._context = { - root: root - }; - - var text = createText("\n\n"); - - var p = createElement('p'); - - appendNode(createText("Count: "), p); - var last_text2 = root.count; - var text2 = createText(last_text2); - appendNode(text2, p); - var text3 = createText("\n"); - - var button = createElement('button'); - - function clickHandler(event) { - var root = this.__svelte.root; - - component.set({ count: root.count + 1 }); - } - - addEventListener(button, 'click', clickHandler); - - button.__svelte = { - root: root - }; - - appendNode(createText("+1"), button); - - return { - mount: function mount(target, anchor) { - header._fragment.mount(target, anchor); - insertNode(text, target, anchor); - insertNode(p, target, anchor); - insertNode(text3, target, anchor); - insertNode(button, target, anchor); - }, - - update: function update(changed, root) { - var __tmp; - - if (!header_updating && 'count' in changed) { - header._set({ count: root.count }); - } - - header._context.root = root; - - if ((__tmp = root.count) !== last_text2) { - text2.data = last_text2 = __tmp; - } - - button.__svelte.root = root; - }, - - teardown: function teardown(detach) { - header.destroy(detach); - removeEventListener(button, 'click', clickHandler); - - if (detach) { - detachNode(text); - detachNode(p); - detachNode(text3); - detachNode(button); - } - } - }; - } - - function Counter(options) { - options = options || {}; - this._state = Object.assign(template.data(), options.data); - - this._observers = { - pre: Object.create(null), - post: Object.create(null) - }; - - this._handlers = Object.create(null); - - this._root = options._root; - this._yield = options._yield; - - this._torndown = false; - this._renderHooks = []; - - this._bindings = []; - this._fragment = renderMainFragment(this._state, this); - if (options.target) this._fragment.mount(options.target, null); - while (this._bindings.length) { - this._bindings.pop()(); - }this._flush(); - } - - Counter.prototype.get = get; - Counter.prototype.fire = fire; - Counter.prototype.observe = observe; - Counter.prototype.on = on; - Counter.prototype.set = set; - Counter.prototype._flush = _flush; - - Counter.prototype._set = function _set(newState) { - var oldState = this._state; - this._state = Object.assign({}, oldState, newState); - - dispatchObservers(this, this._observers.pre, newState, oldState); - if (this._fragment) this._fragment.update(newState, this._state); - dispatchObservers(this, this._observers.post, newState, oldState); - - while (this._bindings.length) { - this._bindings.pop()(); - }this._flush(); - }; - - Counter.prototype.teardown = Counter.prototype.destroy = function destroy(detach) { - this.fire('destroy'); - - this._fragment.teardown(detach !== false); - this._fragment = null; - - this._state = {}; - this._torndown = true; - }; - - function createText(data) { - return document.createTextNode(data); - } - - function insertNode(node, target, anchor) { - target.insertBefore(node, anchor); - } - - function detachNode(node) { - node.parentNode.removeChild(node); - } - - function createElement(name) { - return document.createElement(name); - } - - function appendNode(node, target) { - target.appendChild(node); - } - - function addEventListener(node, event, handler) { - node.addEventListener(event, handler, false); - } - - function removeEventListener(node, event, handler) { - node.removeEventListener(event, handler, false); - } - - function dispatchObservers(component, group, newState, oldState) { - for (var key in group) { - if (!(key in newState)) continue; - - var newValue = newState[key]; - var oldValue = oldState[key]; - - if (newValue === oldValue && (typeof newValue === 'undefined' ? 'undefined' : _typeof(newValue)) !== 'object') continue; - - var callbacks = group[key]; - if (!callbacks) continue; - - for (var i = 0; i < callbacks.length; i += 1) { - var callback = callbacks[i]; - if (callback.__calling) continue; - - callback.__calling = true; - callback.call(component, newValue, oldValue); - callback.__calling = false; - } - } - } - - function get(key) { - return key ? this._state[key] : this._state; - } - - function fire(eventName, data) { - var handlers = eventName in this._handlers && this._handlers[eventName].slice(); - if (!handlers) return; - - for (var i = 0; i < handlers.length; i += 1) { - handlers[i].call(this, data); - } - } - - function observe(key, callback, options) { - var group = options && options.defer ? this._observers.pre : this._observers.post; - - (group[key] || (group[key] = [])).push(callback); - - if (!options || options.init !== false) { - callback.__calling = true; - callback.call(this, this._state[key]); - callback.__calling = false; - } - - return { - cancel: function cancel() { - var index = group[key].indexOf(callback); - if (~index) group[key].splice(index, 1); - } - }; - } - - function on(eventName, handler) { - if (eventName === 'teardown') return this.on('destroy', handler); - - var handlers = this._handlers[eventName] || (this._handlers[eventName] = []); - handlers.push(handler); - - return { - cancel: function cancel() { - var index = handlers.indexOf(handler); - if (~index) handlers.splice(index, 1); - } - }; - } - - function set(newState) { - this._set(newState); - (this._root || this)._flush(); - } - - function _flush() { - if (!this._renderHooks) return; - - while (this._renderHooks.length) { - var hook = this._renderHooks.pop(); - hook.fn.call(hook.context); - } - } - - module.exports = Counter; - -/***/ }, -/* 3 */ -/***/ function(module, exports, __webpack_require__) { - - 'use strict'; - - var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - var __import0 = __webpack_require__(4); - - var hello = __import0.hello; - - function applyComputations(state, newState, oldState, isInitial) { - if (isInitial || 'dude' in newState && _typeof(state.dude) === 'object' || state.dude !== oldState.dude) { - state.salutation = newState.salutation = template.computed.salutation(state.dude); - } - } - - var template = function () { - return { - data: function data() { - return { - dude: 'Unknown', - count: 0 - }; - }, - - computed: { - salutation: function salutation(dude) { - return hello(dude); - } - } - }; - }(); - - function renderMainFragment(root, component) { - var h1 = createElement('h1'); - - var last_text = root.salutation; - var text = createText(last_text); - appendNode(text, h1); - appendNode(createText(", counted to "), h1); - var last_text2 = root.count; - var text2 = createText(last_text2); - appendNode(text2, h1); - appendNode(createText(" already!"), h1); - - return { - mount: function mount(target, anchor) { - insertNode(h1, target, anchor); - }, - - update: function update(changed, root) { - var __tmp; - - if ((__tmp = root.salutation) !== last_text) { - text.data = last_text = __tmp; - } - - if ((__tmp = root.count) !== last_text2) { - text2.data = last_text2 = __tmp; - } - }, - - teardown: function teardown(detach) { - if (detach) { - detachNode(h1); - } - } - }; - } - - function Header(options) { - options = options || {}; - this._state = Object.assign(template.data(), options.data); - applyComputations(this._state, this._state, {}, true); - - this._observers = { - pre: Object.create(null), - post: Object.create(null) - }; - - this._handlers = Object.create(null); - - this._root = options._root; - this._yield = options._yield; - - this._torndown = false; - - this._fragment = renderMainFragment(this._state, this); - if (options.target) this._fragment.mount(options.target, null); - } - - Header.prototype.get = get; - Header.prototype.fire = fire; - Header.prototype.observe = observe; - Header.prototype.on = on; - Header.prototype.set = set; - Header.prototype._flush = _flush; - - Header.prototype._set = function _set(newState) { - var oldState = this._state; - this._state = Object.assign({}, oldState, newState); - applyComputations(this._state, newState, oldState, false); - - dispatchObservers(this, this._observers.pre, newState, oldState); - if (this._fragment) this._fragment.update(newState, this._state); - dispatchObservers(this, this._observers.post, newState, oldState); - }; - - Header.prototype.teardown = Header.prototype.destroy = function destroy(detach) { - this.fire('destroy'); - - this._fragment.teardown(detach !== false); - this._fragment = null; - - this._state = {}; - this._torndown = true; - }; - - function createElement(name) { - return document.createElement(name); - } - - function detachNode(node) { - node.parentNode.removeChild(node); - } - - function insertNode(node, target, anchor) { - target.insertBefore(node, anchor); - } - - function createText(data) { - return document.createTextNode(data); - } - - function appendNode(node, target) { - target.appendChild(node); - } - - function dispatchObservers(component, group, newState, oldState) { - for (var key in group) { - if (!(key in newState)) continue; - - var newValue = newState[key]; - var oldValue = oldState[key]; - - if (newValue === oldValue && (typeof newValue === 'undefined' ? 'undefined' : _typeof(newValue)) !== 'object') continue; - - var callbacks = group[key]; - if (!callbacks) continue; - - for (var i = 0; i < callbacks.length; i += 1) { - var callback = callbacks[i]; - if (callback.__calling) continue; - - callback.__calling = true; - callback.call(component, newValue, oldValue); - callback.__calling = false; - } - } - } - - function get(key) { - return key ? this._state[key] : this._state; - } - - function fire(eventName, data) { - var handlers = eventName in this._handlers && this._handlers[eventName].slice(); - if (!handlers) return; - - for (var i = 0; i < handlers.length; i += 1) { - handlers[i].call(this, data); - } - } - - function observe(key, callback, options) { - var group = options && options.defer ? this._observers.pre : this._observers.post; - - (group[key] || (group[key] = [])).push(callback); - - if (!options || options.init !== false) { - callback.__calling = true; - callback.call(this, this._state[key]); - callback.__calling = false; - } - - return { - cancel: function cancel() { - var index = group[key].indexOf(callback); - if (~index) group[key].splice(index, 1); - } - }; - } - - function on(eventName, handler) { - if (eventName === 'teardown') return this.on('destroy', handler); - - var handlers = this._handlers[eventName] || (this._handlers[eventName] = []); - handlers.push(handler); - - return { - cancel: function cancel() { - var index = handlers.indexOf(handler); - if (~index) handlers.splice(index, 1); - } - }; - } - - function set(newState) { - this._set(newState); - (this._root || this)._flush(); - } - - function _flush() { - if (!this._renderHooks) return; - - while (this._renderHooks.length) { - var hook = this._renderHooks.pop(); - hook.fn.call(hook.context); - } - } - - module.exports = Header; - -/***/ }, -/* 4 */ -/***/ function(module, exports) { - - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.hello = hello; - function hello(name) { - return "Hello " + name; - } - -/***/ } -/******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgY2U4MzNlMzk0NDg0MmQzMTI4OTUiLCJ3ZWJwYWNrOi8vLy4vc3JjL2luZGV4LmpzIiwid2VicGFjazovLy8uL3NyYy9jb3VudGVyLmh0bWwiLCJ3ZWJwYWNrOi8vLy4vc3JjL2hlYWRlci5odG1sIiwid2VicGFjazovLy8uL3NyYy9oZWxwZXJzLmpzIl0sIm5hbWVzIjpbImNvdW50ZXIiLCJ0YXJnZXQiLCJkb2N1bWVudCIsInF1ZXJ5U2VsZWN0b3IiLCJhZGRFdmVudExpc3RlbmVyIiwic2V0IiwiY291bnQiLCJoZWxsbyIsIm5hbWUiXSwibWFwcGluZ3MiOiI7QUFBQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQSx1QkFBZTtBQUNmO0FBQ0E7QUFDQTs7QUFFQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTtBQUNBOzs7QUFHQTtBQUNBOztBQUVBO0FBQ0E7O0FBRUE7QUFDQTs7QUFFQTtBQUNBOzs7Ozs7Ozs7Ozs7Ozs7O0FDcENBOzs7Ozs7QUFFQSxLQUFNQSxVQUFVLHNCQUFZO0FBQzFCQyxXQUFRQyxTQUFTQyxhQUFULENBQXVCLFVBQXZCO0FBRGtCLEVBQVosQ0FBaEIsQyxDQUpBOztBQVFBRCxVQUFTQyxhQUFULENBQXVCLGdCQUF2QixFQUF5Q0MsZ0JBQXpDLENBQTBELE9BQTFELEVBQW1FLFlBQVc7QUFDNUVKL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bG8obmFtZSkge1xuICByZXR1cm4gYEhlbGxvICR7bmFtZX1gO1xufVxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9oZWxwZXJzLmpzIl0sInNvdXJjZVJvb3QiOiIifQ== \ No newline at end of file diff --git a/example/webpack1/src/counter.html b/example/webpack1/src/counter.html deleted file mode 100644 index b1afb5ff..00000000 --- a/example/webpack1/src/counter.html +++ /dev/null @@ -1,19 +0,0 @@ -Count: {{count}}
- - - \ No newline at end of file diff --git a/example/webpack1/src/header.html b/example/webpack1/src/header.html deleted file mode 100644 index 40a8e112..00000000 --- a/example/webpack1/src/header.html +++ /dev/null @@ -1,19 +0,0 @@ -- -
- - - - \ No newline at end of file diff --git a/example/webpack2/public/index.js b/example/webpack2/public/index.js deleted file mode 100644 index e649cf34..00000000 --- a/example/webpack2/public/index.js +++ /dev/null @@ -1,640 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 5); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* unused harmony export noop */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return dispatchObservers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return appendNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return insertNode; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return detachNode; }); -/* unused harmony export detachBetween */ -/* unused harmony export teardownEach */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return createElement; }); -/* unused harmony export createSvgElement */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return createText; }); -/* unused harmony export createComment */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return addEventListener; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return removeEventListener; }); -/* unused harmony export setAttribute */ -/* unused harmony export setXlinkAttribute */ -/* unused harmony export getBindingGroupValue */ -/* unused harmony export get */ -/* unused harmony export fire */ -/* unused harmony export observe */ -/* unused harmony export observeDev */ -/* unused harmony export on */ -/* unused harmony export onDev */ -/* unused harmony export set */ -/* unused harmony export _flush */ -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return proto; }); -/* unused harmony export protoDev */ -function appendNode ( node, target ) { - target.appendChild( node ); -} - -function insertNode ( node, target, anchor ) { - target.insertBefore( node, anchor ); -} - -function detachNode ( node ) { - node.parentNode.removeChild( node ); -} - -function detachBetween ( before, after ) { - while ( before.nextSibling && before.nextSibling !== after ) { - before.parentNode.removeChild( before.nextSibling ); - } -} - -function teardownEach ( iterations, detach, start ) { - for ( var i = ( start || 0 ); i < iterations.length; i += 1 ) { - iterations[i].teardown( detach ); - } -} - -function createElement ( name ) { - return document.createElement( name ); -} - -function createSvgElement ( name ) { - return document.createElementNS( 'http://www.w3.org/2000/svg', name ); -} - -function createText ( data ) { - return document.createTextNode( data ); -} - -function createComment () { - return document.createComment( '' ); -} - -function addEventListener ( node, event, handler ) { - node.addEventListener ( event, handler, false ); -} - -function removeEventListener ( node, event, handler ) { - node.removeEventListener ( event, handler, false ); -} - -function setAttribute ( node, attribute, value ) { - node.setAttribute ( attribute, value ); -} - -function setXlinkAttribute ( node, attribute, value ) { - node.setAttributeNS( 'http://www.w3.org/1999/xlink', attribute, value ); -} - -function getBindingGroupValue ( group ) { - var value = []; - for ( var i = 0; i < group.length; i += 1 ) { - if ( group[i].checked ) value.push( group[i].__value ); - } - return value; -} - -function get ( key ) { - return key ? this._state[ key ] : this._state; -} - -function fire ( eventName, data ) { - var handlers = eventName in this._handlers && this._handlers[ eventName ].slice(); - if ( !handlers ) return; - - for ( var i = 0; i < handlers.length; i += 1 ) { - handlers[i].call( this, data ); - } -} - -function observe ( key, callback, options ) { - var group = ( options && options.defer ) ? this._observers.pre : this._observers.post; - - ( group[ key ] || ( group[ key ] = [] ) ).push( callback ); - - if ( !options || options.init !== false ) { - callback.__calling = true; - callback.call( this, this._state[ key ] ); - callback.__calling = false; - } - - return { - cancel: function () { - var index = group[ key ].indexOf( callback ); - if ( ~index ) group[ key ].splice( index, 1 ); - } - }; -} - -function observeDev ( key, callback, options ) { - var c = ( key = '' + key ).search( /[^\w]/ ); - if ( c > -1 ) { - var message = "The first argument to component.observe(...) must be the name of a top-level property"; - if ( c > 0 ) message += ", i.e. '" + key.slice( 0, c ) + "' rather than '" + key + "'"; - - throw new Error( message ); - } - - var group = ( options && options.defer ) ? this._observers.pre : this._observers.post; - - ( group[ key ] || ( group[ key ] = [] ) ).push( callback ); - - if ( !options || options.init !== false ) { - callback.__calling = true; - callback.call( this, this._state[ key ] ); - callback.__calling = false; - } - - return { - cancel: function () { - var index = group[ key ].indexOf( callback ); - if ( ~index ) group[ key ].splice( index, 1 ); - } - }; -} - -function on ( eventName, handler ) { - if ( eventName === 'teardown' ) return this.on( 'destroy', handler ); - - var handlers = this._handlers[ eventName ] || ( this._handlers[ eventName ] = [] ); - handlers.push( handler ); - - return { - cancel: function () { - var index = handlers.indexOf( handler ); - if ( ~index ) handlers.splice( index, 1 ); - } - }; -} - -function onDev ( eventName, handler ) { - if ( eventName === 'teardown' ) { - console.warn( "Use component.on('destroy', ...) instead of component.on('teardown', ...) which has been deprecated and will be unsupported in Svelte 2" ); - return this.on( 'destroy', handler ); - } - - var handlers = this._handlers[ eventName ] || ( this._handlers[ eventName ] = [] ); - handlers.push( handler ); - - return { - cancel: function () { - var index = handlers.indexOf( handler ); - if ( ~index ) handlers.splice( index, 1 ); - } - }; -} - -function set ( newState ) { - this._set( newState ); - ( this._root || this )._flush(); -} - -function _flush () { - if ( !this._renderHooks ) return; - - while ( this._renderHooks.length ) { - var hook = this._renderHooks.pop(); - hook.fn.call( hook.context ); - } -} - -var proto = { - get: get, - fire: fire, - observe: observe, - on: on, - set: set, - _flush: _flush -}; - -var protoDev = { - get: get, - fire: fire, - observe: observeDev, - on: onDev, - set: set, - _flush: _flush -}; - -function noop () {} - -function dispatchObservers ( component, group, newState, oldState ) { - for ( var key in group ) { - if ( !( key in newState ) ) continue; - - var newValue = newState[ key ]; - var oldValue = oldState[ key ]; - - if ( newValue === oldValue && typeof newValue !== 'object' ) continue; - - var callbacks = group[ key ]; - if ( !callbacks ) continue; - - for ( var i = 0; i < callbacks.length; i += 1 ) { - var callback = callbacks[i]; - if ( callback.__calling ) continue; - - callback.__calling = true; - callback.call( component, newValue, oldValue ); - callback.__calling = false; - } - } -} - - - - -/***/ }), -/* 1 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__counter__ = __webpack_require__(3); -/* global document */ - - - -var counter = new __WEBPACK_IMPORTED_MODULE_0__counter__["a" /* default */]({ - target: document.querySelector('#counter') -}); - -document.querySelector('#reset-counter').addEventListener('click', function () { - counter.set({ count: 0 }); -}); - -/***/ }), -/* 2 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony export (immutable) */ __webpack_exports__["a"] = hello; - -function hello(name) { - return "Hello " + name; -} - -/***/ }), -/* 3 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__header__ = __webpack_require__(4); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__ = __webpack_require__(0); - - - - -var template = function () { - return { - data: function data() { - return { - count: 0 - }; - }, - - components: { - Header: __WEBPACK_IMPORTED_MODULE_0__header__["a" /* default */] - } - }; -}(); - -function renderMainFragment(root, component) { - var header_initialData = { - dude: "walt" - }; - - if ('count' in root) header_initialData.count = root.count; - var header = new template.components.Header({ - target: null, - _root: component._root || component, - data: header_initialData - }); - - var header_updating = false; - - component._bindings.push(function () { - if (header._torndown) return; - header.observe('count', function (value) { - header_updating = true; - component._set({ count: value }); - header_updating = false; - }); - }); - - header._context = { - root: root - }; - - var text = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])("\n\n"); - - var p = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["b" /* createElement */])('p'); - - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["c" /* appendNode */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])("Count: "), p); - var last_text2 = root.count; - var text2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])(last_text2); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["c" /* appendNode */])(text2, p); - var text3 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])("\n"); - - var button = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["b" /* createElement */])('button'); - - function clickHandler(event) { - var root = this.__svelte.root; - - component.set({ count: root.count + 1 }); - } - - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["d" /* addEventListener */])(button, 'click', clickHandler); - - button.__svelte = { - root: root - }; - - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["c" /* appendNode */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])("+1"), button); - - return { - mount: function mount(target, anchor) { - header._fragment.mount(target, anchor); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["e" /* insertNode */])(text, target, anchor); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["e" /* insertNode */])(p, target, anchor); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["e" /* insertNode */])(text3, target, anchor); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["e" /* insertNode */])(button, target, anchor); - }, - - update: function update(changed, root) { - var __tmp; - - if (!header_updating && 'count' in changed) { - header._set({ count: root.count }); - } - - header._context.root = root; - - if ((__tmp = root.count) !== last_text2) { - text2.data = last_text2 = __tmp; - } - - button.__svelte.root = root; - }, - - teardown: function teardown(detach) { - header.destroy(detach); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["f" /* removeEventListener */])(button, 'click', clickHandler); - - if (detach) { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["g" /* detachNode */])(text); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["g" /* detachNode */])(p); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["g" /* detachNode */])(text3); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["g" /* detachNode */])(button); - } - } - }; -} - -function Counter(options) { - options = options || {}; - this._state = Object.assign(template.data(), options.data); - - this._observers = { - pre: Object.create(null), - post: Object.create(null) - }; - - this._handlers = Object.create(null); - - this._root = options._root; - this._yield = options._yield; - - this._torndown = false; - this._renderHooks = []; - - this._bindings = []; - this._fragment = renderMainFragment(this._state, this); - if (options.target) this._fragment.mount(options.target, null); - while (this._bindings.length) { - this._bindings.pop()(); - }this._flush(); -} - -Counter.prototype = Object.assign({}, __WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["h" /* proto */]); - -Counter.prototype._set = function _set(newState) { - var oldState = this._state; - this._state = Object.assign({}, oldState, newState); - - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["i" /* dispatchObservers */])(this, this._observers.pre, newState, oldState); - if (this._fragment) this._fragment.update(newState, this._state); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["i" /* dispatchObservers */])(this, this._observers.post, newState, oldState); - - while (this._bindings.length) { - this._bindings.pop()(); - }this._flush(); -}; - -Counter.prototype.teardown = Counter.prototype.destroy = function destroy(detach) { - this.fire('destroy'); - - this._fragment.teardown(detach !== false); - this._fragment = null; - - this._state = {}; - this._torndown = true; -}; - -/* harmony default export */ __webpack_exports__["a"] = Counter; - -/***/ }), -/* 4 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__helpers__ = __webpack_require__(2); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__ = __webpack_require__(0); -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - - - - - -function applyComputations(state, newState, oldState, isInitial) { - if (isInitial || 'dude' in newState && _typeof(state.dude) === 'object' || state.dude !== oldState.dude) { - state.salutation = newState.salutation = template.computed.salutation(state.dude); - } -} - -var template = function () { - return { - data: function data() { - return { - dude: 'Unknown', - count: 0 - }; - }, - - computed: { - salutation: function salutation(dude) { - return __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_0__helpers__["a" /* hello */])(dude); - } - } - }; -}(); - -function renderMainFragment(root, component) { - var h1 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["b" /* createElement */])('h1'); - - var last_text = root.salutation; - var text = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])(last_text); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["c" /* appendNode */])(text, h1); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["c" /* appendNode */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])(", counted to "), h1); - var last_text2 = root.count; - var text2 = __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])(last_text2); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["c" /* appendNode */])(text2, h1); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["c" /* appendNode */])(__webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["a" /* createText */])(" already!"), h1); - - return { - mount: function mount(target, anchor) { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["e" /* insertNode */])(h1, target, anchor); - }, - - update: function update(changed, root) { - var __tmp; - - if ((__tmp = root.salutation) !== last_text) { - text.data = last_text = __tmp; - } - - if ((__tmp = root.count) !== last_text2) { - text2.data = last_text2 = __tmp; - } - }, - - teardown: function teardown(detach) { - if (detach) { - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["g" /* detachNode */])(h1); - } - } - }; -} - -function Header(options) { - options = options || {}; - this._state = Object.assign(template.data(), options.data); - applyComputations(this._state, this._state, {}, true); - - this._observers = { - pre: Object.create(null), - post: Object.create(null) - }; - - this._handlers = Object.create(null); - - this._root = options._root; - this._yield = options._yield; - - this._torndown = false; - - this._fragment = renderMainFragment(this._state, this); - if (options.target) this._fragment.mount(options.target, null); -} - -Header.prototype = Object.assign({}, __WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["h" /* proto */]); - -Header.prototype._set = function _set(newState) { - var oldState = this._state; - this._state = Object.assign({}, oldState, newState); - applyComputations(this._state, newState, oldState, false); - - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["i" /* dispatchObservers */])(this, this._observers.pre, newState, oldState); - if (this._fragment) this._fragment.update(newState, this._state); - __webpack_require__.i(__WEBPACK_IMPORTED_MODULE_1_svelte_shared_js__["i" /* dispatchObservers */])(this, this._observers.post, newState, oldState); -}; - -Header.prototype.teardown = Header.prototype.destroy = function destroy(detach) { - this.fire('destroy'); - - this._fragment.teardown(detach !== false); - this._fragment = null; - - this._state = {}; - this._torndown = true; -}; - -/* harmony default export */ __webpack_exports__["a"] = Header; - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __webpack_require__) { - -module.exports = __webpack_require__(1); - - -/***/ }) -/******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2Z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RhKCkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgY291bnQ6IDBcbiAgICAgIH07XG4gICAgfSxcbiAgICBjb21wb25lbnRzOiB7XG4gICAgICBIZWFkZXJcbiAgICB9XG4gIH07XG48L3NjcmlwdD5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvY291bnRlci5odG1sIiwiPGgxPnt7IHNhbHV0YXRpb24gfX0sIGNvdW50ZWQgdG8ge3sgY291bnQgfX0gYWxyZWFkeSE8L2gxPlxuXG48c2NyaXB0PlxuICBpbXBvcnQgeyBoZWxsbyB9IGZyb20gJy4vaGVscGVycyc7XG5cbiAgZXhwb3J0IGRlZmF1bHQge1xuICAgIGRhdGEoKSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICBkdWRlOiAnVW5rbm93bicsXG4gICAgICAgIGNvdW50OiAwXG4gICAgICB9XG4gICAgfSxcbiAgICBjb21wdXRlZDoge1xuICAgICAgc2FsdXRhdGlvbihkdWRlKSB7XG4gICAgICAgIHJldHVybiBoZWxsbyhkdWRlKTtcbiAgICAgIH1cbiAgICB9XG4gIH07XG48L3NjcmlwdD5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvaGVhZGVyLmh0bWwiXSwic291cmNlUm9vdCI6IiJ9 \ No newline at end of file diff --git a/example/webpack2/src/counter.html b/example/webpack2/src/counter.html deleted file mode 100644 index b1afb5ff..00000000 --- a/example/webpack2/src/counter.html +++ /dev/null @@ -1,19 +0,0 @@ -Count: {{count}}
- - - \ No newline at end of file diff --git a/example/webpack2/src/header.html b/example/webpack2/src/header.html deleted file mode 100644 index 40a8e112..00000000 --- a/example/webpack2/src/header.html +++ /dev/null @@ -1,19 +0,0 @@ -