arylo-init
Advanced tools
Comparing version 1.0.6 to 1.0.7
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const fs = require("fs"); | ||
const glob = require("glob"); | ||
const mkdirp = require("mkdirp"); | ||
const glob = require("glob"); | ||
const path = require("path"); | ||
@@ -10,5 +10,7 @@ const constants = require("./constants"); | ||
if (Array.isArray(msg)) { | ||
// tslint:disable-next-line:no-console | ||
console.log(...msg); | ||
} | ||
else { | ||
// tslint:disable-next-line:no-console | ||
console.log(msg); | ||
@@ -40,8 +42,8 @@ } | ||
.pipe(fs.createWriteStream(to) | ||
.on('close', () => { | ||
.on("close", () => { | ||
const data = fs | ||
.readFileSync(to, { encoding: 'utf-8' }) | ||
.readFileSync(to, { encoding: "utf-8" }) | ||
.replace(/<year>/g, year) | ||
.replace(/<project_name>/g, projectName); | ||
fs.writeFileSync(to, data, { encoding: 'utf-8' }); | ||
fs.writeFileSync(to, data, { encoding: "utf-8" }); | ||
})); | ||
@@ -51,3 +53,3 @@ } | ||
}); | ||
if (cb && typeof cb === 'function') { | ||
if (cb && typeof cb === "function") { | ||
setTimeout(() => cb(), 50); | ||
@@ -72,7 +74,8 @@ } | ||
const filepaths = glob.sync("./**", { | ||
dot: true, cwd: constants.resourcesPath | ||
cwd: constants.resourcesPath, | ||
dot: true | ||
}); | ||
moveFiles('.', filepaths, () => { | ||
require('child_process').exec(`git init -q ${folderPath}`); | ||
moveFiles(".", filepaths, () => { | ||
require("child_process").exec(`git init -q ${folderPath}`); | ||
}); | ||
})(); |
@@ -1,2 +0,2 @@ | ||
import { basename } from 'path'; | ||
import { basename } from "path"; | ||
@@ -3,0 +3,0 @@ export let projectName = ""; |
import fs = require("fs"); | ||
import glob = require("glob"); | ||
import mkdirp = require("mkdirp"); | ||
import glob = require("glob"); | ||
import path = require("path"); | ||
@@ -9,5 +9,7 @@ import constants = require("./constants"); | ||
if (Array.isArray(msg)) { | ||
// tslint:disable-next-line:no-console | ||
console.log(...msg); | ||
} else { | ||
console.log(msg) | ||
// tslint:disable-next-line:no-console | ||
console.log(msg); | ||
} | ||
@@ -39,8 +41,8 @@ process.exit(1); | ||
.pipe(fs.createWriteStream(to) | ||
.on('close', () => { | ||
.on("close", () => { | ||
const data = fs | ||
.readFileSync(to, { encoding: 'utf-8' }) | ||
.readFileSync(to, { encoding: "utf-8" }) | ||
.replace(/<year>/g, year) | ||
.replace(/<project_name>/g, projectName); | ||
fs.writeFileSync(to, data, { encoding: 'utf-8' }); | ||
fs.writeFileSync(to, data, { encoding: "utf-8" }); | ||
}) | ||
@@ -51,3 +53,3 @@ ); | ||
}); | ||
if (cb && typeof cb === 'function') { | ||
if (cb && typeof cb === "function") { | ||
setTimeout(() => cb(), 50); | ||
@@ -75,7 +77,8 @@ } | ||
const filepaths = glob.sync("./**", { | ||
dot: true, cwd: constants.resourcesPath | ||
cwd: constants.resourcesPath, | ||
dot: true | ||
}); | ||
moveFiles('.', filepaths, () => { | ||
require('child_process').exec(`git init -q ${folderPath}`); | ||
moveFiles(".", filepaths, () => { | ||
require("child_process").exec(`git init -q ${folderPath}`); | ||
}); | ||
})() | ||
})(); |
{ | ||
"name": "arylo-init", | ||
"version": "1.0.6", | ||
"version": "1.0.7", | ||
"description": "Initial Node.js Project for Arylo Edition", | ||
@@ -15,3 +15,4 @@ "main": "./dist/index.js", | ||
"tsc": "tsc --locale zh-cn --pretty", | ||
"build": "npm run tsc -- -P tsconfig.json" | ||
"build": "npm run tsc -- -P tsconfig.json", | ||
"lint": "tslint lib/**/*.ts resources/**/*.ts" | ||
}, | ||
@@ -18,0 +19,0 @@ "repository": { |
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
12147
187