diff --git a/README.md b/README.md index 7684370..041b618 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ Built with [Vue.js](http://vuejs.org) and the official [HackerNews API](https://github.com/HackerNews/API), with routing, comments, comment folding, user profile & realtime updates. -The build setup uses Browserify and the [Vueify](https://github.com/vuejs/vueify) transform, which enables Vue components to be written in a format that encapsulates a component's style, template and logic in a single file. +The build setup uses Webpack and the [Vue Loader](https://github.com/vuejs/vue-loader) plugin, which enables Vue components to be written in a format that encapsulates a component's style, template and logic in a single file. ### Building @@ -14,4 +14,4 @@ npm install npm run dev # build: npm run build -``` \ No newline at end of file +``` diff --git a/build/build.js b/build/build.js index 6dd76aa..e35d722 100644 --- a/build/build.js +++ b/build/build.js @@ -1,9179 +1,9523 @@ -(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 7)) { - // At least for now HTML5 history is available for 'modern' browsers only - if (this.history === true) { - // There is an old bug in Chrome that causes onpopstate to fire even - // upon initial page load. Since the handler is run manually in init(), - // this would cause Chrome to run it twise. Currently the only - // workaround seems to be to set the handler after the initial page load - // http://code.google.com/p/chromium/issues/detail?id=63040 - setTimeout(function() { - window.onpopstate = onchange; - }, 500); - } - else { - window.onhashchange = onchange; - } - this.mode = 'modern'; - } - else { - // - // IE support, based on a concept by Erik Arvidson ... - // - var frame = document.createElement('iframe'); - frame.id = 'state-frame'; - frame.style.display = 'none'; - document.body.appendChild(frame); - this.writeFrame(''); - - if ('onpropertychange' in document && 'attachEvent' in document) { - document.attachEvent('onpropertychange', function () { - if (event.propertyName === 'location') { - self.check(); - } - }); - } - - window.setInterval(function () { self.check(); }, 50); - - this.onHashChanged = onchange; - this.mode = 'legacy'; - } - - Router.listeners.push(fn); - - return this.mode; - }, - - destroy: function (fn) { - if (!Router || !Router.listeners) { - return; - } - - var listeners = Router.listeners; - - for (var i = listeners.length - 1; i >= 0; i--) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - } - } - }, - - setHash: function (s) { - // Mozilla always adds an entry to the history - if (this.mode === 'legacy') { - this.writeFrame(s); - } - - if (this.history === true) { - window.history.pushState({}, document.title, s); - // Fire an onpopstate event manually since pushing does not obviously - // trigger the pop event. - this.fire(); - } else { - dloc.hash = (s[0] === '/') ? s : '/' + s; - } - return this; - }, - - writeFrame: function (s) { - // IE support... - var f = document.getElementById('state-frame'); - var d = f.contentDocument || f.contentWindow.document; - d.open(); - d.write("