create-javascript-project
Advanced tools
Comparing version 1.3.0 to 1.4.0
@@ -16,3 +16,3 @@ "use strict"; | ||
// Set nodeLinker mode to "node-modules" | ||
await process_1.writeContentToFile(process_1.withCurrentDir("./.yarnrc.yml"), "nodeLinker: node-modules"); | ||
await process_1.runCommand("yarn", ["config", "set", "nodeLinker", "node-modules"]); | ||
// Add plugins | ||
@@ -23,2 +23,5 @@ this.userConfigs.typescript && (await process_1.runCommand("yarn", ["plugin", "import", "typescript"])); | ||
await process_1.runCommand("yarn", ["plugin", "import", "version"]); | ||
// Set changesetBaseRefs to default branch (require version plugin) | ||
const changesetBaseRefs = configs_1.getChangesetBaseRefs(this.userConfigs.defaultBranch); | ||
await process_1.runCommand("yarn", ["config", "set", "changesetBaseRefs", changesetBaseRefs]); | ||
// Remove old .yarnrc | ||
@@ -25,0 +28,0 @@ await process_1.removeFile(process_1.withCurrentDir("./.yarnrc")); |
@@ -31,1 +31,2 @@ export declare const zeroInstalls = "\n# yarn 2 (Zero-Installs)\n.yarn/*\n!.yarn/cache\n!.yarn/patches\n!.yarn/plugins\n!.yarn/releases\n!.yarn/sdks\n!.yarn/versions\n"; | ||
}; | ||
export declare const getChangesetBaseRefs: (branch?: string) => string; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.flowConfigs = exports.postIgnoreFiles = exports.ignoreFiles = exports.eslintBaseConfigs = exports.nonZeroInstalls = exports.zeroInstalls = void 0; | ||
exports.getChangesetBaseRefs = exports.flowConfigs = exports.postIgnoreFiles = exports.ignoreFiles = exports.eslintBaseConfigs = exports.nonZeroInstalls = exports.zeroInstalls = void 0; | ||
exports.zeroInstalls = ` | ||
@@ -63,1 +63,3 @@ # yarn 2 (Zero-Installs) | ||
}; | ||
const getChangesetBaseRefs = (branch = "master") => [`${branch}`, `origin/${branch}`, `upstream/${branch}`].join(","); | ||
exports.getChangesetBaseRefs = getChangesetBaseRefs; |
@@ -41,2 +41,9 @@ "use strict"; | ||
{ | ||
type: "input", | ||
name: "defaultBranch", | ||
message: "What is default branch (git) of this project?", | ||
when: (answers) => answers.configurations.includes("yarn2"), | ||
default: "master", | ||
}, | ||
{ | ||
type: "list", | ||
@@ -43,0 +50,0 @@ name: "framework", |
export declare type Yarn2Configs = { | ||
zeroInstalls?: boolean; | ||
defaultBranch?: string; | ||
}; | ||
@@ -4,0 +5,0 @@ export declare type Framework = "react" | "none"; |
{ | ||
"name": "create-javascript-project", | ||
"description": "Keep you away from boring procedures for new JavaScript/TypeScript project", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"author": "Khánh Hoàng @hckhanh", | ||
@@ -6,0 +6,0 @@ "bin": { |
@@ -43,3 +43,3 @@ # create-javascript-project | ||
$ create-javascript-project (-v|--version|version) | ||
create-javascript-project/1.3.0 linux-x64 node-v14.16.0 | ||
create-javascript-project/1.4.0 linux-x64 node-v14.16.0 | ||
$ create-javascript-project --help [COMMAND] | ||
@@ -46,0 +46,0 @@ USAGE |
47216
1055