1
0
Fork 0

Normalise source directory when passing it to globby so that windows file paths are handled correctly.

This commit is contained in:
ephphatha 2021-01-12 21:09:01 +11:00
parent 43cce60d42
commit b500953d9c
2 changed files with 7 additions and 4 deletions

View file

@ -4,6 +4,7 @@ const handlebars = require('handlebars')
const execa = require('execa') const execa = require('execa')
const fs = require('fs') const fs = require('fs')
const globby = require('globby') const globby = require('globby')
const normalize = require('normalize-path')
const mkdirp = require('make-dir') const mkdirp = require('make-dir')
const ora = require('ora') const ora = require('ora')
const path = require('path') const path = require('path')
@ -28,7 +29,8 @@ module.exports = async (info) => {
template === 'custom' template === 'custom'
? path.join(process.cwd(), templatePath) ? path.join(process.cwd(), templatePath)
: path.join(__dirname, '..', 'template', template) : path.join(__dirname, '..', 'template', template)
const files = await globby(source, {
const files = await globby(normalize(source), {
dot: true dot: true
}) })

View file

@ -25,6 +25,8 @@
}, },
"peerDependencies": {}, "peerDependencies": {},
"dependencies": { "dependencies": {
"@freesewing/i18n": "^2.11.2",
"@freesewing/pattern-info": "^2.11.2",
"chalk": "^4.1.0", "chalk": "^4.1.0",
"commander": "^6.0.0", "commander": "^6.0.0",
"conf": "^7.1.1", "conf": "^7.1.1",
@ -36,13 +38,12 @@
"handlebars": "^4.7.6", "handlebars": "^4.7.6",
"inquirer": "^7.3.3", "inquirer": "^7.3.3",
"make-dir": "^3.1.0", "make-dir": "^3.1.0",
"normalize-path": "3.0.0",
"ora": "^4.0.5", "ora": "^4.0.5",
"p-each-series": "^2.1.0", "p-each-series": "^2.1.0",
"parse-git-config": "^3.0.0", "parse-git-config": "^3.0.0",
"validate-npm-package-name": "^3.0.0", "validate-npm-package-name": "^3.0.0",
"which": "^2.0.2", "which": "^2.0.2"
"@freesewing/i18n": "^2.11.2",
"@freesewing/pattern-info": "^2.11.2"
}, },
"devDependencies": {}, "devDependencies": {},
"files": [ "files": [