Skip to content

Commit

Permalink
Run size limit checks against basics example (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
delucis authored Aug 9, 2023
1 parent 6a7692a commit bf91e27
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 53 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/size-limit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ jobs:
uses: andresz1/size-limit-action@dd31dce7dcc72a041fd3e49abf0502b13fc4ce05
with:
github_token: ${{ secrets.FREDKBOT_GITHUB_TOKEN }}
directory: docs/
build_script: 'build:examples'
package_manager: pnpm
24 changes: 2 additions & 22 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
"scripts": {
"test": "start-server-and-test preview http://localhost:3000 pa11y",
"pa11y": "pa11y-ci --sitemap 'http://localhost:3000/sitemap-index.xml' --sitemap-find 'https://starlight.astro.build' --sitemap-replace 'http://localhost:3000'",
"size": "size-limit",
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
Expand All @@ -15,35 +14,16 @@
},
"dependencies": {
"@astrojs/starlight": "workspace:*",
"astro": "^2.10.1",
"astro": "^2.10.4",
"sharp": "^0.32.3"
},
"devDependencies": {
"@size-limit/file": "^8.2.4",
"hast-util-from-html": "^1.0.2",
"hast-util-to-string": "^2.0.0",
"hastscript": "^7.2.0",
"pa11y-ci": "^3.0.1",
"rehype": "^12.0.1",
"size-limit": "^8.2.4",
"start-server-and-test": "^2.0.0",
"unist-util-visit": "^4.1.2"
},
"size-limit": [
{
"name": "/index.html",
"path": "dist/index.html",
"limit": "14 kB"
},
{
"name": "/_astro/*.js",
"path": "dist/_astro/*.js",
"limit": "20 kB"
},
{
"name": "/_astro/*.css",
"path": "dist/_astro/*.css",
"limit": "10 kB"
}
]
}
}
2 changes: 1 addition & 1 deletion examples/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
},
"dependencies": {
"@astrojs/starlight": "^0.6.1",
"astro": "^2.10.1",
"astro": "^2.10.4",
"sharp": "^0.32.3"
}
}
27 changes: 24 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,37 @@
"version": "1.0.0",
"description": "",
"scripts": {
"build:examples": "pnpm --filter @example/* build",
"size": "size-limit",
"version": "pnpm changeset version && pnpm i --no-frozen-lockfile",
"format": "prettier -w --cache --plugin prettier-plugin-astro ."
},
"license": "MIT",
"devDependencies": {
"@changesets/changelog-github": "^0.4.8",
"@changesets/cli": "^2.26.1",
"astro": "^2.10.1",
"@size-limit/file": "^8.2.4",
"astro": "^2.10.4",
"prettier": "^3.0.0",
"prettier-plugin-astro": "^0.11.0"
"prettier-plugin-astro": "^0.11.0",
"size-limit": "^8.2.4"
},
"packageManager": "pnpm@8.2.0"
"packageManager": "pnpm@8.2.0",
"size-limit": [
{
"name": "/index.html",
"path": "examples/basics/dist/index.html",
"limit": "14 kB"
},
{
"name": "/_astro/*.js",
"path": "examples/basics/dist/_astro/*.js",
"limit": "20 kB"
},
{
"name": "/_astro/*.css",
"path": "examples/basics/dist/_astro/*.css",
"limit": "10 kB"
}
]
}
2 changes: 1 addition & 1 deletion packages/starlight/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"devDependencies": {
"@types/node": "^18.16.19",
"@vitest/coverage-v8": "^0.33.0",
"astro": "^2.10.1",
"astro": "^2.10.4",
"vitest": "^0.33.0"
},
"dependencies": {
Expand Down
50 changes: 25 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bf91e27

Please sign in to comment.