From e0641e1e510d29bb587f267135a1e68f77a4e44d Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Thu, 10 Nov 2016 12:33:52 +0100 Subject: [PATCH 1/4] generator --- bin/nuxt | 3 ++- bin/nuxt-generate | 29 +++++++++++++++++++++++++ lib/generate.js | 54 +++++++++++++++++++++++++++++++++++++++++++++++ lib/nuxt.js | 3 +++ package.json | 1 + 5 files changed, 89 insertions(+), 1 deletion(-) create mode 100755 bin/nuxt-generate create mode 100644 lib/generate.js diff --git a/bin/nuxt b/bin/nuxt index c12f2f3e38..4ec27a0e79 100755 --- a/bin/nuxt +++ b/bin/nuxt @@ -8,7 +8,8 @@ const commands = new Set([ defaultCommand, 'init', 'build', - 'start' + 'start', + 'generate' ]) let cmd = process.argv[2] diff --git a/bin/nuxt-generate b/bin/nuxt-generate new file mode 100755 index 0000000000..a7daf45f49 --- /dev/null +++ b/bin/nuxt-generate @@ -0,0 +1,29 @@ +#!/usr/bin/env node + +const fs = require('fs') +const Nuxt = require('../') +const { resolve } = require('path') + +const rootDir = resolve(process.argv.slice(2)[0] || '.') +const nuxtConfigFile = resolve(rootDir, 'nuxt.config.js') +let options = {} +if (fs.existsSync(nuxtConfigFile)) { + options = require(nuxtConfigFile) +} +if (typeof options.rootDir !== 'string') { + options.rootDir = rootDir +} + +options.build = true // Enable building +options.dev = false // Force production mode (no webpack middlewares called) + +console.log('[nuxt] Generating...') +new Nuxt(options) +.then((nuxt) => nuxt.generate()) +.then(() => { + console.log('[nuxt] Generate done') +}) +.catch((err) => { + console.error(err) + process.exit() +}) diff --git a/lib/generate.js b/lib/generate.js new file mode 100644 index 0000000000..91d9e170fd --- /dev/null +++ b/lib/generate.js @@ -0,0 +1,54 @@ +'use strict' + +// const fs = require('fs') +const { ncp } = require('ncp') +// const debug = require('debug')('nuxt:generate') +const _ = require('lodash') +const { resolve } = require('path') + +const defaults = { + dir: 'dist', + routeParams: {} +} + +module.exports = function * () { + /* + ** Set variables + */ + this.options.generate = _.defaultsDeep(this.options.generate, defaults) + var srcStaticPath = resolve(this.dir, 'static') + var srcBuiltPath = resolve(this.dir, '.nuxt', 'dist') + var distPath = resolve(this.dir, this.options.generate.dir) + var distNuxtPath = resolve(distPath, '_nuxt') + /* + ** Copy static and built files + */ + ncp(srcStaticPath, distNuxtPath, function (err) { + if (err) { + return console.log(err) + } + console.log('[nuxt] Static files copied') + }) + ncp(srcBuiltPath, distNuxtPath, function (err) { + if (err) { + return console.log(err) + } + console.log('[nuxt] Built files copied') + }) + /* + ** Generate html files from routes + */ + var promises = [] + this.options.routes.forEach((route) => { + var promise = this.renderRoute(route.path).then((html) => { + return { + path: route.path, + html + } + }) + promises.push(promise) + }) + // Promise.all(promises).then((page) => { + // verifier erreur + // }) +} diff --git a/lib/nuxt.js b/lib/nuxt.js index 92014d4dbd..21168b043e 100644 --- a/lib/nuxt.js +++ b/lib/nuxt.js @@ -8,6 +8,7 @@ const pify = require('pify') const ansiHTML = require('ansi-html') const serialize = require('serialize-javascript') const build = require('./build') +const generate = require('./generate') const serveStatic = require('serve-static') const { resolve, join } = require('path') const { encodeHtml, getContext, setAnsiColors } = require('./utils') @@ -48,6 +49,8 @@ class Nuxt { this.serveStatic = pify(serveStatic(resolve(this.dir, '.nuxt', 'dist'))) // Add this.build this.build = build.bind(this) + // Add this.generate + this.generate = generate.bind(this) // Launch build and set this.renderer return co(this.build) .then(() => { diff --git a/package.json b/package.json index fa4e6643d0..1f15d5880f 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ "lodash": "^4.16.6", "lru-cache": "^4.0.1", "mkdirp-then": "^1.2.0", + "ncp": "^2.0.0", "pify": "^2.3.0", "serialize-javascript": "^1.3.0", "serve-static": "^1.11.1", From 06694e32ceba74d9c8d9f97746ce8e6e32f8b416 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Thu, 10 Nov 2016 13:24:20 +0100 Subject: [PATCH 2/4] generator done --- .../hello-world/dist/_nuxt/0.nuxt.bundle.js | 1 + .../hello-world/dist/_nuxt/1.nuxt.bundle.js | 1 + .../hello-world/dist/_nuxt/nuxt.bundle.js | 1 + .../hello-world/dist/_nuxt/server-bundle.js | 796 ++++++++++++++++++ examples/hello-world/dist/_nuxt/style.css | 2 + examples/hello-world/dist/_nuxt/style.css.map | 1 + .../hello-world/dist/_nuxt/vendor.bundle.js | 14 + examples/hello-world/dist/about.html | 13 + examples/hello-world/dist/index.html | 13 + examples/hello-world/dist/nuxt.png | Bin 0 -> 4980 bytes lib/generate.js | 77 +- package.json | 2 +- 12 files changed, 887 insertions(+), 34 deletions(-) create mode 100644 examples/hello-world/dist/_nuxt/0.nuxt.bundle.js create mode 100644 examples/hello-world/dist/_nuxt/1.nuxt.bundle.js create mode 100644 examples/hello-world/dist/_nuxt/nuxt.bundle.js create mode 100644 examples/hello-world/dist/_nuxt/server-bundle.js create mode 100644 examples/hello-world/dist/_nuxt/style.css create mode 100644 examples/hello-world/dist/_nuxt/style.css.map create mode 100644 examples/hello-world/dist/_nuxt/vendor.bundle.js create mode 100644 examples/hello-world/dist/about.html create mode 100644 examples/hello-world/dist/index.html create mode 100644 examples/hello-world/dist/nuxt.png diff --git a/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js b/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js new file mode 100644 index 0000000000..b49e1ebd91 --- /dev/null +++ b/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js @@ -0,0 +1 @@ +webpackJsonp([0],{24:function(t,n,e){var o,r;e(27);var i=e(29);r=o=o||{},"object"!=typeof o.default&&"function"!=typeof o.default||(r=o=o.default),"function"==typeof r&&(r=r.options),r.render=i.render,r.staticRenderFns=i.staticRenderFns,r._scopeId="data-v-d30325b8",t.exports=o},27:function(t,n){},29:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/"}},["Home"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/static/nuxt.png"}})},function(){with(this)return _h("h2",["About"])}]}}}); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js b/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js new file mode 100644 index 0000000000..48472e5694 --- /dev/null +++ b/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js @@ -0,0 +1 @@ +webpackJsonp([1],{25:function(t,n,e){var o,r;e(26);var i=e(28);r=o=o||{},"object"!=typeof o.default&&"function"!=typeof o.default||(r=o=o.default),"function"==typeof r&&(r=r.options),r.render=i.render,r.staticRenderFns=i.staticRenderFns,r._scopeId="data-v-9393702e",t.exports=o},26:function(t,n){},28:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/about"}},["About"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/static/nuxt.png"}})},function(){with(this)return _h("h2",["Hello World."])}]}}}); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/nuxt.bundle.js b/examples/hello-world/dist/_nuxt/nuxt.bundle.js new file mode 100644 index 0000000000..37ff6c0b27 --- /dev/null +++ b/examples/hello-world/dist/_nuxt/nuxt.bundle.js @@ -0,0 +1 @@ +webpackJsonp([2],[,,,,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.router=e.app=void 0;var o=Object.assign||function(t){for(var e=1;e95&&t.finish()},100),this},set:function(t){return this.show=!0,this.canSuccess=!0,this.percent=Math.floor(t),this},get:function(){return Math.floor(this.percent)},increase:function(t){return this.percent=this.percent+Math.floor(t),this},decrease:function(){return this.percent=this.percent-Math.floor(num),this},finish:function(){return this.percent=100,this.hide(),this},pause:function(){return clearInterval(this._timer),this},hide:function(){var t=this;return clearInterval(this._timer),this._timer=null,setTimeout(function(){t.show=!1,r.nextTick(function(){setTimeout(function(){t.percent=0},200)})},500),this},fail:function(){return this.canSuccess=!1,this.percent=100,this.hide(),this}}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:["error"]}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=r(o),a=n(4),s=r(a),u=n(3),c=r(u);i.default.use(s.default),i.default.use(c.default);var f=function(){return n.e(0).then(n.bind(null,24))},d=function(){return n.e(1).then(n.bind(null,25))},l=function(t,e,n){if(n)return n;var r={x:0,y:0};return t.hash&&(r={selector:t.hash}),r};e.default=new s.default({mode:"history",scrollBehavior:l,routes:[{path:"/about",component:f},{path:"/",component:d}]})},function(t,e){},function(t,e){},function(t,e,n){var r,o;r=n(8);var i=n(19);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,t.exports=r},function(t,e,n){var r,o;n(12),r=n(9);var i=n(17);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,o._scopeId="data-v-3223f20f",t.exports=r},function(t,e,n){var r,o;n(13),r=n(10);var i=n(18);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,o._scopeId="data-v-51a55454",t.exports=r},function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"progress",style:{width:percent+"%",height:height,"background-color":canSuccess?color:failedColor,opacity:show?1:0}})},staticRenderFns:[]}},function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"error-page"},[_h("div",[_h("h1",{staticClass:"error-code"},[_s(error.statusCode)])," ",_h("div",{staticClass:"error-wrapper-message"},[_h("h2",{staticClass:"error-message"},[_s(error.message)])])," ",404===error.statusCode?_h("p",[_h("router-link",{staticClass:"error-link",attrs:{to:"/"}},["Back to the home page"])]):_e()])])},staticRenderFns:[]}},function(module,exports){module.exports={render:function(){with(this)return _h("div",{attrs:{id:"app"}},[_h("nuxt-loading",{ref:"loading"})," ",err?_e():_h("router-view")," ",err?_h("nuxt-error",{attrs:{error:err}}):_e()])},staticRenderFns:[]}},,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){var r=this,o=(0,c.flatMapComponents)(t,function(t,e,n,r){return"function"!=typeof t||t.options?t:new Promise(function(e,o){var i=function(t){n.components[r]=t,e(t)};t().then(i).catch(o)})});this.$loading.start&&this.$loading.start(),Promise.all(o).then(function(){return n()}).catch(function(t){r.error({statusCode:500,message:t.message}),n(!1)})}function i(t,e,n){var r=this,o=(0,c.getMatchedComponents)(t);return o.length?(o.forEach(function(t){if(t._data||(t._data=t.data||f),t._Ctor&&t._Ctor.options){t.fetch=t._Ctor.options.fetch;var e=t._data.toString().replace(/\s/g,""),n=(t.data||f).toString().replace(/\s/g,""),r=(t._Ctor.options.data||f).toString().replace(/\s/g,"");r!==e&&r!==n&&(t._data=t._Ctor.options.data||f)}}),this.error(),void Promise.all(o.map(function(e){var n=[],o=(0,c.getContext)({to:t,isClient:!0});if(e._data&&"function"==typeof e._data){var i=e._data(o);i instanceof Promise||(i=Promise.resolve(i)),i.then(function(t){e.data=function(){return t},e._Ctor&&e._Ctor.options&&(e._Ctor.options.data=e.data),r.$loading.start&&r.$loading.increase(30)}),n.push(i)}if(e.fetch){var a=e.fetch(o);a instanceof Promise||(a=Promise.resolve(a)),a.then(function(){return r.$loading.increase&&r.$loading.increase(30)}),n.push(a)}return Promise.all(n)})).then(function(){r.$loading.finish&&r.$loading.finish(),n()}).catch(function(t){r.error(t),n(!1)})):(this.error({statusCode:404,message:"This page could not be found.",url:t.path}),n())}var a=n(0),s=r(a),u=n(6),c=n(7);n(2).polyfill(),n(1).polyfill();var f=function(){return{}},d=window.__NUXT__||{};if(!d)throw new Error("[nuxt.js] cannot find the global variable __NUXT__, make sure the server is working.");var l=(0,c.getLocation)(u.router.options.base),h=(0,c.flatMapComponents)(u.router.match(l),function(t,e,n,r,o){return"function"!=typeof t||t.options?t:new Promise(function(e,i){var a=function(t){t.data&&"function"==typeof t.data&&(t._data=t.data,t.data=function(){return d.data[o]},t._Ctor&&t._Ctor.options&&(t._Ctor.options.data=t.data)),n.components[r]=t,e(t)};t().then(a).catch(i)})});Promise.all(h).then(function(t){var e=new s.default(u.app);d.error&&e.error(d.error),e.$mount("#app"),u.router.beforeEach(o.bind(e)),u.router.beforeEach(i.bind(e)),"function"==typeof window.onNuxtReady&&window.onNuxtReady(e)}).catch(function(t){console.error("[nuxt.js] Cannot load components",t)})}],[22]); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/server-bundle.js b/examples/hello-world/dist/_nuxt/server-bundle.js new file mode 100644 index 0000000000..42495a8b63 --- /dev/null +++ b/examples/hello-world/dist/_nuxt/server-bundle.js @@ -0,0 +1,796 @@ +module.exports = +/******/ (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 harmory imports with the correct context +/******/ __webpack_require__.i = function(value) { return value; }; + +/******/ // define getter function for harmory exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ 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 = 21); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports) { + +module.exports = require("vue"); + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.router = exports.app = undefined; + +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // The Vue build version to load with the `import` command +// (runtime-only or standalone) has been set in webpack.base.conf with an alias. + + +var _vue = __webpack_require__(0); + +var _vue2 = _interopRequireDefault(_vue); + +var _router = __webpack_require__(8); + +var _router2 = _interopRequireDefault(_router); + +var _App = __webpack_require__(9); + +var _App2 = _interopRequireDefault(_App); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// create the app instance. +// here we inject the router and store to all child components, +// making them available everywhere as `this.$router` and `this.$store`. +var app = _extends({ + router: _router2.default + +}, _App2.default); + +exports.app = app; +exports.router = _router2.default; + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + +"use strict"; +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getMatchedComponents = getMatchedComponents; +exports.flatMapComponents = flatMapComponents; +exports.getContext = getContext; +exports.getLocation = getLocation; +function getMatchedComponents(route) { + return [].concat.apply([], route.matched.map(function (m) { + return Object.keys(m.components).map(function (key) { + return m.components[key]; + }); + })); +} + +function flatMapComponents(route, fn) { + return Array.prototype.concat.apply([], route.matched.map(function (m, index) { + return Object.keys(m.components).map(function (key) { + return fn(m.components[key], m.instances[key], m, key, index); + }); + })); +} + +function getContext(context) { + var ctx = { + isServer: !!context.isServer, + isClient: !!context.isClient, + + route: context.to ? context.to : context.route + }; + ctx.params = ctx.route.params || {}; + ctx.query = ctx.route.query || {}; + if (context.req) ctx.req = context.req; + if (context.res) ctx.res = context.res; + return ctx; +} + +// Imported from vue-router +function getLocation(base) { + var path = window.location.pathname; + if (base && path.indexOf(base) === 0) { + path = path.slice(base.length); + } + return (path || '/') + window.location.search + window.location.hash; +} + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + +module.exports = require("debug"); + +/***/ }, +/* 4 */ +/***/ function(module, exports) { + +module.exports = require("lodash"); + +/***/ }, +/* 5 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _error = __webpack_require__(13); + +var _error2 = _interopRequireDefault(_error); + +var _Loading = __webpack_require__(10); + +var _Loading2 = _interopRequireDefault(_Loading); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +// +// +// +// +// +// +// +// + +exports.default = { + data: function data() { + return { + err: null + }; + }, + mounted: function mounted() { + this.$loading = this.$refs.loading; + }, + + + methods: { + error: function error(err) { + err = err || null; + this.err = err || null; + + if (this.err && this.$loading && this.$loading.fail) { + this.$loading.fail(); + } + + return this.err; + } + }, + components: { + NuxtError: _error2.default, + NuxtLoading: _Loading2.default + } +}; + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// +// +// +// +// +// +// +// +// + +var Vue = __webpack_require__(0); + +exports.default = { + data: function data() { + return { + percent: 0, + show: false, + canSuccess: true, + duration: 5000, + height: '2px', + color: 'black', + failedColor: 'red' + }; + }, + + methods: { + start: function start() { + var _this = this; + + this.show = true; + this.canSuccess = true; + if (this._timer) { + clearInterval(this._timer); + this.percent = 0; + } + this._cut = 10000 / Math.floor(this.duration); + this._timer = setInterval(function () { + _this.increase(_this._cut * Math.random()); + if (_this.percent > 95) { + _this.finish(); + } + }, 100); + return this; + }, + set: function set(num) { + this.show = true; + this.canSuccess = true; + this.percent = Math.floor(num); + return this; + }, + get: function get() { + return Math.floor(this.percent); + }, + increase: function increase(num) { + this.percent = this.percent + Math.floor(num); + return this; + }, + decrease: function decrease() { + this.percent = this.percent - Math.floor(num); + return this; + }, + finish: function finish() { + this.percent = 100; + this.hide(); + return this; + }, + pause: function pause() { + clearInterval(this._timer); + return this; + }, + hide: function hide() { + var _this2 = this; + + clearInterval(this._timer); + this._timer = null; + setTimeout(function () { + _this2.show = false; + Vue.nextTick(function () { + setTimeout(function () { + _this2.percent = 0; + }, 200); + }); + }, 500); + return this; + }, + fail: function fail() { + this.canSuccess = false; + this.percent = 100; + this.hide(); + return this; + } + } +}; + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + +"use strict"; +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +// +// +// +// +// +// +// +// +// +// +// +// + +exports.default = { + props: ['error'] +}; + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _vue = __webpack_require__(0); + +var _vue2 = _interopRequireDefault(_vue); + +var _vueRouter = __webpack_require__(20); + +var _vueRouter2 = _interopRequireDefault(_vueRouter); + +var _vueMeta = __webpack_require__(19); + +var _vueMeta2 = _interopRequireDefault(_vueMeta); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +_vue2.default.use(_vueRouter2.default); +_vue2.default.use(_vueMeta2.default); + +var _d30325b8 = false ? function () { + return System.import('/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/about.vue'); +} : __webpack_require__(11); + +var _9393702e = false ? function () { + return System.import('/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/index.vue'); +} : __webpack_require__(12); + +var scrollBehavior = function scrollBehavior(to, from, savedPosition) { + if (savedPosition) { + // savedPosition is only available for popstate navigations. + return savedPosition; + } else { + // Scroll to the top by default + var position = { x: 0, y: 0 }; + // if link has anchor, scroll to anchor by returning the selector + if (to.hash) { + position = { selector: to.hash }; + } + return position; + } +}; + +exports.default = new _vueRouter2.default({ + mode: 'history', + scrollBehavior: scrollBehavior, + routes: [{ + path: '/about', + component: _d30325b8 + }, { + path: '/', + component: _9393702e + }] +}); + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + +var __vue_exports__, __vue_options__ +var __vue_styles__ = {} + +/* script */ +__vue_exports__ = __webpack_require__(5) + +/* template */ +var __vue_template__ = __webpack_require__(17) +__vue_options__ = __vue_exports__ = __vue_exports__ || {} +if ( + typeof __vue_exports__.default === "object" || + typeof __vue_exports__.default === "function" +) { +if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} +__vue_options__ = __vue_exports__ = __vue_exports__.default +} +if (typeof __vue_options__ === "function") { + __vue_options__ = __vue_options__.options +} +__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/.nuxt/App.vue" +__vue_options__.render = __vue_template__.render +__vue_options__.staticRenderFns = __vue_template__.staticRenderFns +if (__vue_options__.functional) {console.error("[vue-loader] App.vue: functional components are not supported and should be defined in plain js files using render functions.")} + +module.exports = __vue_exports__ + + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + +var __vue_exports__, __vue_options__ +var __vue_styles__ = {} + +/* styles */ + +/* script */ +__vue_exports__ = __webpack_require__(6) + +/* template */ +var __vue_template__ = __webpack_require__(14) +__vue_options__ = __vue_exports__ = __vue_exports__ || {} +if ( + typeof __vue_exports__.default === "object" || + typeof __vue_exports__.default === "function" +) { +if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} +__vue_options__ = __vue_exports__ = __vue_exports__.default +} +if (typeof __vue_options__ === "function") { + __vue_options__ = __vue_options__.options +} +__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/.nuxt/components/Loading.vue" +__vue_options__.render = __vue_template__.render +__vue_options__.staticRenderFns = __vue_template__.staticRenderFns +__vue_options__._scopeId = "data-v-3223f20f" +if (__vue_options__.functional) {console.error("[vue-loader] Loading.vue: functional components are not supported and should be defined in plain js files using render functions.")} + +module.exports = __vue_exports__ + + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + +var __vue_exports__, __vue_options__ +var __vue_styles__ = {} + +/* styles */ + +/* template */ +var __vue_template__ = __webpack_require__(18) +__vue_options__ = __vue_exports__ = __vue_exports__ || {} +if ( + typeof __vue_exports__.default === "object" || + typeof __vue_exports__.default === "function" +) { +if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} +__vue_options__ = __vue_exports__ = __vue_exports__.default +} +if (typeof __vue_options__ === "function") { + __vue_options__ = __vue_options__.options +} +__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/about.vue" +__vue_options__.render = __vue_template__.render +__vue_options__.staticRenderFns = __vue_template__.staticRenderFns +__vue_options__._scopeId = "data-v-d30325b8" +if (__vue_options__.functional) {console.error("[vue-loader] about.vue: functional components are not supported and should be defined in plain js files using render functions.")} + +module.exports = __vue_exports__ + + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + +var __vue_exports__, __vue_options__ +var __vue_styles__ = {} + +/* styles */ + +/* template */ +var __vue_template__ = __webpack_require__(16) +__vue_options__ = __vue_exports__ = __vue_exports__ || {} +if ( + typeof __vue_exports__.default === "object" || + typeof __vue_exports__.default === "function" +) { +if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} +__vue_options__ = __vue_exports__ = __vue_exports__.default +} +if (typeof __vue_options__ === "function") { + __vue_options__ = __vue_options__.options +} +__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/index.vue" +__vue_options__.render = __vue_template__.render +__vue_options__.staticRenderFns = __vue_template__.staticRenderFns +__vue_options__._scopeId = "data-v-9393702e" +if (__vue_options__.functional) {console.error("[vue-loader] index.vue: functional components are not supported and should be defined in plain js files using render functions.")} + +module.exports = __vue_exports__ + + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + +var __vue_exports__, __vue_options__ +var __vue_styles__ = {} + +/* styles */ + +/* script */ +__vue_exports__ = __webpack_require__(7) + +/* template */ +var __vue_template__ = __webpack_require__(15) +__vue_options__ = __vue_exports__ = __vue_exports__ || {} +if ( + typeof __vue_exports__.default === "object" || + typeof __vue_exports__.default === "function" +) { +if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} +__vue_options__ = __vue_exports__ = __vue_exports__.default +} +if (typeof __vue_options__ === "function") { + __vue_options__ = __vue_options__.options +} +__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/pages/_error.vue" +__vue_options__.render = __vue_template__.render +__vue_options__.staticRenderFns = __vue_template__.staticRenderFns +__vue_options__._scopeId = "data-v-51a55454" +if (__vue_options__.functional) {console.error("[vue-loader] _error.vue: functional components are not supported and should be defined in plain js files using render functions.")} + +module.exports = __vue_exports__ + + +/***/ }, +/* 14 */ +/***/ function(module, exports) { + +module.exports={render:function (){with(this) { + return _h('div', { + staticClass: "progress", + style: ({ + 'width': percent + '%', + 'height': height, + 'background-color': canSuccess ? color : failedColor, + 'opacity': show ? 1 : 0 + }) + }) +}},staticRenderFns: []} + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + +module.exports={render:function (){with(this) { + return _h('div', { + staticClass: "error-page" + }, [_h('div', [_h('h1', { + staticClass: "error-code" + }, [_s(error.statusCode)]), " ", _h('div', { + staticClass: "error-wrapper-message" + }, [_h('h2', { + staticClass: "error-message" + }, [_s(error.message)])]), " ", (error.statusCode === 404) ? _h('p', [_h('router-link', { + staticClass: "error-link", + attrs: { + "to": "/" + } + }, ["Back to the home page"])]) : _e()])]) +}},staticRenderFns: []} + +/***/ }, +/* 16 */ +/***/ function(module, exports) { + +module.exports={render:function (){with(this) { + return _h('div', { + staticClass: "container" + }, [_m(0), " ", _m(1), " ", _h('p', [_h('router-link', { + attrs: { + "to": "/about" + } + }, ["About"])])]) +}},staticRenderFns: [function (){with(this) { + return _h('img', { + attrs: { + "src": "/static/nuxt.png" + } + }) +}},function (){with(this) { + return _h('h2', ["Hello World."]) +}}]} + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + +module.exports={render:function (){with(this) { + return _h('div', { + attrs: { + "id": "app" + } + }, [_h('nuxt-loading', { + ref: "loading" + }), " ", (!err) ? _h('router-view') : _e(), " ", (err) ? _h('nuxt-error', { + attrs: { + "error": err + } + }) : _e()]) +}},staticRenderFns: []} + +/***/ }, +/* 18 */ +/***/ function(module, exports) { + +module.exports={render:function (){with(this) { + return _h('div', { + staticClass: "container" + }, [_m(0), " ", _m(1), " ", _h('p', [_h('router-link', { + attrs: { + "to": "/" + } + }, ["Home"])])]) +}},staticRenderFns: [function (){with(this) { + return _h('img', { + attrs: { + "src": "/static/nuxt.png" + } + }) +}},function (){with(this) { + return _h('h2', ["About"]) +}}]} + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + +module.exports = require("vue-meta"); + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + +module.exports = require("vue-router"); + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + +"use strict"; +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); + +var _vue = __webpack_require__(0); + +var _vue2 = _interopRequireDefault(_vue); + +var _lodash = __webpack_require__(4); + +var _index = __webpack_require__(1); + +var _utils = __webpack_require__(2); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +var debug = __webpack_require__(3)('nuxt:render'); + + +var isDev = false; +var _app = new _vue2.default(_index.app); + +// This exported function will be called by `bundleRenderer`. +// This is where we perform data-prefetching to determine the +// state of our application before actually rendering it. +// Since data fetching is async, this function is expected to +// return a Promise that resolves to the app instance. + +exports.default = function (context) { + // set router's location + _index.router.push(context.url); + + // Add route to the context + context.route = _index.router.currentRoute; + // Add meta infos + context.meta = _app.$meta(); + // Add store to the context + + + // Nuxt object + context.nuxt = { data: [], error: null }; + + // Call data & fecth hooks on components matched by the route. + var Components = (0, _utils.getMatchedComponents)(context.route); + if (!Components.length) { + context.nuxt.error = _app.error({ statusCode: 404, message: 'This page could not be found.', url: context.route.path }); + + return Promise.resolve(_app); + } + return Promise.all(Components.map(function (Component) { + var promises = []; + if (Component.data && typeof Component.data === 'function') { + Component._data = Component.data; + var promise = Component.data((0, _utils.getContext)(context)); + if (!(promise instanceof Promise)) promise = Promise.resolve(promise); + promise.then(function (data) { + Component.data = function () { + return data; + }; + }); + promises.push(promise); + } else { + promises.push(null); + } + if (Component.fetch) { + promises.push(Component.fetch((0, _utils.getContext)(context))); + } + return Promise.all(promises); + })).then(function (res) { + + // datas are the first row of each + context.nuxt.data = res.map(function (tab) { + return tab[0]; + }); + + return _app; + }).catch(function (error) { + context.nuxt.error = _app.error(error); + + return _app; + }); +}; + +/***/ } +/******/ ]); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/style.css b/examples/hello-world/dist/_nuxt/style.css new file mode 100644 index 0000000000..f2b58d12e8 --- /dev/null +++ b/examples/hello-world/dist/_nuxt/style.css @@ -0,0 +1,2 @@ +.container[data-v-d30325b8]{font-family:serif;margin-top:200px;text-align:center}.container[data-v-9393702e]{font-family:sans-serif;margin-top:200px;text-align:center}.error-page[data-v-51a55454]{color:#000;background:#fff;top:0;bottom:0;left:0;right:0;position:absolute;font-family:SF UI Text,Helvetica Neue,Lucida Grande;text-align:center;padding-top:20%}.error-code[data-v-51a55454]{display:inline-block;font-size:24px;font-weight:500;vertical-align:top;border-right:1px solid rgba(0,0,0,.298039);margin:0 20px 0 0;padding:10px 23px}.error-wrapper-message[data-v-51a55454]{display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle}.error-message[data-v-51a55454]{font-size:14px;font-weight:400;margin:0;padding:0}.error-link[data-v-51a55454]{color:#42b983;font-weight:400;text-decoration:none;font-size:14px}.progress[data-v-3223f20f]{position:fixed;top:0;left:0;right:0;height:2px;width:0;transition:width .2s,opacity .4s;opacity:1;background-color:#efc14e;z-index:999999} +/*# sourceMappingURL=style.css.map*/ \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/style.css.map b/examples/hello-world/dist/_nuxt/style.css.map new file mode 100644 index 0000000000..f95a8806b1 --- /dev/null +++ b/examples/hello-world/dist/_nuxt/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":[],"names":[],"mappings":"","file":"style.css","sourceRoot":""} \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/vendor.bundle.js b/examples/hello-world/dist/_nuxt/vendor.bundle.js new file mode 100644 index 0000000000..fa6f3000f4 --- /dev/null +++ b/examples/hello-world/dist/_nuxt/vendor.bundle.js @@ -0,0 +1,14 @@ +!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,i,a){for(var s,u,c,l=0,f=[];l-1)return t.splice(n,1)}}function a(t,e){return rn.call(t,e)}function s(t){return"string"==typeof t||"number"==typeof t}function u(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}function c(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function l(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){return null!==t&&"object"==typeof t}function d(t){return ln.call(t)===fn}function h(t){for(var e={},n=0;n=0&&jn[n].id>t.id;)n--;jn.splice(Math.max(n,Pn)+1,0,t)}else jn.push(t);En||(En=!0,On(C))}}function j(t){Dn.clear(),T(t,Dn)}function T(t,e){var n,r,o=Array.isArray(t);if((o||p(t))&&Object.isExtensible(t)){if(t.__ob__){var i=t.__ob__.dep.id;if(e.has(i))return;e.add(i)}if(o)for(n=t.length;n--;)T(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)T(t[r[n]],e)}}function E(t,e){t.__proto__=e}function S(t,e,n){for(var r=0,o=n.length;r1?l(n):n;for(var r=l(arguments,1),o=0,i=n.length;o-1?dr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:dr[t]=/HTMLUnknownElement/.test(e.toString())}function Zt(t){if("string"==typeof t){if(t=document.querySelector(t),!t)return document.createElement("div")}return t}function Qt(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&"multiple"in e.data.attrs&&n.setAttribute("multiple","multiple"),n)}function te(t,e){return document.createElementNS(cr[t],e)}function ee(t){return document.createTextNode(t)}function ne(t){return document.createComment(t)}function re(t,e,n){t.insertBefore(e,n)}function oe(t,e){t.removeChild(e)}function ie(t,e){t.appendChild(e)}function ae(t){return t.parentNode}function se(t){return t.nextSibling}function ue(t){return t.tagName}function ce(t,e){t.textContent=e}function le(t){return t.childNodes}function fe(t,e,n){t.setAttribute(e,n)}function pe(t,e){var n=t.data.ref;if(n){var r=t.context,o=t.child||t.elm,a=r.$refs;e?Array.isArray(a[n])?i(a[n],o):a[n]===o&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].push(o):a[n]=[o]:a[n]=o}}function de(t){return null==t}function he(t){return null!=t}function ve(t,e){return t.key===e.key&&t.tag===e.tag&&t.isComment===e.isComment&&!t.data==!e.data}function me(t,e,n){var r,o,i={};for(r=e;r<=n;++r)o=t[r].key,he(o)&&(i[o]=r);return i}function ye(t){function e(t){return new Vn(k.tagName(t).toLowerCase(),{},[],void 0,t)}function n(t,e){function n(){0===--n.listeners&&r(t)}return n.listeners=e,n}function r(t){var e=k.parentNode(t);e&&k.removeChild(e,t)}function o(t,e,n){var r,o=t.data;if(t.isRootInsert=!n,he(o)&&(he(r=o.hook)&&he(r=r.init)&&r(t),he(r=t.child)))return c(t,e),t.elm;var a=t.children,s=t.tag;return he(s)?(t.elm=t.ns?k.createElementNS(t.ns,s):k.createElement(s,t),l(t),i(t,a,e),he(o)&&u(t,e)):t.isComment?t.elm=k.createComment(t.text):t.elm=k.createTextNode(t.text),t.elm}function i(t,e,n){if(Array.isArray(e))for(var r=0;rh?(c=de(n[g+1])?null:n[g+1].elm,f(t,c,n,p,g,r)):p>g&&d(t,e,l,h)}function m(t,e,n,r){if(t!==e){if(e.isStatic&&t.isStatic&&e.key===t.key&&(e.isCloned||e.isOnce))return void(e.elm=t.elm);var o,i=e.data,s=he(i);s&&he(o=i.hook)&&he(o=o.prepatch)&&o(t,e);var u=e.elm=t.elm,c=t.children,l=e.children;if(s&&a(e)){for(o=0;o-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+t.getAttribute("class")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Te(t,e){if(e&&e.trim())if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e);else{for(var n=" "+t.getAttribute("class")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");t.setAttribute("class",n.trim())}}function Ee(t){Nr(function(){Nr(t)})}function Se(t,e){(t._transitionClasses||(t._transitionClasses=[])).push(e),je(t,e)}function Pe(t,e){t._transitionClasses&&i(t._transitionClasses,e),Te(t,e)}function Le(t,e,n){var r=Me(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Sr?Mr:Rr,u=0,c=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++u>=a&&c()};setTimeout(function(){u0&&(n=Sr,l=a,f=i.length):e===Pr?c>0&&(n=Pr,l=c,f=u.length):(l=Math.max(a,c),n=l>0?a>c?Sr:Pr:null,f=n?n===Sr?i.length:u.length:0);var p=n===Sr&&Ir.test(r[Lr+"Property"]);return{type:n,timeout:l,propCount:f,hasTransform:p}}function De(t,e){for(;t.length1,j=e._enterCb=qe(function(){C&&Pe(e,w),j.cancelled?(C&&Pe(e,b),A&&A(e)):O&&O(e),e._enterCb=null});t.data.show||Y(t.data.hook||(t.data.hook={}),"insert",function(){var n=e.parentNode,r=n&&n._pending&&n._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),k&&k(e,j)},"transition-insert"),x&&x(e),C&&(Se(e,b),Se(e,w),Ee(function(){Pe(e,b),j.cancelled||$||Le(e,o,j)})),t.data.show&&k&&k(e,j),C||$||j()}}}function Ie(t,e){function n(){m.cancelled||(t.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[t.key]=t),c&&c(r),h&&(Se(r,s),Se(r,u),Ee(function(){Pe(r,s),m.cancelled||v||Le(r,a,m)})),l&&l(r,m),h||v||m())}var r=t.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var o=Ue(t.data.transition);if(!o)return e();if(!r._leaveCb&&1===r.nodeType){var i=o.css,a=o.type,s=o.leaveClass,u=o.leaveActiveClass,c=o.beforeLeave,l=o.leave,f=o.afterLeave,p=o.leaveCancelled,d=o.delayLeave,h=i!==!1&&!_n,v=l&&(l._length||l.length)>1,m=r._leaveCb=qe(function(){ +r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[t.key]=null),h&&Pe(r,u),m.cancelled?(h&&Pe(r,s),p&&p(r)):(e(),f&&f(r)),r._leaveCb=null});d?d(n):n()}}function Ue(t){if(t){if("object"==typeof t){var e={};return t.css!==!1&&f(e,Ur(t.name||"v")),f(e,t),e}return"string"==typeof t?Ur(t):void 0}}function qe(t){var e=!1;return function(){e||(e=!0,t())}}function Be(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,u=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(y(Fe(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Ve(t,e){for(var n=0,r=e.length;n0,bn=yn&&yn.indexOf("edge/")>0,wn=yn&&yn.indexOf("android")>0,xn=yn&&/iphone|ipad|ipod|ios/.test(yn),kn=mn&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,On=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e,height,hidden,high,href,hreflang,http-equiv,icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,type,usemap,value,width,wrap"),"http://www.w3.org/1999/xlink"),ar=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},sr=function(t){return ar(t)?t.slice(6,t.length):""},ur=function(t){return null==t||t===!1},cr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML",xhtml:"http://www.w3.org/1999/xhtm"},lr=o("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"),fr=(o("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr",!0),o("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source",!0),o("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track",!0),o("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font,font-face,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0)),pr=function(t){return lr(t)||fr(t)},dr=Object.create(null),hr=Object.freeze({createElement:Qt,createElementNS:te,createTextNode:ee,createComment:ne,insertBefore:re,removeChild:oe,appendChild:ie,parentNode:ae,nextSibling:se,tagName:ue,setTextContent:ce,childNodes:le,setAttribute:fe}),vr={create:function(t,e){pe(e)},update:function(t,e){t.data.ref!==e.data.ref&&(pe(t,!0),pe(e))},destroy:function(t){pe(t,!0)}},mr=new Vn("",{},[]),yr=["create","update","remove","destroy"],gr={create:ge,update:ge,destroy:function(t){ge(t,mr)}},_r=Object.create(null),br=[vr,gr],wr={create:xe,update:xe},xr={create:Oe,update:Oe},kr={create:Ae,update:Ae},Or={create:Ce,update:Ce},Ar=/^--/,Cr=function(t,e,n){Ar.test(e)?t.style.setProperty(e,n):t.style[jr(e)]=n},$r=["Webkit","Moz","ms"],jr=u(function(t){if(er=er||document.createElement("div"),t=an(t),"filter"!==t&&t in er.style)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<$r.length;n++){var r=$r[n]+e;if(r in er.style)return r}}),Tr={create:$e,update:$e},Er=mn&&!_n,Sr="transition",Pr="animation",Lr="transition",Mr="transitionend",Dr="animation",Rr="animationend";Er&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Lr="WebkitTransition",Mr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Dr="WebkitAnimation",Rr="webkitAnimationEnd"));var Nr=mn&&window.requestAnimationFrame||setTimeout,Ir=/\b(transform|all)(,|$)/,Ur=u(function(t){return{enterClass:t+"-enter",leaveClass:t+"-leave",appearClass:t+"-enter",enterActiveClass:t+"-enter-active",leaveActiveClass:t+"-leave-active",appearActiveClass:t+"-enter-active"}}),qr=mn?{create:function(t,e){e.data.show||Ne(e)},remove:function(t,e){t.data.show?e():Ie(t,e)}}:{},Br=[wr,xr,kr,Or,Tr,qr],Vr=Br.concat(br),Fr=ye({nodeOps:hr,modules:Vr});_n&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Je(t,"input")});var zr={inserted:function(t,e,n){if("select"===n.tag){var r=function(){Be(t,e,n.context)};r(),(gn||bn)&&setTimeout(r,0)}else"textarea"!==n.tag&&"text"!==t.type||e.modifiers.lazy||(wn||(t.addEventListener("compositionstart",ze),t.addEventListener("compositionend",He)),_n&&(t.vmodel=!0))},componentUpdated:function(t,e,n){if("select"===n.tag){Be(t,e,n.context);var r=t.multiple?e.value.some(function(e){return Ve(e,t.options)}):e.value!==e.oldValue&&Ve(e.value,t.options);r&&Je(t,"change")}}},Hr={bind:function(t,e,n){var r=e.value;n=Ke(n);var o=n.data&&n.data.transition;r&&o&&!_n&&Ne(n);var i="none"===t.style.display?"":t.style.display;t.style.display=r?i:"none",t.__vOriginalDisplay=i},update:function(t,e,n){var r=e.value,o=e.oldValue;if(r!==o){n=Ke(n);var i=n.data&&n.data.transition;i&&!_n?r?(Ne(n),t.style.display=t.__vOriginalDisplay):Ie(n,function(){t.style.display="none"}):t.style.display=r?t.__vOriginalDisplay:"none"}}},Jr={model:zr,show:Hr},Kr={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String},Wr={name:"transition",props:Kr,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag}),n.length)){var r=this.mode,o=n[0];if(Xe(this.$vnode))return o;var i=We(o);if(!i)return o;if(this._leaving)return Ge(t,o);var a=i.key=null==i.key||i.isStatic?"__v"+(i.tag+this._uid)+"__":i.key,s=(i.data||(i.data={})).transition=Ye(this),u=this._vnode,c=We(u);if(i.data.directives&&i.data.directives.some(function(t){return"show"===t.name})&&(i.data.show=!0),c&&c.data&&c.key!==a){var l=c.data.transition=f({},s);if("out-in"===r)return this._leaving=!0,Y(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()},a),Ge(t,o);if("in-out"===r){var p,d=function(){p()};Y(s,"afterEnter",d,a),Y(s,"enterCancelled",d,a),Y(l,"delayLeave",function(t){p=t},a)}}return o}}},Yr=f({tag:String,moveClass:String},Kr);delete Yr.mode;var Gr={props:Yr,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Ye(this),s=0;s=0;c--)n.removeAttribute(a[c]);o.length===a.length?n.removeAttribute(i):n.setAttribute(i,o.join(","))}var i="data-vue-meta",a={},s={};a.install=function(t){function e(){var t,e=this.getMetaInfo(),n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=u(t,e[t]));return n}function u(t,e){switch(t){case"title":return{toString:function(){return"<"+t+" "+i+'="true">'+e+""}};case"htmlAttrs":return{toString:function(){var t,n="";for(t in e)e.hasOwnProperty(t)&&(n+="undefined"!=typeof e[t]?t+'="'+e[t]+'"':t,n+=" ");return n.trim()}}}}function c(){var t=this.getMetaInfo();t.title&&r(t.title),t.htmlAttrs&&o(t.htmlAttrs)}function l(){var e=n(t,this);return e.titleTemplate&&(e.title=e.titleTemplate.replace("%s",e.title)),e}a.install.installed||(a.install.installed=!0,t.mixin({mounted:function(){this.$root.$meta().updateMetaInfo()}}),t.prototype.$meta=function(){return s.getMetaInfo=s.getMetaInfo||t.util.bind(l,this),s.updateMetaInfo=s.updateMetaInfo||c,s.inject=s.inject||e,s})},"undefined"!=typeof Vue&&Vue.use(a),t.exports=a}(this)},function(t,e,n){/** + * vue-router v2.0.1 + * (c) 2016 Evan You + * @license MIT + */ +!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e,n){if("/"===t.charAt(0))return t;if("?"===t.charAt(0)||"#"===t.charAt(0))return e+t;var r=e.split("/");n&&r[r.length-1]||r.pop();for(var o=t.replace(/^\//,"").split("/"),i=0;i=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function n(t){return t.replace(/\/\//g,"/")}function r(t,e){if(!t)throw new Error("[vue-router] "+e)}function o(t,e){t||"undefined"!=typeof console&&console.warn("[vue-router] "+e)}function i(t,e){if(void 0===e&&(e={}),t){var n;try{n=a(t)}catch(t){o(!1,t.message),n={}}for(var r in e)n[r]=e[r];return n}return e}function a(t){var e=Object.create(null);return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=ut(n.shift()),o=n.length>0?ut(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function s(t){var e=t?Object.keys(t).sort().map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return st(e);if(Array.isArray(n)){var r=[];return n.slice().forEach(function(t){void 0!==t&&(null===t?r.push(st(e)):r.push(st(e)+"="+st(t)))}),r.join("&")}return st(e)+"="+st(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function u(t,e,n){var r={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:e.query||{},params:e.params||{},fullPath:l(e),matched:t?c(t):[]};return n&&(r.redirectedFrom=l(n)),Object.freeze(r)}function c(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function l(t){var e=t.path,n=t.query;void 0===n&&(n={});var r=t.hash;return void 0===r&&(r=""),(e||"/")+s(n)+r}function f(t,e){return e===ct?t===e:!!e&&(t.path&&e.path?t.path.replace(lt,"")===e.path.replace(lt,"")&&t.hash===e.hash&&p(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&p(t.query,e.query)&&p(t.params,e.params)))}function p(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){return String(t[n])===String(e[n])})}function d(t,e){return 0===t.path.indexOf(e.path)&&(!e.hash||t.hash===e.hash)&&h(t.query,e.query)}function h(t,e){for(var n in e)if(!(n in t))return!1;return!0}function v(n,r,o){var a="string"==typeof n?{path:n}:n;if(a.name||a._normalized)return a;var s=e(a.path||""),u=r&&r.path||"/",c=s.path?t(s.path,u,o):r&&r.path||"/",l=i(s.query,a.query),f=a.hash||s.hash;return f&&"#"!==f.charAt(0)&&(f="#"+f),{_normalized:!0,path:c,query:l,hash:f}}function m(t){if(t)for(var e,n=0;n=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function q(t){if(!t)if(kt){var e=document.querySelector("base");t=e?e.getAttribute("href"):"/"}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function B(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e:0)+"#"+t)}var at={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,i=e.data;i.routerView=!0;for(var a=o.$route,s=o._routerViewCache||(o._routerViewCache={}),u=0,c=!1;o;)o.$vnode&&o.$vnode.data.routerView&&u++,o._inactive&&(c=!0),o=o.$parent;i.routerViewDepth=u;var l=a.matched[u];if(!l)return t();var f=n.name,p=c?s[f]:s[f]=l.components[f];if(!c){var d=i.hook||(i.hook={});d.init=function(t){l.instances[f]=t.child},d.destroy=function(t){l.instances[f]===t.child&&(l.instances[f]=void 0)}}return t(p,i,r)}},st=encodeURIComponent,ut=decodeURIComponent,ct=u(null,{path:"/"}),lt=/\/$/,ft=[String,Object],pt={name:"router-link",props:{to:{type:ft,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String},render:function(t){var e=this,r=this.$router,o=this.$route,i=v(this.to,o,this.append),a=r.match(i),s=a.redirectedFrom||a.fullPath,c=r.history.base,l=c?n(c+s):s,p={},h=this.activeClass||r.options.linkActiveClass||"router-link-active",y=i.path?u(null,i):a;p[h]=this.exact?f(o,y):d(o,y);var g={click:function(t){t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||0===t.button&&(t.preventDefault(),e.replace?r.replace(i):r.push(i))}},_={class:p};if("a"===this.tag)_.on=g,_.attrs={href:l};else{var b=m(this.$slots.default);if(b){var w=b.data||(b.data={});w.on=g;var x=w.attrs||(w.attrs={});x.href=l}else _.on=g}return t(this.tag,_,this.$slots.default)}},dt=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},ht=dt,vt=S,mt=g,yt=_,gt=x,_t=E,bt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");vt.parse=mt,vt.compile=yt,vt.tokensToFunction=gt,vt.tokensToRegExp=_t;var wt=Object.create(null),xt=Object.create(null),kt="undefined"!=typeof window,Ot=kt&&function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)}(),At=function(t,e){this.router=t,this.base=q(e),this.current=ct,this.pending=null};At.prototype.listen=function(t){this.cb=t},At.prototype.transitionTo=function(t,e){var n=this,r=this.router.match(t,this.current);this.confirmTransition(r,function(){n.updateRoute(r),e&&e(r),n.ensureURL()})},At.prototype.confirmTransition=function(t,e){var n=this,r=this.current;if(f(t,r))return void this.ensureURL();var o=B(this.current.matched,t.matched),i=o.deactivated,a=o.activated,s=[].concat(V(i),this.router.beforeHooks,a.map(function(t){return t.beforeEnter}),H(a));this.pending=t;var u=function(e,o){n.pending===t&&e(t,r,function(t){t===!1?n.ensureURL():"string"==typeof t||"object"==typeof t?n.push(t):o(t)})};U(s,u,function(){var r=[],o=F(a,r,function(){return n.current===t});U(o,u,function(){n.pending===t&&(n.pending=null,e(t),n.router.app.$nextTick(function(){r.forEach(function(t){return t()})}))})})},At.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var Ct=function(){return String(Date.now())},$t=Ct(),jt=function(t){function e(e,n){var r=this;t.call(this,e,n),this.transitionTo(Q(this.base));var o=e.options.scrollBehavior;window.addEventListener("popstate",function(t){$t=t.state&&t.state.key;var e=r.current;r.transitionTo(Q(r.base),function(t){o&&r.handleScroll(t,e,!0)})}),o&&window.addEventListener("scroll",function(){K($t)})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t){var e=this,r=this.current;this.transitionTo(t,function(t){tt(n(e.base+t.fullPath)),e.handleScroll(t,r,!1)})},e.prototype.replace=function(t){var e=this,r=this.current;this.transitionTo(t,function(t){et(n(e.base+t.fullPath)),e.handleScroll(t,r,!1)})},e.prototype.ensureURL=function(){Q(this.base)!==this.current.fullPath&&et(n(this.base+this.current.fullPath))},e.prototype.handleScroll=function(t,e,n){var o=this.router;if(o.app){var i=o.options.scrollBehavior;i&&(r("function"==typeof i,"scrollBehavior must be a function"),o.app.$nextTick(function(){var r=W($t),o=i(t,e,n?r:null);if(o){var a="object"==typeof o;if(a&&"string"==typeof o.selector){var s=document.querySelector(o.selector);s?r=Y(s):G(o)&&(r=X(o))}else a&&G(o)&&(r=X(o));r&&window.scrollTo(r.x,r.y)}}))}},e}(At),Tt=function(t){function e(e,n,r){var o=this;t.call(this,e,n),r&&this.checkFallback()||(nt(),this.transitionTo(rt(),function(){window.addEventListener("hashchange",function(){o.onHashChange()})}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.checkFallback=function(){var t=Q(this.base);if(!/^\/#/.test(t))return window.location.replace(n(this.base+"/#"+t)),!0},e.prototype.onHashChange=function(){nt()&&this.transitionTo(rt(),function(t){it(t.fullPath)})},e.prototype.push=function(t){this.transitionTo(t,function(t){ot(t.fullPath)})},e.prototype.replace=function(t){this.transitionTo(t,function(t){it(t.fullPath)})},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(){rt()!==this.current.fullPath&&it(this.current.fullPath)},e}(At),Et=function(t){function e(e){t.call(this,e),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index+1).concat(t),e.index++})},e.prototype.replace=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index).concat(t)})},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.ensureURL=function(){},e}(At),St=function(t){void 0===t&&(t={}),this.app=null,this.options=t,this.beforeHooks=[],this.afterHooks=[],this.match=D(t.routes||[]);var e=t.mode||"hash";this.fallback="history"===e&&!Ot,this.fallback&&(e="hash"),kt||(e="abstract"),this.mode=e},Pt={currentRoute:{}};return Pt.currentRoute.get=function(){return this.history&&this.history.current},St.prototype.init=function(t){var e=this;r(y.installed,"not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."),this.app=t;var n=this,o=n.mode,i=n.options,a=n.fallback;switch(o){case"history":this.history=new jt(this,i.base);break;case"hash":this.history=new Tt(this,i.base,a);break;case"abstract":this.history=new Et(this);break;default:r(!1,"invalid mode: "+o)}this.history.listen(function(t){e.app._route=t})},St.prototype.beforeEach=function(t){this.beforeHooks.push(t)},St.prototype.afterEach=function(t){this.afterHooks.push(t)},St.prototype.push=function(t){this.history.push(t)},St.prototype.replace=function(t){this.history.replace(t)},St.prototype.go=function(t){this.history.go(t)},St.prototype.back=function(){this.go(-1)},St.prototype.forward=function(){this.go(1)},St.prototype.getMatchedComponents=function(){return this.currentRoute?[].concat.apply([],this.currentRoute.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},Object.defineProperties(St.prototype,Pt),St.install=y,kt&&window.Vue&&window.Vue.use(St),St})},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):m=-1,h.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=h.length;e;){for(d=h,h=[];++m1)for(var n=1;n + + + Untitled + + + +

