Skip to content

Commit

Permalink
fix(npm): Publish to the old angular-ui-router npm package too
Browse files Browse the repository at this point in the history
Closes #3683
  • Loading branch information
christopherthielen committed May 19, 2018
1 parent 13ba660 commit 8fc3bb2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"debug": "karma start --singleRun=false --autoWatch=true --autoWatchInterval=1 --browsers=Chrome",
"docs": "generate_docs",
"docs:publish": "generate_docs && publish_docs",
"release": "release --deps @uirouter/core && node ./scripts/bower_release.js",
"release": "release --deps @uirouter/core && node ./scripts/npm_angular_ui_router_release.js && node ./scripts/bower_release.js",
"prepublishOnly": "npm run build",
"artifacts": "artifact_tagging",
"precommit": "pretty-quick --staged"
Expand Down
17 changes: 17 additions & 0 deletions scripts/npm_angular_ui_router_release.js
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`);

0 comments on commit 8fc3bb2

Please sign in to comment.