chore: Updated scripts and structure for new sites
This commit is contained in:
parent
79a8b4b964
commit
1ad8c9e310
5 changed files with 45 additions and 12 deletions
|
@ -9,7 +9,7 @@ customChangelog:
|
|||
- freesewing.dev
|
||||
- freesewing.shared
|
||||
- freesewing.org
|
||||
customPacakgeJson:
|
||||
customPackageJson:
|
||||
- freesewing.dev
|
||||
- freesewing.shared
|
||||
- freesewing.org
|
||||
|
|
9
packages/freesewing.dev/CHANGELOG.md
Normal file
9
packages/freesewing.dev/CHANGELOG.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Change log for: freesewing.dev
|
||||
|
||||
|
||||
|
||||
This is the **initial release**, and the start of this change log.
|
||||
|
||||
> Prior to version 2, FreeSewing was not a JavaScript project.
|
||||
> As such, that history is out of scope for this change log.
|
||||
|
9
packages/freesewing.org/CHANGELOG.md
Normal file
9
packages/freesewing.org/CHANGELOG.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Change log for: freesewing.org
|
||||
|
||||
|
||||
|
||||
This is the **initial release**, and the start of this change log.
|
||||
|
||||
> Prior to version 2, FreeSewing was not a JavaScript project.
|
||||
> As such, that history is out of scope for this change log.
|
||||
|
9
packages/freesewing.shared/CHANGELOG.md
Normal file
9
packages/freesewing.shared/CHANGELOG.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Change log for: freesewing.shared
|
||||
|
||||
|
||||
|
||||
This is the **initial release**, and the start of this change log.
|
||||
|
||||
> Prior to version 2, FreeSewing was not a JavaScript project.
|
||||
> As such, that history is out of scope for this change log.
|
||||
|
|
@ -504,24 +504,30 @@ function configurePkgUnitTests(type, pkg, config) {
|
|||
* New: Adds unit tests for patterns
|
||||
*/
|
||||
function reconfigure(pkgs, config) {
|
||||
for (let pkg of pkgs) {
|
||||
for (const pkg of pkgs) {
|
||||
console.log(chalk.blueBright(`Reconfiguring ${pkg}`))
|
||||
let pkgConfig = packageConfig(pkg, config)
|
||||
fs.writeFileSync(
|
||||
path.join(config.repoPath, 'packages', pkg, 'package.json'),
|
||||
JSON.stringify(pkgConfig, null, 2) + '\n'
|
||||
)
|
||||
if (config.exceptions.customPackageJson.indexOf(pkg) === -1) {
|
||||
const pkgConfig = packageConfig(pkg, config)
|
||||
fs.writeFileSync(
|
||||
path.join(config.repoPath, 'packages', pkg, 'package.json'),
|
||||
JSON.stringify(pkgConfig, null, 2) + '\n'
|
||||
)
|
||||
}
|
||||
if (config.exceptions.customRollup.indexOf(pkg) === -1) {
|
||||
fs.writeFileSync(
|
||||
path.join(config.repoPath, 'packages', pkg, 'rollup.config.js'),
|
||||
config.templates.rollup
|
||||
)
|
||||
}
|
||||
fs.writeFileSync(path.join(config.repoPath, 'packages', pkg, 'README.md'), readme(pkg, config))
|
||||
fs.writeFileSync(
|
||||
path.join(config.repoPath, 'packages', pkg, 'CHANGELOG.md'),
|
||||
changelog(pkg, config)
|
||||
)
|
||||
if (config.exceptions.customReadme.indexOf(pkg) === -1) {
|
||||
fs.writeFileSync(path.join(config.repoPath, 'packages', pkg, 'README.md'), readme(pkg, config))
|
||||
}
|
||||
if (config.exceptions.customChangelog.indexOf(pkg) === -1) {
|
||||
fs.writeFileSync(
|
||||
path.join(config.repoPath, 'packages', pkg, 'CHANGELOG.md'),
|
||||
changelog(pkg, config)
|
||||
)
|
||||
}
|
||||
const type = packageType(pkg, config)
|
||||
if (type === 'pattern') configurePatternExample(pkg, config)
|
||||
if (['pattern', 'plugin'].indexOf(type) !== -1) configurePkgUnitTests(type, pkg, config)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue