last commit generator

This commit is contained in:
Alexandre Chopin 2016-11-10 14:04:52 +01:00
parent bd5ec528c5
commit 44e9d9dc4a
8 changed files with 13 additions and 37 deletions

View File

@ -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"])}]}}}); 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"])}]}}});

View File

@ -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."])}]}}}); 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."])}]}}});

View File

@ -78,14 +78,15 @@ module.exports = require("vue");
"use strict"; "use strict";
'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", { Object.defineProperty(exports, "__esModule", {
value: true value: true
}); });
exports.router = exports.app = undefined; 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 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; };
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
var _vue = __webpack_require__(0); var _vue = __webpack_require__(0);
@ -643,7 +644,7 @@ module.exports={render:function (){with(this) {
}},staticRenderFns: [function (){with(this) { }},staticRenderFns: [function (){with(this) {
return _h('img', { return _h('img', {
attrs: { attrs: {
"src": "/static/nuxt.png" "src": "/nuxt.png"
} }
}) })
}},function (){with(this) { }},function (){with(this) {
@ -679,15 +680,15 @@ module.exports={render:function (){with(this) {
attrs: { attrs: {
"to": "/" "to": "/"
} }
}, ["Home"])])]) }, ["Back home"])])])
}},staticRenderFns: [function (){with(this) { }},staticRenderFns: [function (){with(this) {
return _h('img', { return _h('img', {
attrs: { attrs: {
"src": "/static/nuxt.png" "src": "/nuxt-square.png"
} }
}) })
}},function (){with(this) { }},function (){with(this) {
return _h('h2', ["About"]) return _h('h2', ["Thank you for testing nuxt.js"])
}}]} }}]}
/***/ }, /***/ },

View File

@ -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*/ /*# sourceMappingURL=style.css.map*/

View File

@ -1,13 +0,0 @@
<!DOCTYPE html data-vue-meta-server-rendered>
<html>
<head>
<title data-vue-meta="true">Untitled</title>
<link rel="stylesheet" href="/_nuxt/style.css">
</head>
<body>
<div id="app" server-rendered="true"><div class="progress" style="width:0%;height:2px;background-color:black;opacity:0;" data-v-3223f20f></div> <div class="container" data-v-d30325b8><img src="/static/nuxt.png" data-v-d30325b8> <h2 data-v-d30325b8>About</h2> <p data-v-d30325b8><a href="/" class="router-link-active" data-v-d30325b8>Home</a></p></div> <!----></div>
<script type="text/javascript" defer>window.__NUXT__={"data":[null],"error":null}</script>
<script src="/_nuxt/vendor.bundle.js" defer></script>
<script src="/_nuxt/nuxt.bundle.js" defer></script>
</body>
</html>

View File

@ -1,13 +0,0 @@
<!DOCTYPE html data-vue-meta-server-rendered>
<html>
<head>
<title data-vue-meta="true">Untitled</title>
<link rel="stylesheet" href="/_nuxt/style.css">
</head>
<body>
<div id="app" server-rendered="true"><div class="progress" style="width:0%;height:2px;background-color:black;opacity:0;" data-v-3223f20f></div> <div class="container" data-v-9393702e><img src="/static/nuxt.png" data-v-9393702e> <h2 data-v-9393702e>Hello World.</h2> <p data-v-9393702e><a href="/about" class="" data-v-9393702e>About</a></p></div> <!----></div>
<script type="text/javascript" defer>window.__NUXT__={"data":[null],"error":null}</script>
<script src="/_nuxt/vendor.bundle.js" defer></script>
<script src="/_nuxt/nuxt.bundle.js" defer></script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@ -48,13 +48,14 @@ module.exports = function () {
var promises = [] var promises = []
this.options.routes.forEach((route) => { this.options.routes.forEach((route) => {
var promise = this.renderRoute(route.path) var promise = this.renderRoute(route.path)
.then((html) => { .then(({ html }) => {
var path = route.path var path = route.path
path += path[path.length - 1] === '/' ? 'index.html' : '.html' path += path[path.length - 1] === '/' ? 'index.html' : '.html'
debug('Generate file : ' + path) debug('Generate file : ' + path)
path = join(distPath, path) path = join(distPath, path)
return writeFile(path, html, 'utf8') return writeFile(path, html, 'utf8')
}) })
console.log(promise)
promises.push(promise) promises.push(promise)
}) })
return Promise.all(promises) return Promise.all(promises)