-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e1b67b
commit 40e414c
Showing
28 changed files
with
251 additions
and
274 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
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ inputs: | |
required: true | ||
|
||
outputs: | ||
files: | ||
names: | ||
value: ${{ steps.files.outputs.result }} | ||
|
||
runs: | ||
|
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
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
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
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
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,38 @@ | ||
const getDefaultConfig = require('@npmcli/template-oss-config') | ||
|
||
const { name: NAME, version: VERSION } = require('../../package.json') | ||
const DEFAULT_CONTENT = require.resolve('@npmcli/template-oss-content') | ||
const CONFIG_KEY = 'templateOSS' | ||
|
||
const getConfig = async (opts) => { | ||
const { pkg, rootPkg } = opts | ||
const isLatest = pkg.config.version === VERSION | ||
const isDogFood = rootPkg.pkgJson.name === NAME | ||
const isForce = process.argv.includes('--force') | ||
|
||
return { | ||
...await getDefaultConfig({ | ||
...opts, | ||
defaultContent: DEFAULT_CONTENT, | ||
}), | ||
__NAME__: NAME, | ||
__NAME_FS__: NAME.replace(/\//g, '-').replace(/@/g, ''), | ||
__CONFIG_KEY__: CONFIG_KEY, | ||
__VERSION__: VERSION, | ||
// needs update if we are dogfooding this repo, with force argv, or its | ||
// behind the current version | ||
needsUpdate: isForce || isDogFood || !isLatest, | ||
// booleans to control application of updates | ||
isForce, | ||
isDogFood, | ||
isLatest, | ||
} | ||
} | ||
|
||
module.exports = { | ||
getConfig, | ||
NAME, | ||
VERSION, | ||
CONFIG_KEY, | ||
DEFAULT_CONTENT, | ||
} |
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
Oops, something went wrong.