From 44e9d9dc4aea682bb3c2cb236c9c404f736e8549 Mon Sep 17 00:00:00 2001 From: Alexandre Chopin Date: Thu, 10 Nov 2016 14:04:52 +0100 Subject: [PATCH] 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-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@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RRoILobI z`yT6RHZn6)s<55sS=$o7P7E%aJv?x<-xv&NrEeexsfMHMoIBDk+rv-#xJ|rgJ*W0{ z(y|90sX5kik@M0Ys~iE`Aw;Td+a%1`O<++?^35Z9RnZM4seED(}omc~DI1lx5&_mg2ronXqV|3hU()?s$qVR|J`l)2`jlR|=}2>o)X2Nmu74*V)Q z&)^j&?uT)Ayi0cM)G~4?d1KX`f<-)mX%?UzAFn}(jSIGk9c^yy>A|J9Z zMwOo)K=u9hc>ptj>|;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 literal 0 HcmV?d00001 diff --git a/lib/generate.js b/lib/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)