Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: use bun and Astro #176

Merged
merged 3 commits into from
Dec 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,12 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: yarn-cache
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- uses: oven-sh/setup-bun@v1

- name: Run unit tests
run: |
yarn
yarn test
bun install
bun prepack

- name: Trigger deploy
if: github.ref == 'refs/heads/master'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ jobs:
# https://docs.npmjs.com/generating-provenance-statements
run: |
npm install --force
npm run test
npm run prepack
npm publish --provenance --access public
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
.DS_Store
.svelte-kit
build-info.json
lib
node_modules
build
dist
10 changes: 4 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,17 @@ git remote add upstream [email protected]:carbon-design-system/carbon-icons-svelte.
git remote -v
```

Install the project dependencies:
## Prerequisites

```bash
yarn install
```
This repo uses `bun`. See the docs for [installation instructions](https://bun.sh/docs/installation).

## Workflow

### Building

Icons are generated using `vitest` as a test runner.
Icons are generated using `bun` as a test runner.

Run `yarn prepack` to build the library. Icons should be emitted to the `lib` folder and tests should pass.
Run `bun prepack` to build the library. Icons should be emitted to the `lib` folder and tests should pass.

## Submitting a Pull Request

Expand Down
Binary file added bun.lockb
Binary file not shown.
6 changes: 6 additions & 0 deletions docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import svelte from "@astrojs/svelte";
import { defineConfig } from "astro/config";

export default defineConfig({
integrations: [svelte()],
});
Loading
Loading