-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Because, npm is just one of them.
Wrap this as "npm plugin"
Lines 47 to 68 in b630bf3
| const defaultRegistry = 'https://registry.npmjs.org/'; | |
| const registry = | |
| argv.registry || proc.env.NPM_REGISTRY || defaultRegistry; | |
| const content = ded`//registry.npmjs.org/:_authToken=${token} | |
| sign-git-tag=false | |
| git-tag-version=false | |
| allow-same-version=false | |
| `; | |
| const opts = { | |
| cwd: argv.cwd, | |
| stdio: 'inherit', | |
| }; | |
| await util.promisify(fs.writeFile)( | |
| path.join(argv.cwd, '.npmrc'), | |
| content, | |
| ); | |
| await exec(`npm version ${result.nextVersion}`, opts); | |
| await exec(`npm publish --registry ${registry}`, opts); | |
| console.log('Successfully published.'); |
To the plugin function pass argv, process.env and the result object.
Metadata
Metadata
Assignees
Labels
No labels