About

Home

+ + + + + diff --git a/examples/hello-world/dist/index.html b/examples/hello-world/dist/index.html new file mode 100644 index 0000000000..5b3286e422 --- /dev/null +++ b/examples/hello-world/dist/index.html @@ -0,0 +1,13 @@ + + + + Untitled + + + +

Hello World.

About

+ + + + + diff --git a/examples/hello-world/dist/nuxt.png b/examples/hello-world/dist/nuxt.png new file mode 100644 index 0000000000000000000000000000000000000000..a48bda6be88ffd77c1449dbee861885b5bee3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TfjV~&4OH%5E7#Y>m9|lTT3~1Ty6A}mN$Pf2 zkUV9@f!G8fZCC&hQjr}(sHvq_n39o1uu41tJN>1%ak*k|%qK~s-*6PFqzmJ_SSUYUdBGqg1n1uV%Fz1ELkNAhSKpCDOSJQFiA6S+m7!% zj+cNCX9BJDBk%h2o5x<@w#0}#@iEXhiu+&aP%44=*e9-BthI;X5T6#Ai8`%6$po(A z(;=4p!A0Qn9twP@gh}}zWDkldCy;OtWO+@Y2N1=FMki`owK0!q^YK~J>I<9*cZ{cB%m^Q&5$I~_Yt*XQMg0#PcU~$0 literal 0 HcmV?d00001 diff --git a/lib/generate.js b/lib/generate.js index 91d9e170fd..3eee4563a7 100644 --- a/lib/generate.js +++ b/lib/generate.js @@ -1,17 +1,21 @@ 'use strict' -// const fs = require('fs') -const { ncp } = require('ncp') -// const debug = require('debug')('nuxt:generate') +const fs = require('fs-extra') +const co = require('co') +const pify = require('pify') +const debug = require('debug')('nuxt:generate') const _ = require('lodash') -const { resolve } = require('path') +const { resolve, join } = require('path') +const copy = pify(fs.copy) +const remove = pify(fs.remove) +const writeFile = pify(fs.writeFile) const defaults = { dir: 'dist', routeParams: {} } -module.exports = function * () { +module.exports = function () { /* ** Set variables */ @@ -20,35 +24,42 @@ module.exports = function * () { var srcBuiltPath = resolve(this.dir, '.nuxt', 'dist') var distPath = resolve(this.dir, this.options.generate.dir) var distNuxtPath = resolve(distPath, '_nuxt') - /* - ** Copy static and built files - */ - ncp(srcStaticPath, distNuxtPath, function (err) { - if (err) { - return console.log(err) - } - console.log('[nuxt] Static files copied') + co(function * () { + /* + ** Clean destination folder + */ + try { + yield remove(distPath) + debug('Destination folder cleaned') + } catch (e) {} + /* + ** Copy static and built files + */ + yield [ + copy(srcStaticPath, distPath), + copy(srcBuiltPath, distNuxtPath) + ] + debug('Static & build files copied') }) - ncp(srcBuiltPath, distNuxtPath, function (err) { - if (err) { - return console.log(err) - } - console.log('[nuxt] Built files copied') - }) - /* - ** Generate html files from routes - */ - var promises = [] - this.options.routes.forEach((route) => { - var promise = this.renderRoute(route.path).then((html) => { - return { - path: route.path, - html - } + .then(() => { + /* + ** Generate html files from routes + */ + var promises = [] + this.options.routes.forEach((route) => { + var promise = this.renderRoute(route.path) + .then((html) => { + var path = route.path + path += path[path.length - 1] === '/' ? 'index.html' : '.html' + debug('Generate file : ' + path) + path = join(distPath, path) + return writeFile(path, html, 'utf8') + }) + promises.push(promise) }) - promises.push(promise) + return Promise.all(promises) + }) + .then((pages) => { + debug('HTML Files generated') }) - // Promise.all(promises).then((page) => { - // verifier erreur - // }) } diff --git a/package.json b/package.json index 1f15d5880f..037d924e67 100644 --- a/package.json +++ b/package.json @@ -31,12 +31,12 @@ "es6-promise": "^4.0.5", "extract-text-webpack-plugin": "2.0.0-beta.4", "file-loader": "^0.9.0", + "fs-extra": "^1.0.0", "glob-promise": "^1.0.6", "hash-sum": "^1.0.2", "lodash": "^4.16.6", "lru-cache": "^4.0.1", "mkdirp-then": "^1.2.0", - "ncp": "^2.0.0", "pify": "^2.3.0", "serialize-javascript": "^1.3.0", "serve-static": "^1.11.1", From 44e9d9dc4aea682bb3c2cb236c9c404f736e8549 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Thu, 10 Nov 2016 14:04:52 +0100 Subject: [PATCH 3/4] last commit generator --- examples/hello-world/dist/_nuxt/0.nuxt.bundle.js | 2 +- examples/hello-world/dist/_nuxt/1.nuxt.bundle.js | 2 +- examples/hello-world/dist/_nuxt/server-bundle.js | 15 ++++++++------- examples/hello-world/dist/_nuxt/style.css | 2 +- examples/hello-world/dist/about.html | 13 ------------- examples/hello-world/dist/index.html | 13 ------------- examples/hello-world/dist/nuxt-square.png | Bin 0 -> 4799 bytes lib/generate.js | 3 ++- 8 files changed, 13 insertions(+), 37 deletions(-) delete mode 100644 examples/hello-world/dist/about.html delete mode 100644 examples/hello-world/dist/index.html create mode 100644 examples/hello-world/dist/nuxt-square.png diff --git a/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js b/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js index b49e1ebd91..2a7f30f12f 100644 --- a/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js +++ b/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js @@ -1 +1 @@ -webpackJsonp([0],{24:function(t,n,e){var o,r;e(27);var i=e(29);r=o=o||{},"object"!=typeof o.default&&"function"!=typeof o.default||(r=o=o.default),"function"==typeof r&&(r=r.options),r.render=i.render,r.staticRenderFns=i.staticRenderFns,r._scopeId="data-v-d30325b8",t.exports=o},27:function(t,n){},29:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/"}},["Home"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/static/nuxt.png"}})},function(){with(this)return _h("h2",["About"])}]}}}); \ No newline at end of file +webpackJsonp([0],{24:function(t,n,e){var r,o;e(27);var i=e(29);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,o._scopeId="data-v-d30325b8",t.exports=r},27:function(t,n){},29:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/"}},["Back home"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/nuxt-square.png"}})},function(){with(this)return _h("h2",["Thank you for testing nuxt.js"])}]}}}); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js b/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js index 48472e5694..35414281c7 100644 --- a/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js +++ b/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js @@ -1 +1 @@ -webpackJsonp([1],{25:function(t,n,e){var o,r;e(26);var i=e(28);r=o=o||{},"object"!=typeof o.default&&"function"!=typeof o.default||(r=o=o.default),"function"==typeof r&&(r=r.options),r.render=i.render,r.staticRenderFns=i.staticRenderFns,r._scopeId="data-v-9393702e",t.exports=o},26:function(t,n){},28:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/about"}},["About"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/static/nuxt.png"}})},function(){with(this)return _h("h2",["Hello World."])}]}}}); \ No newline at end of file +webpackJsonp([1],{25:function(t,n,e){var o,r;e(26);var i=e(28);r=o=o||{},"object"!=typeof o.default&&"function"!=typeof o.default||(r=o=o.default),"function"==typeof r&&(r=r.options),r.render=i.render,r.staticRenderFns=i.staticRenderFns,r._scopeId="data-v-9393702e",t.exports=o},26:function(t,n){},28:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/about"}},["About"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/nuxt.png"}})},function(){with(this)return _h("h2",["Hello World."])}]}}}); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/server-bundle.js b/examples/hello-world/dist/_nuxt/server-bundle.js index 42495a8b63..cfc3cbecca 100644 --- a/examples/hello-world/dist/_nuxt/server-bundle.js +++ b/examples/hello-world/dist/_nuxt/server-bundle.js @@ -78,14 +78,15 @@ module.exports = require("vue"); "use strict"; 'use strict'; +// The Vue build version to load with the `import` command +// (runtime-only or standalone) has been set in webpack.base.conf with an alias. + Object.defineProperty(exports, "__esModule", { value: true }); exports.router = exports.app = undefined; -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; // The Vue build version to load with the `import` command -// (runtime-only or standalone) has been set in webpack.base.conf with an alias. - +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _vue = __webpack_require__(0); @@ -643,7 +644,7 @@ module.exports={render:function (){with(this) { }},staticRenderFns: [function (){with(this) { return _h('img', { attrs: { - "src": "/static/nuxt.png" + "src": "/nuxt.png" } }) }},function (){with(this) { @@ -679,15 +680,15 @@ module.exports={render:function (){with(this) { attrs: { "to": "/" } - }, ["Home"])])]) + }, ["Back home"])])]) }},staticRenderFns: [function (){with(this) { return _h('img', { attrs: { - "src": "/static/nuxt.png" + "src": "/nuxt-square.png" } }) }},function (){with(this) { - return _h('h2', ["About"]) + return _h('h2', ["Thank you for testing nuxt.js"]) }}]} /***/ }, diff --git a/examples/hello-world/dist/_nuxt/style.css b/examples/hello-world/dist/_nuxt/style.css index f2b58d12e8..bd22165d1c 100644 --- a/examples/hello-world/dist/_nuxt/style.css +++ b/examples/hello-world/dist/_nuxt/style.css @@ -1,2 +1,2 @@ -.container[data-v-d30325b8]{font-family:serif;margin-top:200px;text-align:center}.container[data-v-9393702e]{font-family:sans-serif;margin-top:200px;text-align:center}.error-page[data-v-51a55454]{color:#000;background:#fff;top:0;bottom:0;left:0;right:0;position:absolute;font-family:SF UI Text,Helvetica Neue,Lucida Grande;text-align:center;padding-top:20%}.error-code[data-v-51a55454]{display:inline-block;font-size:24px;font-weight:500;vertical-align:top;border-right:1px solid rgba(0,0,0,.298039);margin:0 20px 0 0;padding:10px 23px}.error-wrapper-message[data-v-51a55454]{display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle}.error-message[data-v-51a55454]{font-size:14px;font-weight:400;margin:0;padding:0}.error-link[data-v-51a55454]{color:#42b983;font-weight:400;text-decoration:none;font-size:14px}.progress[data-v-3223f20f]{position:fixed;top:0;left:0;right:0;height:2px;width:0;transition:width .2s,opacity .4s;opacity:1;background-color:#efc14e;z-index:999999} +.container[data-v-d30325b8]{position:absolute;top:0;left:0;height:100%;width:100%;background:#000;color:#fff;font-family:Lucida Console,Monaco,monospace;padding-top:130px;text-align:center}a[data-v-d30325b8]{color:silver}.container[data-v-9393702e]{font-family:sans-serif;margin-top:200px;text-align:center}.error-page[data-v-51a55454]{color:#000;background:#fff;top:0;bottom:0;left:0;right:0;position:absolute;font-family:SF UI Text,Helvetica Neue,Lucida Grande;text-align:center;padding-top:20%}.error-code[data-v-51a55454]{display:inline-block;font-size:24px;font-weight:500;vertical-align:top;border-right:1px solid rgba(0,0,0,.298039);margin:0 20px 0 0;padding:10px 23px}.error-wrapper-message[data-v-51a55454]{display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle}.error-message[data-v-51a55454]{font-size:14px;font-weight:400;margin:0;padding:0}.error-link[data-v-51a55454]{color:#42b983;font-weight:400;text-decoration:none;font-size:14px}.progress[data-v-3223f20f]{position:fixed;top:0;left:0;right:0;height:2px;width:0;transition:width .2s,opacity .4s;opacity:1;background-color:#efc14e;z-index:999999} /*# sourceMappingURL=style.css.map*/ \ No newline at end of file diff --git a/examples/hello-world/dist/about.html b/examples/hello-world/dist/about.html deleted file mode 100644 index cbcb98dc65..0000000000 --- a/examples/hello-world/dist/about.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - Untitled - - - -

