mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-13 09:33:54 +00:00
Fix path on windows
This commit is contained in:
parent
fa68b8b383
commit
8cbbaeaf83
@ -10,17 +10,27 @@ const hash = require('hash-sum')
|
|||||||
const pify = require('pify')
|
const pify = require('pify')
|
||||||
const webpack = require('webpack')
|
const webpack = require('webpack')
|
||||||
const { createBundleRenderer } = require('vue-server-renderer')
|
const { createBundleRenderer } = require('vue-server-renderer')
|
||||||
const { join, resolve } = require('path')
|
const { join, resolve, sep } = require('path')
|
||||||
const remove = pify(fs.remove)
|
const remove = pify(fs.remove)
|
||||||
const readFile = pify(fs.readFile)
|
const readFile = pify(fs.readFile)
|
||||||
const writeFile = pify(fs.writeFile)
|
const writeFile = pify(fs.writeFile)
|
||||||
const mkdirp = pify(fs.mkdirp)
|
const mkdirp = pify(fs.mkdirp)
|
||||||
const r = function () {
|
const reqSep = /\//g
|
||||||
const args = Array.from(arguments)
|
const sysSep = _.escapeRegExp(sep)
|
||||||
if (_.last(args).includes('~')) {
|
const normalize = string => string.replace(reqSep, sysSep)
|
||||||
return _.last(args)
|
const wp = function (p) {
|
||||||
|
if (/^win/.test(process.platform)) {
|
||||||
|
p = p.replace(/\\/g, '\\\\')
|
||||||
}
|
}
|
||||||
return resolve.apply(null, arguments)
|
return p
|
||||||
|
}
|
||||||
|
const r = function () {
|
||||||
|
let args = Array.from(arguments)
|
||||||
|
args = args.map(normalize)
|
||||||
|
if (_.last(args).includes('~')) {
|
||||||
|
return wp(_.last(args))
|
||||||
|
}
|
||||||
|
return wp(resolve.apply(null, args))
|
||||||
}
|
}
|
||||||
|
|
||||||
const defaults = {
|
const defaults = {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "nuxt",
|
"name": "nuxt",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"description": "A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)",
|
"description": "A minimalistic framework for server-rendered Vue.js applications (inspired by Next.js)",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -41,11 +41,11 @@
|
|||||||
"serialize-javascript": "^1.3.0",
|
"serialize-javascript": "^1.3.0",
|
||||||
"serve-static": "^1.11.1",
|
"serve-static": "^1.11.1",
|
||||||
"url-loader": "^0.5.7",
|
"url-loader": "^0.5.7",
|
||||||
"vue": "^2.0.7",
|
"vue": "^2.0.8",
|
||||||
"vue-loader": "^9.9.5",
|
"vue-loader": "^9.9.5",
|
||||||
"vue-meta": "^0.4.4",
|
"vue-meta": "^0.4.4",
|
||||||
"vue-router": "^2.0.3",
|
"vue-router": "^2.0.3",
|
||||||
"vue-server-renderer": "^2.0.7",
|
"vue-server-renderer": "^2.0.8",
|
||||||
"vuex": "^2.0.0",
|
"vuex": "^2.0.0",
|
||||||
"webpack": "2.1.0-beta.26",
|
"webpack": "2.1.0-beta.26",
|
||||||
"webpack-dev-middleware": "^1.8.4",
|
"webpack-dev-middleware": "^1.8.4",
|
||||||
|
Loading…
Reference in New Issue
Block a user