Skip to content

Commit

Permalink
prepare effector-dom for publishing to github registry
Browse files Browse the repository at this point in the history
  • Loading branch information
zerobias committed Dec 22, 2019
1 parent c416c7a commit 3af4227
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions tools/versionHash.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,21 @@ preparePackage(effectorPackage)
const registry = process.env.VERSION_HASH_REGISTRY
if (registry) {
prepareGithubPackage('@zerobias/effector', effectorPackage)
const effectorReactPackagePath = resolve(
__dirname,
'..',
'npm/effector-react/package.json',
)
const effectorReactPackage = readJSONSync(effectorReactPackagePath)
preparePackage(effectorReactPackage)
prepareGithubPackage('@zerobias/effector-react', effectorReactPackage)
outputJSONSync(effectorReactPackagePath, effectorReactPackage, {
preparePackageFull({
path: 'effector-react',
name: '@zerobias/effector-react',
})
preparePackageFull({
path: 'effector-dom',
name: '@zerobias/effector-dom',
})
}
function preparePackageFull({path, name}) {
const packagePath = resolve(__dirname, '..', 'npm', path, 'package.json')
const packageJson = readJSONSync(packagePath)
preparePackage(packageJson)
prepareGithubPackage(name, packageJson)
outputJSONSync(packagePath, packageJson, {
spaces: 2,
})
}
Expand Down

0 comments on commit 3af4227

Please sign in to comment.