1
0
Fork 0

use node conditional exports instead of reconfiguring exports for different use cases

This commit is contained in:
Enoch Riese 2023-07-27 18:52:58 -06:00
parent 1ce504b182
commit 7ff2bded15
79 changed files with 313 additions and 107 deletions

View file

@ -274,14 +274,7 @@ function packageJson(pkg) {
}
pkgConf.keywords = pkgConf.keywords.concat(keywords(pkg))
pkgConf.scripts = scripts(pkg)
/*
* If we building a site simply override the module entry so that we don't have
* to build any dependencies, but instead can just load them from source
*/
if (SITEBUILD) {
pkgConf.module = 'src/index.mjs'
pkgConf.exports = { '.': './src/index.mjs' }
}
if (repo.exceptions.skipTests.indexOf(pkg.name) !== -1) {
pkgConf.scripts.test = `echo "skipping tests for ${pkg.name}"`
pkgConf.scripts.testci = `echo "skipping tests for ${pkg.name}"`