-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[changed] all options has been moved under the common json node
"release-script" in package.json
- Loading branch information
Showing
2 changed files
with
12 additions
and
7 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,9 +16,11 @@ Say the name of your project is: | |
Then name `bower` github repo as: | ||
`original-project-name-bower`. | ||
|
||
Add `bowerRepo` into your `package.json`: | ||
Add `'release-script'.bowerRepo` into your `package.json`: | ||
```js | ||
"bowerRepo": "[email protected]:<author>/original-project-name-bower.git", | ||
"release-script": { | ||
"bowerRepo": "[email protected]:<author>/original-project-name-bower.git" | ||
} | ||
``` | ||
|
||
Then add additional step into your building process, | ||
|
@@ -63,9 +65,11 @@ that have been written by [Matt Smith @mtscout6](https://github.com/mtscout6) | |
> npm install -D release-script | ||
``` | ||
|
||
Set `bowerRepo` into your `package.json` if you need `bower` releases too. | ||
Set `'release-script'.bowerRepo` into your `package.json` if you need `bower` releases too. | ||
```js | ||
"bowerRepo": "[email protected]:<org-author-name>/<name-of-project>-bower.git", | ||
"release-script": { | ||
"bowerRepo": "[email protected]:<org-author-name>/<name-of-project>-bower.git" | ||
} | ||
``` | ||
|
||
Then you can release like that: | ||
|
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 |
---|---|---|
|
@@ -18,8 +18,9 @@ const changelog = path.join(repoRoot, 'CHANGELOG.md'); | |
|
||
const npmjson = JSON.parse(cat(packagePath)); | ||
|
||
const bowerRoot = path.join(repoRoot, (npmjson.bowerRoot || 'amd/')); | ||
const tmpBowerRepo = path.join(repoRoot, (npmjson.tmpBowerRepo || 'tmp-bower-repo')); | ||
const configOptions = npmjson['release-script'] || {}; | ||
const bowerRoot = path.join(repoRoot, (configOptions.bowerRoot || 'amd/')); | ||
const tmpBowerRepo = path.join(repoRoot, (configOptions.tmpBowerRepo || 'tmp-bower-repo')); | ||
|
||
// let bowerRepo; | ||
// if (npmjson.bowerRepo) { | ||
|
@@ -31,7 +32,7 @@ const tmpBowerRepo = path.join(repoRoot, (npmjson.tmpBowerRepo || 'tmp-bower-rep | |
// gitUrlBase = gitUrlBase || npmjson.repository.url; | ||
// bowerRepo = `[email protected]:${gitUrlBase}-bower.git`; | ||
// } | ||
const bowerRepo = npmjson.bowerRepo; // if it is not set, then there is no bower repo | ||
const bowerRepo = configOptions.bowerRepo; // if it is not set, then there is no bower repo | ||
|
||
//------------------------------------------------------------------------------ | ||
// command line options | ||
|