oclif 3.7.0 → 3.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.oclif.manifest.json +1 -1
- package/lib/generators/cli.js +6 -1
- package/package.json +2 -2
package/.oclif.manifest.json
CHANGED
package/lib/generators/cli.js
CHANGED
|
@@ -94,7 +94,7 @@ class CLI extends Generator {
|
|
|
94
94
|
type: 'input',
|
|
95
95
|
name: 'github.repo',
|
|
96
96
|
message: 'What is the GitHub name of repository (https://github.com/owner/REPO)',
|
|
97
|
-
default: (answers) => (this.pjson.repository ||
|
|
97
|
+
default: (answers) => (answers.name || this.pjson.repository || this.pjson.name).split('/').pop(),
|
|
98
98
|
},
|
|
99
99
|
{
|
|
100
100
|
type: 'list',
|
|
@@ -129,6 +129,10 @@ class CLI extends Generator {
|
|
|
129
129
|
this.pjson.oclif.dirname = this.answers.bin;
|
|
130
130
|
this.pjson.bin = {};
|
|
131
131
|
this.pjson.bin[this.pjson.oclif.bin] = './bin/run';
|
|
132
|
+
if (!this.options.yarn) {
|
|
133
|
+
const scripts = (this.pjson.scripts || {});
|
|
134
|
+
this.pjson.scripts = Object.fromEntries(Object.entries(scripts).map(([k, v]) => [k, v.replace('yarn', 'npm run')]));
|
|
135
|
+
}
|
|
132
136
|
}
|
|
133
137
|
writing() {
|
|
134
138
|
if (this.pjson.oclif && Array.isArray(this.pjson.oclif.plugins)) {
|
|
@@ -139,6 +143,7 @@ class CLI extends Generator {
|
|
|
139
143
|
this.pjson.files = _.uniq((this.pjson.files || []).sort());
|
|
140
144
|
this.fs.writeJSON(this.destinationPath('./package.json'), this.pjson);
|
|
141
145
|
this.fs.write(this.destinationPath('.gitignore'), this._gitignore());
|
|
146
|
+
this.fs.delete(this.destinationPath('LICENSE'));
|
|
142
147
|
}
|
|
143
148
|
end() {
|
|
144
149
|
this.spawnCommandSync(this.env.options.nodePackageManager, ['run', 'build']);
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "oclif",
|
|
3
3
|
"description": "oclif: create your own CLI",
|
|
4
|
-
"version": "3.7.
|
|
4
|
+
"version": "3.7.2",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
7
|
"oclif": "bin/run"
|
|
8
8
|
},
|
|
9
9
|
"bugs": "https://github.com/oclif/oclif/issues",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@oclif/core": "^2.
|
|
11
|
+
"@oclif/core": "^2.7.1",
|
|
12
12
|
"@oclif/plugin-help": "^5.1.19",
|
|
13
13
|
"@oclif/plugin-not-found": "^2.3.7",
|
|
14
14
|
"@oclif/plugin-warn-if-update-available": "^2.0.14",
|