About

Home

- - - - - diff --git a/examples/hello-world/dist/index.html b/examples/hello-world/dist/index.html deleted file mode 100644 index 5b3286e422..0000000000 --- a/examples/hello-world/dist/index.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - Untitled - - - -

Hello World.

About

- - - - - diff --git a/examples/hello-world/dist/nuxt-square.png b/examples/hello-world/dist/nuxt-square.png new file mode 100644 index 0000000000000000000000000000000000000000..4ef326eca3f0b89b0202407cf4df5c0101020b4f GIT binary patch literal 4799 zcmc&&X*^W#+rMYVGRR=;8VrU|sgNzp*fJ7jsebl|kbO54W8WD|in8yrX3vuB6e8Kl znrzuBiu9a*pXYh`y!gNRzc}ameC~6f?{#1Iea`oLU038y9SwR~E?NKpy(U3T53;>~ zFC-OoFZ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generate.js index 3eee4563a7..6ab1a6cd48 100644 --- a/lib/generate.js +++ b/lib/generate.js @@ -48,13 +48,14 @@ module.exports = function () { var promises = [] this.options.routes.forEach((route) => { var promise = this.renderRoute(route.path) - .then((html) => { + .then(({ html }) => { var path = route.path path += path[path.length - 1] === '/' ? 'index.html' : '.html' debug('Generate file : ' + path) path = join(distPath, path) return writeFile(path, html, 'utf8') }) + console.log(promise) promises.push(promise) }) return Promise.all(promises) From 60be6941d604f038dd0858664ba14014f18e61c7 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Thu, 10 Nov 2016 14:14:31 +0100 Subject: [PATCH 4/4] clean dist --- .../hello-world/dist/_nuxt/0.nuxt.bundle.js | 1 - .../hello-world/dist/_nuxt/1.nuxt.bundle.js | 1 - .../hello-world/dist/_nuxt/nuxt.bundle.js | 1 - .../hello-world/dist/_nuxt/server-bundle.js | 797 ------------------ examples/hello-world/dist/_nuxt/style.css | 2 - examples/hello-world/dist/_nuxt/style.css.map | 1 - .../hello-world/dist/_nuxt/vendor.bundle.js | 14 - examples/hello-world/dist/nuxt-square.png | Bin 4799 -> 0 bytes examples/hello-world/dist/nuxt.png | Bin 4980 -> 0 bytes 9 files changed, 817 deletions(-) delete mode 100644 examples/hello-world/dist/_nuxt/0.nuxt.bundle.js delete mode 100644 examples/hello-world/dist/_nuxt/1.nuxt.bundle.js delete mode 100644 examples/hello-world/dist/_nuxt/nuxt.bundle.js delete mode 100644 examples/hello-world/dist/_nuxt/server-bundle.js delete mode 100644 examples/hello-world/dist/_nuxt/style.css delete mode 100644 examples/hello-world/dist/_nuxt/style.css.map delete mode 100644 examples/hello-world/dist/_nuxt/vendor.bundle.js delete mode 100644 examples/hello-world/dist/nuxt-square.png delete mode 100644 examples/hello-world/dist/nuxt.png diff --git a/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js b/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js deleted file mode 100644 index 2a7f30f12f..0000000000 --- a/examples/hello-world/dist/_nuxt/0.nuxt.bundle.js +++ /dev/null @@ -1 +0,0 @@ -webpackJsonp([0],{24:function(t,n,e){var r,o;e(27);var i=e(29);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,o._scopeId="data-v-d30325b8",t.exports=r},27:function(t,n){},29:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/"}},["Back home"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/nuxt-square.png"}})},function(){with(this)return _h("h2",["Thank you for testing nuxt.js"])}]}}}); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js b/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js deleted file mode 100644 index 35414281c7..0000000000 --- a/examples/hello-world/dist/_nuxt/1.nuxt.bundle.js +++ /dev/null @@ -1 +0,0 @@ -webpackJsonp([1],{25:function(t,n,e){var o,r;e(26);var i=e(28);r=o=o||{},"object"!=typeof o.default&&"function"!=typeof o.default||(r=o=o.default),"function"==typeof r&&(r=r.options),r.render=i.render,r.staticRenderFns=i.staticRenderFns,r._scopeId="data-v-9393702e",t.exports=o},26:function(t,n){},28:function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"container"},[_m(0)," ",_m(1)," ",_h("p",[_h("router-link",{attrs:{to:"/about"}},["About"])])])},staticRenderFns:[function(){with(this)return _h("img",{attrs:{src:"/nuxt.png"}})},function(){with(this)return _h("h2",["Hello World."])}]}}}); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/nuxt.bundle.js b/examples/hello-world/dist/_nuxt/nuxt.bundle.js deleted file mode 100644 index 37ff6c0b27..0000000000 --- a/examples/hello-world/dist/_nuxt/nuxt.bundle.js +++ /dev/null @@ -1 +0,0 @@ -webpackJsonp([2],[,,,,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.router=e.app=void 0;var o=Object.assign||function(t){for(var e=1;e95&&t.finish()},100),this},set:function(t){return this.show=!0,this.canSuccess=!0,this.percent=Math.floor(t),this},get:function(){return Math.floor(this.percent)},increase:function(t){return this.percent=this.percent+Math.floor(t),this},decrease:function(){return this.percent=this.percent-Math.floor(num),this},finish:function(){return this.percent=100,this.hide(),this},pause:function(){return clearInterval(this._timer),this},hide:function(){var t=this;return clearInterval(this._timer),this._timer=null,setTimeout(function(){t.show=!1,r.nextTick(function(){setTimeout(function(){t.percent=0},200)})},500),this},fail:function(){return this.canSuccess=!1,this.percent=100,this.hide(),this}}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default={props:["error"]}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(0),i=r(o),a=n(4),s=r(a),u=n(3),c=r(u);i.default.use(s.default),i.default.use(c.default);var f=function(){return n.e(0).then(n.bind(null,24))},d=function(){return n.e(1).then(n.bind(null,25))},l=function(t,e,n){if(n)return n;var r={x:0,y:0};return t.hash&&(r={selector:t.hash}),r};e.default=new s.default({mode:"history",scrollBehavior:l,routes:[{path:"/about",component:f},{path:"/",component:d}]})},function(t,e){},function(t,e){},function(t,e,n){var r,o;r=n(8);var i=n(19);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,t.exports=r},function(t,e,n){var r,o;n(12),r=n(9);var i=n(17);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,o._scopeId="data-v-3223f20f",t.exports=r},function(t,e,n){var r,o;n(13),r=n(10);var i=n(18);o=r=r||{},"object"!=typeof r.default&&"function"!=typeof r.default||(o=r=r.default),"function"==typeof o&&(o=o.options),o.render=i.render,o.staticRenderFns=i.staticRenderFns,o._scopeId="data-v-51a55454",t.exports=r},function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"progress",style:{width:percent+"%",height:height,"background-color":canSuccess?color:failedColor,opacity:show?1:0}})},staticRenderFns:[]}},function(module,exports){module.exports={render:function(){with(this)return _h("div",{staticClass:"error-page"},[_h("div",[_h("h1",{staticClass:"error-code"},[_s(error.statusCode)])," ",_h("div",{staticClass:"error-wrapper-message"},[_h("h2",{staticClass:"error-message"},[_s(error.message)])])," ",404===error.statusCode?_h("p",[_h("router-link",{staticClass:"error-link",attrs:{to:"/"}},["Back to the home page"])]):_e()])])},staticRenderFns:[]}},function(module,exports){module.exports={render:function(){with(this)return _h("div",{attrs:{id:"app"}},[_h("nuxt-loading",{ref:"loading"})," ",err?_e():_h("router-view")," ",err?_h("nuxt-error",{attrs:{error:err}}):_e()])},staticRenderFns:[]}},,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e,n){var r=this,o=(0,c.flatMapComponents)(t,function(t,e,n,r){return"function"!=typeof t||t.options?t:new Promise(function(e,o){var i=function(t){n.components[r]=t,e(t)};t().then(i).catch(o)})});this.$loading.start&&this.$loading.start(),Promise.all(o).then(function(){return n()}).catch(function(t){r.error({statusCode:500,message:t.message}),n(!1)})}function i(t,e,n){var r=this,o=(0,c.getMatchedComponents)(t);return o.length?(o.forEach(function(t){if(t._data||(t._data=t.data||f),t._Ctor&&t._Ctor.options){t.fetch=t._Ctor.options.fetch;var e=t._data.toString().replace(/\s/g,""),n=(t.data||f).toString().replace(/\s/g,""),r=(t._Ctor.options.data||f).toString().replace(/\s/g,"");r!==e&&r!==n&&(t._data=t._Ctor.options.data||f)}}),this.error(),void Promise.all(o.map(function(e){var n=[],o=(0,c.getContext)({to:t,isClient:!0});if(e._data&&"function"==typeof e._data){var i=e._data(o);i instanceof Promise||(i=Promise.resolve(i)),i.then(function(t){e.data=function(){return t},e._Ctor&&e._Ctor.options&&(e._Ctor.options.data=e.data),r.$loading.start&&r.$loading.increase(30)}),n.push(i)}if(e.fetch){var a=e.fetch(o);a instanceof Promise||(a=Promise.resolve(a)),a.then(function(){return r.$loading.increase&&r.$loading.increase(30)}),n.push(a)}return Promise.all(n)})).then(function(){r.$loading.finish&&r.$loading.finish(),n()}).catch(function(t){r.error(t),n(!1)})):(this.error({statusCode:404,message:"This page could not be found.",url:t.path}),n())}var a=n(0),s=r(a),u=n(6),c=n(7);n(2).polyfill(),n(1).polyfill();var f=function(){return{}},d=window.__NUXT__||{};if(!d)throw new Error("[nuxt.js] cannot find the global variable __NUXT__, make sure the server is working.");var l=(0,c.getLocation)(u.router.options.base),h=(0,c.flatMapComponents)(u.router.match(l),function(t,e,n,r,o){return"function"!=typeof t||t.options?t:new Promise(function(e,i){var a=function(t){t.data&&"function"==typeof t.data&&(t._data=t.data,t.data=function(){return d.data[o]},t._Ctor&&t._Ctor.options&&(t._Ctor.options.data=t.data)),n.components[r]=t,e(t)};t().then(a).catch(i)})});Promise.all(h).then(function(t){var e=new s.default(u.app);d.error&&e.error(d.error),e.$mount("#app"),u.router.beforeEach(o.bind(e)),u.router.beforeEach(i.bind(e)),"function"==typeof window.onNuxtReady&&window.onNuxtReady(e)}).catch(function(t){console.error("[nuxt.js] Cannot load components",t)})}],[22]); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/server-bundle.js b/examples/hello-world/dist/_nuxt/server-bundle.js deleted file mode 100644 index cfc3cbecca..0000000000 --- a/examples/hello-world/dist/_nuxt/server-bundle.js +++ /dev/null @@ -1,797 +0,0 @@ -module.exports = -/******/ (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 harmory imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; - -/******/ // define getter function for harmory exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ 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 = 21); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ function(module, exports) { - -module.exports = require("vue"); - -/***/ }, -/* 1 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; - -// The Vue build version to load with the `import` command -// (runtime-only or standalone) has been set in webpack.base.conf with an alias. - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.router = exports.app = undefined; - -var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; - -var _vue = __webpack_require__(0); - -var _vue2 = _interopRequireDefault(_vue); - -var _router = __webpack_require__(8); - -var _router2 = _interopRequireDefault(_router); - -var _App = __webpack_require__(9); - -var _App2 = _interopRequireDefault(_App); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// create the app instance. -// here we inject the router and store to all child components, -// making them available everywhere as `this.$router` and `this.$store`. -var app = _extends({ - router: _router2.default - -}, _App2.default); - -exports.app = app; -exports.router = _router2.default; - -/***/ }, -/* 2 */ -/***/ function(module, exports) { - -"use strict"; -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getMatchedComponents = getMatchedComponents; -exports.flatMapComponents = flatMapComponents; -exports.getContext = getContext; -exports.getLocation = getLocation; -function getMatchedComponents(route) { - return [].concat.apply([], route.matched.map(function (m) { - return Object.keys(m.components).map(function (key) { - return m.components[key]; - }); - })); -} - -function flatMapComponents(route, fn) { - return Array.prototype.concat.apply([], route.matched.map(function (m, index) { - return Object.keys(m.components).map(function (key) { - return fn(m.components[key], m.instances[key], m, key, index); - }); - })); -} - -function getContext(context) { - var ctx = { - isServer: !!context.isServer, - isClient: !!context.isClient, - - route: context.to ? context.to : context.route - }; - ctx.params = ctx.route.params || {}; - ctx.query = ctx.route.query || {}; - if (context.req) ctx.req = context.req; - if (context.res) ctx.res = context.res; - return ctx; -} - -// Imported from vue-router -function getLocation(base) { - var path = window.location.pathname; - if (base && path.indexOf(base) === 0) { - path = path.slice(base.length); - } - return (path || '/') + window.location.search + window.location.hash; -} - -/***/ }, -/* 3 */ -/***/ function(module, exports) { - -module.exports = require("debug"); - -/***/ }, -/* 4 */ -/***/ function(module, exports) { - -module.exports = require("lodash"); - -/***/ }, -/* 5 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _error = __webpack_require__(13); - -var _error2 = _interopRequireDefault(_error); - -var _Loading = __webpack_require__(10); - -var _Loading2 = _interopRequireDefault(_Loading); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -// -// -// -// -// -// -// -// - -exports.default = { - data: function data() { - return { - err: null - }; - }, - mounted: function mounted() { - this.$loading = this.$refs.loading; - }, - - - methods: { - error: function error(err) { - err = err || null; - this.err = err || null; - - if (this.err && this.$loading && this.$loading.fail) { - this.$loading.fail(); - } - - return this.err; - } - }, - components: { - NuxtError: _error2.default, - NuxtLoading: _Loading2.default - } -}; - -/***/ }, -/* 6 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// -// -// -// -// -// -// -// -// - -var Vue = __webpack_require__(0); - -exports.default = { - data: function data() { - return { - percent: 0, - show: false, - canSuccess: true, - duration: 5000, - height: '2px', - color: 'black', - failedColor: 'red' - }; - }, - - methods: { - start: function start() { - var _this = this; - - this.show = true; - this.canSuccess = true; - if (this._timer) { - clearInterval(this._timer); - this.percent = 0; - } - this._cut = 10000 / Math.floor(this.duration); - this._timer = setInterval(function () { - _this.increase(_this._cut * Math.random()); - if (_this.percent > 95) { - _this.finish(); - } - }, 100); - return this; - }, - set: function set(num) { - this.show = true; - this.canSuccess = true; - this.percent = Math.floor(num); - return this; - }, - get: function get() { - return Math.floor(this.percent); - }, - increase: function increase(num) { - this.percent = this.percent + Math.floor(num); - return this; - }, - decrease: function decrease() { - this.percent = this.percent - Math.floor(num); - return this; - }, - finish: function finish() { - this.percent = 100; - this.hide(); - return this; - }, - pause: function pause() { - clearInterval(this._timer); - return this; - }, - hide: function hide() { - var _this2 = this; - - clearInterval(this._timer); - this._timer = null; - setTimeout(function () { - _this2.show = false; - Vue.nextTick(function () { - setTimeout(function () { - _this2.percent = 0; - }, 200); - }); - }, 500); - return this; - }, - fail: function fail() { - this.canSuccess = false; - this.percent = 100; - this.hide(); - return this; - } - } -}; - -/***/ }, -/* 7 */ -/***/ function(module, exports) { - -"use strict"; -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -// -// -// -// -// -// -// -// -// -// -// -// - -exports.default = { - props: ['error'] -}; - -/***/ }, -/* 8 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _vue = __webpack_require__(0); - -var _vue2 = _interopRequireDefault(_vue); - -var _vueRouter = __webpack_require__(20); - -var _vueRouter2 = _interopRequireDefault(_vueRouter); - -var _vueMeta = __webpack_require__(19); - -var _vueMeta2 = _interopRequireDefault(_vueMeta); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -_vue2.default.use(_vueRouter2.default); -_vue2.default.use(_vueMeta2.default); - -var _d30325b8 = false ? function () { - return System.import('/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/about.vue'); -} : __webpack_require__(11); - -var _9393702e = false ? function () { - return System.import('/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/index.vue'); -} : __webpack_require__(12); - -var scrollBehavior = function scrollBehavior(to, from, savedPosition) { - if (savedPosition) { - // savedPosition is only available for popstate navigations. - return savedPosition; - } else { - // Scroll to the top by default - var position = { x: 0, y: 0 }; - // if link has anchor, scroll to anchor by returning the selector - if (to.hash) { - position = { selector: to.hash }; - } - return position; - } -}; - -exports.default = new _vueRouter2.default({ - mode: 'history', - scrollBehavior: scrollBehavior, - routes: [{ - path: '/about', - component: _d30325b8 - }, { - path: '/', - component: _9393702e - }] -}); - -/***/ }, -/* 9 */ -/***/ function(module, exports, __webpack_require__) { - -var __vue_exports__, __vue_options__ -var __vue_styles__ = {} - -/* script */ -__vue_exports__ = __webpack_require__(5) - -/* template */ -var __vue_template__ = __webpack_require__(17) -__vue_options__ = __vue_exports__ = __vue_exports__ || {} -if ( - typeof __vue_exports__.default === "object" || - typeof __vue_exports__.default === "function" -) { -if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} -__vue_options__ = __vue_exports__ = __vue_exports__.default -} -if (typeof __vue_options__ === "function") { - __vue_options__ = __vue_options__.options -} -__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/.nuxt/App.vue" -__vue_options__.render = __vue_template__.render -__vue_options__.staticRenderFns = __vue_template__.staticRenderFns -if (__vue_options__.functional) {console.error("[vue-loader] App.vue: functional components are not supported and should be defined in plain js files using render functions.")} - -module.exports = __vue_exports__ - - -/***/ }, -/* 10 */ -/***/ function(module, exports, __webpack_require__) { - -var __vue_exports__, __vue_options__ -var __vue_styles__ = {} - -/* styles */ - -/* script */ -__vue_exports__ = __webpack_require__(6) - -/* template */ -var __vue_template__ = __webpack_require__(14) -__vue_options__ = __vue_exports__ = __vue_exports__ || {} -if ( - typeof __vue_exports__.default === "object" || - typeof __vue_exports__.default === "function" -) { -if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} -__vue_options__ = __vue_exports__ = __vue_exports__.default -} -if (typeof __vue_options__ === "function") { - __vue_options__ = __vue_options__.options -} -__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/.nuxt/components/Loading.vue" -__vue_options__.render = __vue_template__.render -__vue_options__.staticRenderFns = __vue_template__.staticRenderFns -__vue_options__._scopeId = "data-v-3223f20f" -if (__vue_options__.functional) {console.error("[vue-loader] Loading.vue: functional components are not supported and should be defined in plain js files using render functions.")} - -module.exports = __vue_exports__ - - -/***/ }, -/* 11 */ -/***/ function(module, exports, __webpack_require__) { - -var __vue_exports__, __vue_options__ -var __vue_styles__ = {} - -/* styles */ - -/* template */ -var __vue_template__ = __webpack_require__(18) -__vue_options__ = __vue_exports__ = __vue_exports__ || {} -if ( - typeof __vue_exports__.default === "object" || - typeof __vue_exports__.default === "function" -) { -if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} -__vue_options__ = __vue_exports__ = __vue_exports__.default -} -if (typeof __vue_options__ === "function") { - __vue_options__ = __vue_options__.options -} -__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/about.vue" -__vue_options__.render = __vue_template__.render -__vue_options__.staticRenderFns = __vue_template__.staticRenderFns -__vue_options__._scopeId = "data-v-d30325b8" -if (__vue_options__.functional) {console.error("[vue-loader] about.vue: functional components are not supported and should be defined in plain js files using render functions.")} - -module.exports = __vue_exports__ - - -/***/ }, -/* 12 */ -/***/ function(module, exports, __webpack_require__) { - -var __vue_exports__, __vue_options__ -var __vue_styles__ = {} - -/* styles */ - -/* template */ -var __vue_template__ = __webpack_require__(16) -__vue_options__ = __vue_exports__ = __vue_exports__ || {} -if ( - typeof __vue_exports__.default === "object" || - typeof __vue_exports__.default === "function" -) { -if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} -__vue_options__ = __vue_exports__ = __vue_exports__.default -} -if (typeof __vue_options__ === "function") { - __vue_options__ = __vue_options__.options -} -__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/examples/hello-world/pages/index.vue" -__vue_options__.render = __vue_template__.render -__vue_options__.staticRenderFns = __vue_template__.staticRenderFns -__vue_options__._scopeId = "data-v-9393702e" -if (__vue_options__.functional) {console.error("[vue-loader] index.vue: functional components are not supported and should be defined in plain js files using render functions.")} - -module.exports = __vue_exports__ - - -/***/ }, -/* 13 */ -/***/ function(module, exports, __webpack_require__) { - -var __vue_exports__, __vue_options__ -var __vue_styles__ = {} - -/* styles */ - -/* script */ -__vue_exports__ = __webpack_require__(7) - -/* template */ -var __vue_template__ = __webpack_require__(15) -__vue_options__ = __vue_exports__ = __vue_exports__ || {} -if ( - typeof __vue_exports__.default === "object" || - typeof __vue_exports__.default === "function" -) { -if (Object.keys(__vue_exports__).some(function (key) { return key !== "default" && key !== "__esModule" })) {console.error("named exports are not supported in *.vue files.")} -__vue_options__ = __vue_exports__ = __vue_exports__.default -} -if (typeof __vue_options__ === "function") { - __vue_options__ = __vue_options__.options -} -__vue_options__.__file = "/Users/Alexandre/Code/Github/nuxt.js/pages/_error.vue" -__vue_options__.render = __vue_template__.render -__vue_options__.staticRenderFns = __vue_template__.staticRenderFns -__vue_options__._scopeId = "data-v-51a55454" -if (__vue_options__.functional) {console.error("[vue-loader] _error.vue: functional components are not supported and should be defined in plain js files using render functions.")} - -module.exports = __vue_exports__ - - -/***/ }, -/* 14 */ -/***/ function(module, exports) { - -module.exports={render:function (){with(this) { - return _h('div', { - staticClass: "progress", - style: ({ - 'width': percent + '%', - 'height': height, - 'background-color': canSuccess ? color : failedColor, - 'opacity': show ? 1 : 0 - }) - }) -}},staticRenderFns: []} - -/***/ }, -/* 15 */ -/***/ function(module, exports) { - -module.exports={render:function (){with(this) { - return _h('div', { - staticClass: "error-page" - }, [_h('div', [_h('h1', { - staticClass: "error-code" - }, [_s(error.statusCode)]), " ", _h('div', { - staticClass: "error-wrapper-message" - }, [_h('h2', { - staticClass: "error-message" - }, [_s(error.message)])]), " ", (error.statusCode === 404) ? _h('p', [_h('router-link', { - staticClass: "error-link", - attrs: { - "to": "/" - } - }, ["Back to the home page"])]) : _e()])]) -}},staticRenderFns: []} - -/***/ }, -/* 16 */ -/***/ function(module, exports) { - -module.exports={render:function (){with(this) { - return _h('div', { - staticClass: "container" - }, [_m(0), " ", _m(1), " ", _h('p', [_h('router-link', { - attrs: { - "to": "/about" - } - }, ["About"])])]) -}},staticRenderFns: [function (){with(this) { - return _h('img', { - attrs: { - "src": "/nuxt.png" - } - }) -}},function (){with(this) { - return _h('h2', ["Hello World."]) -}}]} - -/***/ }, -/* 17 */ -/***/ function(module, exports) { - -module.exports={render:function (){with(this) { - return _h('div', { - attrs: { - "id": "app" - } - }, [_h('nuxt-loading', { - ref: "loading" - }), " ", (!err) ? _h('router-view') : _e(), " ", (err) ? _h('nuxt-error', { - attrs: { - "error": err - } - }) : _e()]) -}},staticRenderFns: []} - -/***/ }, -/* 18 */ -/***/ function(module, exports) { - -module.exports={render:function (){with(this) { - return _h('div', { - staticClass: "container" - }, [_m(0), " ", _m(1), " ", _h('p', [_h('router-link', { - attrs: { - "to": "/" - } - }, ["Back home"])])]) -}},staticRenderFns: [function (){with(this) { - return _h('img', { - attrs: { - "src": "/nuxt-square.png" - } - }) -}},function (){with(this) { - return _h('h2', ["Thank you for testing nuxt.js"]) -}}]} - -/***/ }, -/* 19 */ -/***/ function(module, exports) { - -module.exports = require("vue-meta"); - -/***/ }, -/* 20 */ -/***/ function(module, exports) { - -module.exports = require("vue-router"); - -/***/ }, -/* 21 */ -/***/ function(module, exports, __webpack_require__) { - -"use strict"; -'use strict'; - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _vue = __webpack_require__(0); - -var _vue2 = _interopRequireDefault(_vue); - -var _lodash = __webpack_require__(4); - -var _index = __webpack_require__(1); - -var _utils = __webpack_require__(2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var debug = __webpack_require__(3)('nuxt:render'); - - -var isDev = false; -var _app = new _vue2.default(_index.app); - -// This exported function will be called by `bundleRenderer`. -// This is where we perform data-prefetching to determine the -// state of our application before actually rendering it. -// Since data fetching is async, this function is expected to -// return a Promise that resolves to the app instance. - -exports.default = function (context) { - // set router's location - _index.router.push(context.url); - - // Add route to the context - context.route = _index.router.currentRoute; - // Add meta infos - context.meta = _app.$meta(); - // Add store to the context - - - // Nuxt object - context.nuxt = { data: [], error: null }; - - // Call data & fecth hooks on components matched by the route. - var Components = (0, _utils.getMatchedComponents)(context.route); - if (!Components.length) { - context.nuxt.error = _app.error({ statusCode: 404, message: 'This page could not be found.', url: context.route.path }); - - return Promise.resolve(_app); - } - return Promise.all(Components.map(function (Component) { - var promises = []; - if (Component.data && typeof Component.data === 'function') { - Component._data = Component.data; - var promise = Component.data((0, _utils.getContext)(context)); - if (!(promise instanceof Promise)) promise = Promise.resolve(promise); - promise.then(function (data) { - Component.data = function () { - return data; - }; - }); - promises.push(promise); - } else { - promises.push(null); - } - if (Component.fetch) { - promises.push(Component.fetch((0, _utils.getContext)(context))); - } - return Promise.all(promises); - })).then(function (res) { - - // datas are the first row of each - context.nuxt.data = res.map(function (tab) { - return tab[0]; - }); - - return _app; - }).catch(function (error) { - context.nuxt.error = _app.error(error); - - return _app; - }); -}; - -/***/ } -/******/ ]); \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/style.css b/examples/hello-world/dist/_nuxt/style.css deleted file mode 100644 index bd22165d1c..0000000000 --- a/examples/hello-world/dist/_nuxt/style.css +++ /dev/null @@ -1,2 +0,0 @@ -.container[data-v-d30325b8]{position:absolute;top:0;left:0;height:100%;width:100%;background:#000;color:#fff;font-family:Lucida Console,Monaco,monospace;padding-top:130px;text-align:center}a[data-v-d30325b8]{color:silver}.container[data-v-9393702e]{font-family:sans-serif;margin-top:200px;text-align:center}.error-page[data-v-51a55454]{color:#000;background:#fff;top:0;bottom:0;left:0;right:0;position:absolute;font-family:SF UI Text,Helvetica Neue,Lucida Grande;text-align:center;padding-top:20%}.error-code[data-v-51a55454]{display:inline-block;font-size:24px;font-weight:500;vertical-align:top;border-right:1px solid rgba(0,0,0,.298039);margin:0 20px 0 0;padding:10px 23px}.error-wrapper-message[data-v-51a55454]{display:inline-block;text-align:left;line-height:49px;height:49px;vertical-align:middle}.error-message[data-v-51a55454]{font-size:14px;font-weight:400;margin:0;padding:0}.error-link[data-v-51a55454]{color:#42b983;font-weight:400;text-decoration:none;font-size:14px}.progress[data-v-3223f20f]{position:fixed;top:0;left:0;right:0;height:2px;width:0;transition:width .2s,opacity .4s;opacity:1;background-color:#efc14e;z-index:999999} -/*# sourceMappingURL=style.css.map*/ \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/style.css.map b/examples/hello-world/dist/_nuxt/style.css.map deleted file mode 100644 index f95a8806b1..0000000000 --- a/examples/hello-world/dist/_nuxt/style.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","file":"style.css","sourceRoot":""} \ No newline at end of file diff --git a/examples/hello-world/dist/_nuxt/vendor.bundle.js b/examples/hello-world/dist/_nuxt/vendor.bundle.js deleted file mode 100644 index fa6f3000f4..0000000000 --- a/examples/hello-world/dist/_nuxt/vendor.bundle.js +++ /dev/null @@ -1,14 +0,0 @@ -!function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var n=window.webpackJsonp;window.webpackJsonp=function(r,i,a){for(var s,u,c,l=0,f=[];l-1)return t.splice(n,1)}}function a(t,e){return rn.call(t,e)}function s(t){return"string"==typeof t||"number"==typeof t}function u(t){var e=Object.create(null);return function(n){var r=e[n];return r||(e[n]=t(n))}}function c(t,e){function n(n){var r=arguments.length;return r?r>1?t.apply(e,arguments):t.call(e,n):t.call(e)}return n._length=t.length,n}function l(t,e){e=e||0;for(var n=t.length-e,r=new Array(n);n--;)r[n]=t[n+e];return r}function f(t,e){for(var n in e)t[n]=e[n];return t}function p(t){return null!==t&&"object"==typeof t}function d(t){return ln.call(t)===fn}function h(t){for(var e={},n=0;n=0&&jn[n].id>t.id;)n--;jn.splice(Math.max(n,Pn)+1,0,t)}else jn.push(t);En||(En=!0,On(C))}}function j(t){Dn.clear(),T(t,Dn)}function T(t,e){var n,r,o=Array.isArray(t);if((o||p(t))&&Object.isExtensible(t)){if(t.__ob__){var i=t.__ob__.dep.id;if(e.has(i))return;e.add(i)}if(o)for(n=t.length;n--;)T(t[n],e);else for(r=Object.keys(t),n=r.length;n--;)T(t[r[n]],e)}}function E(t,e){t.__proto__=e}function S(t,e,n){for(var r=0,o=n.length;r1?l(n):n;for(var r=l(arguments,1),o=0,i=n.length;o-1?dr[t]=e.constructor===window.HTMLUnknownElement||e.constructor===window.HTMLElement:dr[t]=/HTMLUnknownElement/.test(e.toString())}function Zt(t){if("string"==typeof t){if(t=document.querySelector(t),!t)return document.createElement("div")}return t}function Qt(t,e){var n=document.createElement(t);return"select"!==t?n:(e.data&&e.data.attrs&&"multiple"in e.data.attrs&&n.setAttribute("multiple","multiple"),n)}function te(t,e){return document.createElementNS(cr[t],e)}function ee(t){return document.createTextNode(t)}function ne(t){return document.createComment(t)}function re(t,e,n){t.insertBefore(e,n)}function oe(t,e){t.removeChild(e)}function ie(t,e){t.appendChild(e)}function ae(t){return t.parentNode}function se(t){return t.nextSibling}function ue(t){return t.tagName}function ce(t,e){t.textContent=e}function le(t){return t.childNodes}function fe(t,e,n){t.setAttribute(e,n)}function pe(t,e){var n=t.data.ref;if(n){var r=t.context,o=t.child||t.elm,a=r.$refs;e?Array.isArray(a[n])?i(a[n],o):a[n]===o&&(a[n]=void 0):t.data.refInFor?Array.isArray(a[n])?a[n].push(o):a[n]=[o]:a[n]=o}}function de(t){return null==t}function he(t){return null!=t}function ve(t,e){return t.key===e.key&&t.tag===e.tag&&t.isComment===e.isComment&&!t.data==!e.data}function me(t,e,n){var r,o,i={};for(r=e;r<=n;++r)o=t[r].key,he(o)&&(i[o]=r);return i}function ye(t){function e(t){return new Vn(k.tagName(t).toLowerCase(),{},[],void 0,t)}function n(t,e){function n(){0===--n.listeners&&r(t)}return n.listeners=e,n}function r(t){var e=k.parentNode(t);e&&k.removeChild(e,t)}function o(t,e,n){var r,o=t.data;if(t.isRootInsert=!n,he(o)&&(he(r=o.hook)&&he(r=r.init)&&r(t),he(r=t.child)))return c(t,e),t.elm;var a=t.children,s=t.tag;return he(s)?(t.elm=t.ns?k.createElementNS(t.ns,s):k.createElement(s,t),l(t),i(t,a,e),he(o)&&u(t,e)):t.isComment?t.elm=k.createComment(t.text):t.elm=k.createTextNode(t.text),t.elm}function i(t,e,n){if(Array.isArray(e))for(var r=0;rh?(c=de(n[g+1])?null:n[g+1].elm,f(t,c,n,p,g,r)):p>g&&d(t,e,l,h)}function m(t,e,n,r){if(t!==e){if(e.isStatic&&t.isStatic&&e.key===t.key&&(e.isCloned||e.isOnce))return void(e.elm=t.elm);var o,i=e.data,s=he(i);s&&he(o=i.hook)&&he(o=o.prepatch)&&o(t,e);var u=e.elm=t.elm,c=t.children,l=e.children;if(s&&a(e)){for(o=0;o-1?e.split(/\s+/).forEach(function(e){return t.classList.add(e)}):t.classList.add(e);else{var n=" "+t.getAttribute("class")+" ";n.indexOf(" "+e+" ")<0&&t.setAttribute("class",(n+e).trim())}}function Te(t,e){if(e&&e.trim())if(t.classList)e.indexOf(" ")>-1?e.split(/\s+/).forEach(function(e){return t.classList.remove(e)}):t.classList.remove(e);else{for(var n=" "+t.getAttribute("class")+" ",r=" "+e+" ";n.indexOf(r)>=0;)n=n.replace(r," ");t.setAttribute("class",n.trim())}}function Ee(t){Nr(function(){Nr(t)})}function Se(t,e){(t._transitionClasses||(t._transitionClasses=[])).push(e),je(t,e)}function Pe(t,e){t._transitionClasses&&i(t._transitionClasses,e),Te(t,e)}function Le(t,e,n){var r=Me(t,e),o=r.type,i=r.timeout,a=r.propCount;if(!o)return n();var s=o===Sr?Mr:Rr,u=0,c=function(){t.removeEventListener(s,l),n()},l=function(e){e.target===t&&++u>=a&&c()};setTimeout(function(){u0&&(n=Sr,l=a,f=i.length):e===Pr?c>0&&(n=Pr,l=c,f=u.length):(l=Math.max(a,c),n=l>0?a>c?Sr:Pr:null,f=n?n===Sr?i.length:u.length:0);var p=n===Sr&&Ir.test(r[Lr+"Property"]);return{type:n,timeout:l,propCount:f,hasTransform:p}}function De(t,e){for(;t.length1,j=e._enterCb=qe(function(){C&&Pe(e,w),j.cancelled?(C&&Pe(e,b),A&&A(e)):O&&O(e),e._enterCb=null});t.data.show||Y(t.data.hook||(t.data.hook={}),"insert",function(){var n=e.parentNode,r=n&&n._pending&&n._pending[t.key];r&&r.tag===t.tag&&r.elm._leaveCb&&r.elm._leaveCb(),k&&k(e,j)},"transition-insert"),x&&x(e),C&&(Se(e,b),Se(e,w),Ee(function(){Pe(e,b),j.cancelled||$||Le(e,o,j)})),t.data.show&&k&&k(e,j),C||$||j()}}}function Ie(t,e){function n(){m.cancelled||(t.data.show||((r.parentNode._pending||(r.parentNode._pending={}))[t.key]=t),c&&c(r),h&&(Se(r,s),Se(r,u),Ee(function(){Pe(r,s),m.cancelled||v||Le(r,a,m)})),l&&l(r,m),h||v||m())}var r=t.elm;r._enterCb&&(r._enterCb.cancelled=!0,r._enterCb());var o=Ue(t.data.transition);if(!o)return e();if(!r._leaveCb&&1===r.nodeType){var i=o.css,a=o.type,s=o.leaveClass,u=o.leaveActiveClass,c=o.beforeLeave,l=o.leave,f=o.afterLeave,p=o.leaveCancelled,d=o.delayLeave,h=i!==!1&&!_n,v=l&&(l._length||l.length)>1,m=r._leaveCb=qe(function(){ -r.parentNode&&r.parentNode._pending&&(r.parentNode._pending[t.key]=null),h&&Pe(r,u),m.cancelled?(h&&Pe(r,s),p&&p(r)):(e(),f&&f(r)),r._leaveCb=null});d?d(n):n()}}function Ue(t){if(t){if("object"==typeof t){var e={};return t.css!==!1&&f(e,Ur(t.name||"v")),f(e,t),e}return"string"==typeof t?Ur(t):void 0}}function qe(t){var e=!1;return function(){e||(e=!0,t())}}function Be(t,e,n){var r=e.value,o=t.multiple;if(!o||Array.isArray(r)){for(var i,a,s=0,u=t.options.length;s-1,a.selected!==i&&(a.selected=i);else if(y(Fe(a),r))return void(t.selectedIndex!==s&&(t.selectedIndex=s));o||(t.selectedIndex=-1)}}function Ve(t,e){for(var n=0,r=e.length;n0,bn=yn&&yn.indexOf("edge/")>0,wn=yn&&yn.indexOf("android")>0,xn=yn&&/iphone|ipad|ipod|ios/.test(yn),kn=mn&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__,On=function(){function t(){r=!1;var t=n.slice(0);n.length=0;for(var e=0;e,height,hidden,high,href,hreflang,http-equiv,icon,id,ismap,itemprop,keytype,kind,label,lang,language,list,loop,low,manifest,max,maxlength,media,method,GET,POST,min,multiple,email,file,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,seamless,selected,shape,size,type,text,password,sizes,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,type,usemap,value,width,wrap"),"http://www.w3.org/1999/xlink"),ar=function(t){return":"===t.charAt(5)&&"xlink"===t.slice(0,5)},sr=function(t){return ar(t)?t.slice(6,t.length):""},ur=function(t){return null==t||t===!1},cr={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML",xhtml:"http://www.w3.org/1999/xhtm"},lr=o("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"),fr=(o("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr",!0),o("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source",!0),o("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track",!0),o("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font,font-face,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0)),pr=function(t){return lr(t)||fr(t)},dr=Object.create(null),hr=Object.freeze({createElement:Qt,createElementNS:te,createTextNode:ee,createComment:ne,insertBefore:re,removeChild:oe,appendChild:ie,parentNode:ae,nextSibling:se,tagName:ue,setTextContent:ce,childNodes:le,setAttribute:fe}),vr={create:function(t,e){pe(e)},update:function(t,e){t.data.ref!==e.data.ref&&(pe(t,!0),pe(e))},destroy:function(t){pe(t,!0)}},mr=new Vn("",{},[]),yr=["create","update","remove","destroy"],gr={create:ge,update:ge,destroy:function(t){ge(t,mr)}},_r=Object.create(null),br=[vr,gr],wr={create:xe,update:xe},xr={create:Oe,update:Oe},kr={create:Ae,update:Ae},Or={create:Ce,update:Ce},Ar=/^--/,Cr=function(t,e,n){Ar.test(e)?t.style.setProperty(e,n):t.style[jr(e)]=n},$r=["Webkit","Moz","ms"],jr=u(function(t){if(er=er||document.createElement("div"),t=an(t),"filter"!==t&&t in er.style)return t;for(var e=t.charAt(0).toUpperCase()+t.slice(1),n=0;n<$r.length;n++){var r=$r[n]+e;if(r in er.style)return r}}),Tr={create:$e,update:$e},Er=mn&&!_n,Sr="transition",Pr="animation",Lr="transition",Mr="transitionend",Dr="animation",Rr="animationend";Er&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Lr="WebkitTransition",Mr="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Dr="WebkitAnimation",Rr="webkitAnimationEnd"));var Nr=mn&&window.requestAnimationFrame||setTimeout,Ir=/\b(transform|all)(,|$)/,Ur=u(function(t){return{enterClass:t+"-enter",leaveClass:t+"-leave",appearClass:t+"-enter",enterActiveClass:t+"-enter-active",leaveActiveClass:t+"-leave-active",appearActiveClass:t+"-enter-active"}}),qr=mn?{create:function(t,e){e.data.show||Ne(e)},remove:function(t,e){t.data.show?e():Ie(t,e)}}:{},Br=[wr,xr,kr,Or,Tr,qr],Vr=Br.concat(br),Fr=ye({nodeOps:hr,modules:Vr});_n&&document.addEventListener("selectionchange",function(){var t=document.activeElement;t&&t.vmodel&&Je(t,"input")});var zr={inserted:function(t,e,n){if("select"===n.tag){var r=function(){Be(t,e,n.context)};r(),(gn||bn)&&setTimeout(r,0)}else"textarea"!==n.tag&&"text"!==t.type||e.modifiers.lazy||(wn||(t.addEventListener("compositionstart",ze),t.addEventListener("compositionend",He)),_n&&(t.vmodel=!0))},componentUpdated:function(t,e,n){if("select"===n.tag){Be(t,e,n.context);var r=t.multiple?e.value.some(function(e){return Ve(e,t.options)}):e.value!==e.oldValue&&Ve(e.value,t.options);r&&Je(t,"change")}}},Hr={bind:function(t,e,n){var r=e.value;n=Ke(n);var o=n.data&&n.data.transition;r&&o&&!_n&&Ne(n);var i="none"===t.style.display?"":t.style.display;t.style.display=r?i:"none",t.__vOriginalDisplay=i},update:function(t,e,n){var r=e.value,o=e.oldValue;if(r!==o){n=Ke(n);var i=n.data&&n.data.transition;i&&!_n?r?(Ne(n),t.style.display=t.__vOriginalDisplay):Ie(n,function(){t.style.display="none"}):t.style.display=r?t.__vOriginalDisplay:"none"}}},Jr={model:zr,show:Hr},Kr={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String},Wr={name:"transition",props:Kr,abstract:!0,render:function(t){var e=this,n=this.$slots.default;if(n&&(n=n.filter(function(t){return t.tag}),n.length)){var r=this.mode,o=n[0];if(Xe(this.$vnode))return o;var i=We(o);if(!i)return o;if(this._leaving)return Ge(t,o);var a=i.key=null==i.key||i.isStatic?"__v"+(i.tag+this._uid)+"__":i.key,s=(i.data||(i.data={})).transition=Ye(this),u=this._vnode,c=We(u);if(i.data.directives&&i.data.directives.some(function(t){return"show"===t.name})&&(i.data.show=!0),c&&c.data&&c.key!==a){var l=c.data.transition=f({},s);if("out-in"===r)return this._leaving=!0,Y(l,"afterLeave",function(){e._leaving=!1,e.$forceUpdate()},a),Ge(t,o);if("in-out"===r){var p,d=function(){p()};Y(s,"afterEnter",d,a),Y(s,"enterCancelled",d,a),Y(l,"delayLeave",function(t){p=t},a)}}return o}}},Yr=f({tag:String,moveClass:String},Kr);delete Yr.mode;var Gr={props:Yr,render:function(t){for(var e=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],a=Ye(this),s=0;s=0;c--)n.removeAttribute(a[c]);o.length===a.length?n.removeAttribute(i):n.setAttribute(i,o.join(","))}var i="data-vue-meta",a={},s={};a.install=function(t){function e(){var t,e=this.getMetaInfo(),n={};for(t in e)e.hasOwnProperty(t)&&(n[t]=u(t,e[t]));return n}function u(t,e){switch(t){case"title":return{toString:function(){return"<"+t+" "+i+'="true">'+e+""}};case"htmlAttrs":return{toString:function(){var t,n="";for(t in e)e.hasOwnProperty(t)&&(n+="undefined"!=typeof e[t]?t+'="'+e[t]+'"':t,n+=" ");return n.trim()}}}}function c(){var t=this.getMetaInfo();t.title&&r(t.title),t.htmlAttrs&&o(t.htmlAttrs)}function l(){var e=n(t,this);return e.titleTemplate&&(e.title=e.titleTemplate.replace("%s",e.title)),e}a.install.installed||(a.install.installed=!0,t.mixin({mounted:function(){this.$root.$meta().updateMetaInfo()}}),t.prototype.$meta=function(){return s.getMetaInfo=s.getMetaInfo||t.util.bind(l,this),s.updateMetaInfo=s.updateMetaInfo||c,s.inject=s.inject||e,s})},"undefined"!=typeof Vue&&Vue.use(a),t.exports=a}(this)},function(t,e,n){/** - * vue-router v2.0.1 - * (c) 2016 Evan You - * @license MIT - */ -!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t,e,n){if("/"===t.charAt(0))return t;if("?"===t.charAt(0)||"#"===t.charAt(0))return e+t;var r=e.split("/");n&&r[r.length-1]||r.pop();for(var o=t.replace(/^\//,"").split("/"),i=0;i=0&&(e=t.slice(r),t=t.slice(0,r));var o=t.indexOf("?");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{path:t,query:n,hash:e}}function n(t){return t.replace(/\/\//g,"/")}function r(t,e){if(!t)throw new Error("[vue-router] "+e)}function o(t,e){t||"undefined"!=typeof console&&console.warn("[vue-router] "+e)}function i(t,e){if(void 0===e&&(e={}),t){var n;try{n=a(t)}catch(t){o(!1,t.message),n={}}for(var r in e)n[r]=e[r];return n}return e}function a(t){var e=Object.create(null);return(t=t.trim().replace(/^(\?|#|&)/,""))?(t.split("&").forEach(function(t){var n=t.replace(/\+/g," ").split("="),r=ut(n.shift()),o=n.length>0?ut(n.join("=")):null;void 0===e[r]?e[r]=o:Array.isArray(e[r])?e[r].push(o):e[r]=[e[r],o]}),e):e}function s(t){var e=t?Object.keys(t).sort().map(function(e){var n=t[e];if(void 0===n)return"";if(null===n)return st(e);if(Array.isArray(n)){var r=[];return n.slice().forEach(function(t){void 0!==t&&(null===t?r.push(st(e)):r.push(st(e)+"="+st(t)))}),r.join("&")}return st(e)+"="+st(n)}).filter(function(t){return t.length>0}).join("&"):null;return e?"?"+e:""}function u(t,e,n){var r={name:e.name||t&&t.name,meta:t&&t.meta||{},path:e.path||"/",hash:e.hash||"",query:e.query||{},params:e.params||{},fullPath:l(e),matched:t?c(t):[]};return n&&(r.redirectedFrom=l(n)),Object.freeze(r)}function c(t){for(var e=[];t;)e.unshift(t),t=t.parent;return e}function l(t){var e=t.path,n=t.query;void 0===n&&(n={});var r=t.hash;return void 0===r&&(r=""),(e||"/")+s(n)+r}function f(t,e){return e===ct?t===e:!!e&&(t.path&&e.path?t.path.replace(lt,"")===e.path.replace(lt,"")&&t.hash===e.hash&&p(t.query,e.query):!(!t.name||!e.name)&&(t.name===e.name&&t.hash===e.hash&&p(t.query,e.query)&&p(t.params,e.params)))}function p(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=Object.keys(t),r=Object.keys(e);return n.length===r.length&&n.every(function(n){return String(t[n])===String(e[n])})}function d(t,e){return 0===t.path.indexOf(e.path)&&(!e.hash||t.hash===e.hash)&&h(t.query,e.query)}function h(t,e){for(var n in e)if(!(n in t))return!1;return!0}function v(n,r,o){var a="string"==typeof n?{path:n}:n;if(a.name||a._normalized)return a;var s=e(a.path||""),u=r&&r.path||"/",c=s.path?t(s.path,u,o):r&&r.path||"/",l=i(s.query,a.query),f=a.hash||s.hash;return f&&"#"!==f.charAt(0)&&(f="#"+f),{_normalized:!0,path:c,query:l,hash:f}}function m(t){if(t)for(var e,n=0;n=t.length?n():t[o]?e(t[o],function(){r(o+1)}):r(o+1)};r(0)}function q(t){if(!t)if(kt){var e=document.querySelector("base");t=e?e.getAttribute("href"):"/"}else t="/";return"/"!==t.charAt(0)&&(t="/"+t),t.replace(/\/$/,"")}function B(t,e){var n,r=Math.max(t.length,e.length);for(n=0;n=0?e:0)+"#"+t)}var at={name:"router-view",functional:!0,props:{name:{type:String,default:"default"}},render:function(t,e){var n=e.props,r=e.children,o=e.parent,i=e.data;i.routerView=!0;for(var a=o.$route,s=o._routerViewCache||(o._routerViewCache={}),u=0,c=!1;o;)o.$vnode&&o.$vnode.data.routerView&&u++,o._inactive&&(c=!0),o=o.$parent;i.routerViewDepth=u;var l=a.matched[u];if(!l)return t();var f=n.name,p=c?s[f]:s[f]=l.components[f];if(!c){var d=i.hook||(i.hook={});d.init=function(t){l.instances[f]=t.child},d.destroy=function(t){l.instances[f]===t.child&&(l.instances[f]=void 0)}}return t(p,i,r)}},st=encodeURIComponent,ut=decodeURIComponent,ct=u(null,{path:"/"}),lt=/\/$/,ft=[String,Object],pt={name:"router-link",props:{to:{type:ft,required:!0},tag:{type:String,default:"a"},exact:Boolean,append:Boolean,replace:Boolean,activeClass:String},render:function(t){var e=this,r=this.$router,o=this.$route,i=v(this.to,o,this.append),a=r.match(i),s=a.redirectedFrom||a.fullPath,c=r.history.base,l=c?n(c+s):s,p={},h=this.activeClass||r.options.linkActiveClass||"router-link-active",y=i.path?u(null,i):a;p[h]=this.exact?f(o,y):d(o,y);var g={click:function(t){t.metaKey||t.ctrlKey||t.shiftKey||t.defaultPrevented||0===t.button&&(t.preventDefault(),e.replace?r.replace(i):r.push(i))}},_={class:p};if("a"===this.tag)_.on=g,_.attrs={href:l};else{var b=m(this.$slots.default);if(b){var w=b.data||(b.data={});w.on=g;var x=w.attrs||(w.attrs={});x.href=l}else _.on=g}return t(this.tag,_,this.$slots.default)}},dt=Array.isArray||function(t){return"[object Array]"==Object.prototype.toString.call(t)},ht=dt,vt=S,mt=g,yt=_,gt=x,_t=E,bt=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");vt.parse=mt,vt.compile=yt,vt.tokensToFunction=gt,vt.tokensToRegExp=_t;var wt=Object.create(null),xt=Object.create(null),kt="undefined"!=typeof window,Ot=kt&&function(){var t=window.navigator.userAgent;return(t.indexOf("Android 2.")===-1&&t.indexOf("Android 4.0")===-1||t.indexOf("Mobile Safari")===-1||t.indexOf("Chrome")!==-1||t.indexOf("Windows Phone")!==-1)&&(window.history&&"pushState"in window.history)}(),At=function(t,e){this.router=t,this.base=q(e),this.current=ct,this.pending=null};At.prototype.listen=function(t){this.cb=t},At.prototype.transitionTo=function(t,e){var n=this,r=this.router.match(t,this.current);this.confirmTransition(r,function(){n.updateRoute(r),e&&e(r),n.ensureURL()})},At.prototype.confirmTransition=function(t,e){var n=this,r=this.current;if(f(t,r))return void this.ensureURL();var o=B(this.current.matched,t.matched),i=o.deactivated,a=o.activated,s=[].concat(V(i),this.router.beforeHooks,a.map(function(t){return t.beforeEnter}),H(a));this.pending=t;var u=function(e,o){n.pending===t&&e(t,r,function(t){t===!1?n.ensureURL():"string"==typeof t||"object"==typeof t?n.push(t):o(t)})};U(s,u,function(){var r=[],o=F(a,r,function(){return n.current===t});U(o,u,function(){n.pending===t&&(n.pending=null,e(t),n.router.app.$nextTick(function(){r.forEach(function(t){return t()})}))})})},At.prototype.updateRoute=function(t){var e=this.current;this.current=t,this.cb&&this.cb(t),this.router.afterHooks.forEach(function(n){n&&n(t,e)})};var Ct=function(){return String(Date.now())},$t=Ct(),jt=function(t){function e(e,n){var r=this;t.call(this,e,n),this.transitionTo(Q(this.base));var o=e.options.scrollBehavior;window.addEventListener("popstate",function(t){$t=t.state&&t.state.key;var e=r.current;r.transitionTo(Q(r.base),function(t){o&&r.handleScroll(t,e,!0)})}),o&&window.addEventListener("scroll",function(){K($t)})}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.go=function(t){window.history.go(t)},e.prototype.push=function(t){var e=this,r=this.current;this.transitionTo(t,function(t){tt(n(e.base+t.fullPath)),e.handleScroll(t,r,!1)})},e.prototype.replace=function(t){var e=this,r=this.current;this.transitionTo(t,function(t){et(n(e.base+t.fullPath)),e.handleScroll(t,r,!1)})},e.prototype.ensureURL=function(){Q(this.base)!==this.current.fullPath&&et(n(this.base+this.current.fullPath))},e.prototype.handleScroll=function(t,e,n){var o=this.router;if(o.app){var i=o.options.scrollBehavior;i&&(r("function"==typeof i,"scrollBehavior must be a function"),o.app.$nextTick(function(){var r=W($t),o=i(t,e,n?r:null);if(o){var a="object"==typeof o;if(a&&"string"==typeof o.selector){var s=document.querySelector(o.selector);s?r=Y(s):G(o)&&(r=X(o))}else a&&G(o)&&(r=X(o));r&&window.scrollTo(r.x,r.y)}}))}},e}(At),Tt=function(t){function e(e,n,r){var o=this;t.call(this,e,n),r&&this.checkFallback()||(nt(),this.transitionTo(rt(),function(){window.addEventListener("hashchange",function(){o.onHashChange()})}))}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.checkFallback=function(){var t=Q(this.base);if(!/^\/#/.test(t))return window.location.replace(n(this.base+"/#"+t)),!0},e.prototype.onHashChange=function(){nt()&&this.transitionTo(rt(),function(t){it(t.fullPath)})},e.prototype.push=function(t){this.transitionTo(t,function(t){ot(t.fullPath)})},e.prototype.replace=function(t){this.transitionTo(t,function(t){it(t.fullPath)})},e.prototype.go=function(t){window.history.go(t)},e.prototype.ensureURL=function(){rt()!==this.current.fullPath&&it(this.current.fullPath)},e}(At),Et=function(t){function e(e){t.call(this,e),this.stack=[],this.index=-1}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.push=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index+1).concat(t),e.index++})},e.prototype.replace=function(t){var e=this;this.transitionTo(t,function(t){e.stack=e.stack.slice(0,e.index).concat(t)})},e.prototype.go=function(t){var e=this,n=this.index+t;if(!(n<0||n>=this.stack.length)){var r=this.stack[n];this.confirmTransition(r,function(){e.index=n,e.updateRoute(r)})}},e.prototype.ensureURL=function(){},e}(At),St=function(t){void 0===t&&(t={}),this.app=null,this.options=t,this.beforeHooks=[],this.afterHooks=[],this.match=D(t.routes||[]);var e=t.mode||"hash";this.fallback="history"===e&&!Ot,this.fallback&&(e="hash"),kt||(e="abstract"),this.mode=e},Pt={currentRoute:{}};return Pt.currentRoute.get=function(){return this.history&&this.history.current},St.prototype.init=function(t){var e=this;r(y.installed,"not installed. Make sure to call `Vue.use(VueRouter)` before creating root instance."),this.app=t;var n=this,o=n.mode,i=n.options,a=n.fallback;switch(o){case"history":this.history=new jt(this,i.base);break;case"hash":this.history=new Tt(this,i.base,a);break;case"abstract":this.history=new Et(this);break;default:r(!1,"invalid mode: "+o)}this.history.listen(function(t){e.app._route=t})},St.prototype.beforeEach=function(t){this.beforeHooks.push(t)},St.prototype.afterEach=function(t){this.afterHooks.push(t)},St.prototype.push=function(t){this.history.push(t)},St.prototype.replace=function(t){this.history.replace(t)},St.prototype.go=function(t){this.history.go(t)},St.prototype.back=function(){this.go(-1)},St.prototype.forward=function(){this.go(1)},St.prototype.getMatchedComponents=function(){return this.currentRoute?[].concat.apply([],this.currentRoute.matched.map(function(t){return Object.keys(t.components).map(function(e){return t.components[e]})})):[]},Object.defineProperties(St.prototype,Pt),St.install=y,kt&&window.Vue&&window.Vue.use(St),St})},function(t,e){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function i(t){if(f===clearTimeout)return clearTimeout(t);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(t);try{return f(t)}catch(e){try{return f.call(null,t)}catch(e){return f.call(this,t)}}}function a(){v&&d&&(v=!1,d.length?h=d.concat(h):m=-1,h.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=h.length;e;){for(d=h,h=[];++m1)for(var n=1;n~ zFC-OoFZ-uF12Pmg%G$~RRK?RBTTlXk_R>^SHt>OMrTZ1Js$+T%=IkF7a6T|Jx|;CM zq`r1if1b)qyrckK%(aU52mz7oa)bN2{MOb%9(1DW&TM1mmWHY77AeWyU5T9<`T2IO zBTo4``=_6;JYSlWZL+aBc(>H#vYk=Ae=>OB{&{n9HuV)2$?>OyiZTn&NxA+O)4?YU zDC0x`{w}3()=fYX?o?)E0oWbDa#I-KSr)NKTEOT7XoaCcT31F2N`RCHlq}F-s0=a) z4k&m?a9TOK zo|yZ~x|^=POBLvUU~m7n`5f<~AST>oxMu0Z)^t7luAIjg#9N^efbtB547>)f<-v`xUATj!#aOZ6(%rb>=-_;xd`qb~USiXRR&an*D7I$4h zTIQFat-1vRmi9y0bB$1dZV8;B6D80=*RI~&Hi34pu{TD=;T9lGOt}|%i_rqIiPcrU zI#Gak*peN+!cGYYV&b`s#;oA~U4}hO_Gq&@xQEB@+?U~84KbB$@-l4sF{0wJ%%9g82o4?b1v-%$8iBo$$I_3-r_^GBEWeRVnAmRkFpn;Wd<59fn( z0)Bj*eY?J~5nFs`<`;XXgvMylwOcI7@fbLYnQyY*IdjKBOG~TE3uouv*kC~AXmG!A z#|V?;a`TgG?o-3MdPA;4&Diuc95N8lF zGl)(W!moqvp*V~zzx>S9RKJ|(dfq^1GW&|=>Bq{})-)=O%?g1X+W6~%R>L{!?VaD8 z-vm)kUB6E3i|rS-nLig#qzG>!Jq4NvUuP%B%8c`$OhTuk_bhdfe0oLO+KNWiZZ6}^ zf)rK=FYdE*SBQO-@1C@@bahx*SZ9ILcsaMM5uftirAU;>Q@L;s6^J#e4`0O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;6Pz8MTGwoqb8*PxDt9<{~XS%7b@2NXA<-iX0E_MIP8{U5NA zfGA|Iafc8q0N9;_GeU4cw>bFXHdMFI83T9`ROyR)GJbA>dINrRc<>nNhUBB#o9_UU mk24IJr3Xkw|9$7j46mf$7<3u#e}_6!KvP{utz6}9(EkA4LV{)h diff --git a/examples/hello-world/dist/nuxt.png b/examples/hello-world/dist/nuxt.png deleted file mode 100644 index a48bda6be88ffd77c1449dbee861885b5bee3573..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4980 zcmb_gHh9d_&xYNxbOSyyzhOTb6@A)lVGT?O$A~B5fBhi>FQ`0Fh4^PNC+hZP%6oW z5n0XJw*p!pANAly9U~r1aWmK<_CF{mPUE4_|Cs-;FopNf6H@b54totlX5G5{c_vBB zV#VKTMVqG7Km}zPHtn<-A}!z5HfFCl|L_-ty!yM}y3ClKoLB$V`01mNA&&46F$6A? zAvVXWT{lT$LRRqES^>u9)d+8c5hJ(udxpZ2erGH>KSQ$OX=daQ*xagU#<|O@i<(1e zu}67_@EX30twB$KY+=7;Ha@JO@KaiCt2;_|UmbL?ZqtR|K$il4^NM1QQ;i<4_qh~=rsEWja3nVUne5MO zklSTi57;-oI=g?rmxo@`?#8;#7(PHp^+c0UJyE(jp5-&0e{7i!pYGYIuJd9Sc&;a= z`R`~_d46!fy!V~V()XUDESG$-s@t2h<&T<-@c!YCGE?|}oUUK}>6RId3p_uWxBWQ4 zWV_h2dDurY>6w@%l_C5^^lDY)rlHxcwIMorJI263cp;5B(*q-(IX1o%ygvw`=|R3H7<2KFhf2+J<#L*c$#W=29CyMmW3}*cFUJW zSUseaZqFSrU{}cDhw*PnIYR2|uUC4b2kvRJ8D-i?NAeYKIa;iyk70Rj8OLi(f-X(1 zozqNHm2b~WoIJxCO|#(BTvTC>Bq?oUyLhIVF*H!#)8+7RLS>d?WaG>5F_Bj0AZL!o z`PY+*^8%YktMz@<59Pci4?&f25LJI znr5BUb{sU`j%WY|8gPDYl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