-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Monorepo tooling updates (#75)
* chore: Update update-sites script to work on Node 16+ * chore: Test on lts and current Node versions * chore: Add docs workspace * chore: Add engines, OS to root package.json
- Loading branch information
Showing
5 changed files
with
193 additions
and
21 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,21 +1,40 @@ | ||
# Docs site -------------------------------------------------- | ||
# Update package.json and package-lock.json files with latest PRPL deps. | ||
# Some workspace commands (e.g. install, update) are borked, so we have to do this manually. | ||
|
||
# Update docs site | ||
cd docs | ||
npm i @prpl/core@latest @prpl/plugin-code-highlight@latest @prpl/plugin-css-imports@latest @prpl/plugin-html-imports@latest @prpl/plugin-sitemap@latest && npm i --workspaces=false -D @prpl/server@latest | ||
cd .. | ||
git add . | ||
git commit -m "chore(docs): Update PRPL deps" | ||
core_latest=$(npm view "@prpl/core" version) | ||
server_latest=$(npm view "@prpl/server" version) | ||
|
||
# Update example site deps | ||
npm pkg set "dependencies[@prpl/core]"="^${core_latest}" --workspace=examples | ||
npm pkg set "devDependencies[@prpl/server]"="^${server_latest}" --workspace=examples | ||
|
||
# Example sites -------------------------------------------------- | ||
# Update docs deps | ||
npm pkg set "dependencies[@prpl/core]"="^${core_latest}" --workspace=docs | ||
npm pkg set "devDependencies[@prpl/server]"="^${server_latest}" --workspace=docs | ||
|
||
examples=("basic" "esm" "commonjs" "deno") | ||
plugins=("core" "plugin-code-highlight" "plugin-css-imports" "plugin-html-imports" "plugin-sitemap") | ||
|
||
for plugin in ${plugins[@]}; do | ||
latest=$(npm view "@prpl/${plugin}" version) | ||
npm pkg set "dependencies[@prpl/${plugin}]"="^${latest}" --workspace=docs | ||
done | ||
|
||
# Recreate lockfiles, workspaces + lockfiles are broken in npm | ||
examples=("examples/basic" "examples/commonjs" "examples/deno" "examples/esm") | ||
|
||
# Recreate example lockfiles | ||
for example in ${examples[@]}; do | ||
cd "examples/${example}" | ||
npm i @prpl/core@latest @prpl/server@latest | ||
cd $example | ||
rm package-lock.json | ||
npm install --workspaces=false | ||
cd ../.. | ||
done | ||
|
||
git add . | ||
git commit -m "chore(examples): Update PRPL deps" | ||
# Recreate docs lockfile | ||
cd docs | ||
rm package-lock.json | ||
npm install --workspaces=false | ||
cd ../ | ||
|
||
# Show if tree is borked or not | ||
npm ls |