Skip to content

Commit

Permalink
build: use bun and Astro (#176)
Browse files Browse the repository at this point in the history
* build: use bun

* build: replace SvelteKit with Astro
  • Loading branch information
metonym authored Dec 2, 2023
1 parent b27a19a commit 9da9cba
Show file tree
Hide file tree
Showing 31 changed files with 18,203 additions and 1,688 deletions.
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

0 comments on commit 9da9cba

Please sign in to comment.