-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(npm): Publish to the old angular-ui-router npm package too
Closes #3683
- Loading branch information
1 parent
13ba660
commit 8fc3bb2
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!env node | ||
'use strict'; | ||
const fs = require('fs'); | ||
const path = require('path'); | ||
const util = require('@uirouter/publish-scripts/util'); | ||
const version = require('../package.json').version; | ||
const _exec = util._exec; | ||
|
||
util.packageDir(); | ||
const packagePath = path.resolve(__dirname, '..', 'package.json'); | ||
const packageJson = JSON.parse(fs.readFileSync(packagePath)); | ||
util.ensureCleanMaster('master'); | ||
packageJson.name = 'angular-ui-router'; | ||
fs.writeFileSync(packagePath, JSON.stringify(packageJson, null, 2)); | ||
|
||
_exec(`npm publish`); | ||
_exec(`git checkout package.json`); |