create-lecloud-app
Advanced tools
Comparing version 0.0.3-alpha.1 to 0.0.3
@@ -29,2 +29,6 @@ #!/usr/bin/env node | ||
const command_line_args_1 = __importDefault(require("command-line-args")); | ||
// eslint-disable-next-line no-extend-native | ||
String.prototype.toStandardPath = function () { | ||
return this.replace(/\\/g, '/'); | ||
}; | ||
const errorExit = (reason) => { | ||
@@ -70,3 +74,3 @@ console.error((0, kolorist_1.red)(reason)); | ||
fs_extra_1.default.mkdirSync(projectPath); | ||
for (const file of fast_glob_1.default.sync(path_1.default.resolve(templatePath, './**/*').replace(/\\/g, '/')).map(v => path_1.default.normalize(v))) { | ||
for (const file of fast_glob_1.default.sync((path_1.default.resolve(templatePath, './**/*').toStandardPath())).map(v => path_1.default.normalize(v))) { | ||
const fileName = path_1.default.basename(file); | ||
@@ -106,4 +110,4 @@ if (['.DS_Store'].includes(fileName) || fs_extra_1.default.statSync(file).isDirectory()) { | ||
try { | ||
del_1.default.sync(templatePkgPath, { force: true }); | ||
del_1.default.sync(templateUnpkgPath, { force: true }); | ||
del_1.default.sync(templatePkgPath.toStandardPath(), { force: true }); | ||
del_1.default.sync(templateUnpkgPath.toStandardPath(), { force: true }); | ||
} | ||
@@ -110,0 +114,0 @@ catch (error) { } |
{ | ||
"name": "create-lecloud-app", | ||
"version": "0.0.3-alpha.1", | ||
"version": "0.0.3", | ||
"main": "dist/index.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
7207
123