Skip to content
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
3 changes: 0 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
* text=auto
*.njk text
*.pug text
/.yarn/releases/** binary
/.yarn/plugins/** binary
*.cjs filter=lfs diff=lfs merge=lfs -text
docs/explore.gif filter=lfs diff=lfs merge=lfs -text
26 changes: 7 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,35 +11,23 @@ jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
lfs: true

- name: Checkout LFS objects
run: git lfs checkout

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
node-version: '14.7'
cache: yarn
bun-version: latest

- name: Install
run: |
npm install -g yarn
yarn install --immutable-cache
run: bun install

- name: Lint
run: yarn lint
run: bun run lint

- name: Test
run: yarn test
run: bun run test

- name: Build
run: yarn build
run: bun run build
14 changes: 6 additions & 8 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
lfs: true

- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install
run: |
npm install -g yarn
yarn install --immutable-cache
run: bun install

- name: Build docs
run: yarn run build:docs
run: bun run build:docs

- name: Analysis API
uses: JamesIves/github-pages-deploy-action@4.1.4
Expand Down
16 changes: 7 additions & 9 deletions .github/workflows/test-cross-platform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,17 @@ jobs:
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
lfs: true

- name: Checkout LFS objects
run: git lfs checkout
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install
run: |
npm install -g yarn
yarn install --immutable-cache
run: bun install

- name: Lint
run: yarn run lint
run: bun run lint

- name: Test
run: yarn test
run: bun run test
9 changes: 2 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,8 @@ dist
*.tgz
*.log

.yarn/*
!.yarn/patches
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions
.pnp.*
# Bun
.bun
*.tsbuildinfo

gh-pages
Expand Down
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"jest.jestCommandLine": "yarn test",
"jest.jestCommandLine": "bun test",
"jest.autoRun": "off",
"files.exclude": {
"p5-analysis": true,
Expand Down
3 changes: 0 additions & 3 deletions .yarn/plugins/@yarnpkg/plugin-constraints.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarn/plugins/@yarnpkg/plugin-version.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

3 changes: 0 additions & 3 deletions .yarn/releases/yarn-3.1.0.cjs

This file was deleted.

Empty file removed .yarn/versions/45ce5ebf.yml
Empty file.
2 changes: 0 additions & 2 deletions .yarn/versions/4c7aa7d8.yml

This file was deleted.

30 changes: 0 additions & 30 deletions .yarnrc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions p5-analysis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ yard add p5-analysis
`p5-libraries list` – list the known libraries

With `--json`, this can be used with [jq](https://stedolan.github.io/jq/), e.g.
`yarn cli:libraries list --json | jq '.[].importPath'` to list all the import
paths, or `yarn cli:libraries list --json | jq '.[] | select(.packageName) |
`bun run cli:libraries list --json | jq '.[].importPath'` to list all the import
paths, or `bun run cli:libraries list --json | jq '.[] | select(.packageName) |
.name'` to print the names of libraries that have been published as NPM
packages.

Expand Down
4 changes: 2 additions & 2 deletions p5-analysis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@
"repository": "github:osteele/p5-server",
"scripts": {
"build": "run-s clean build:copy-files && tsc --declaration",
"build:docs": "typedoc src/index.ts && yarn run cli:libraries docs | pandoc -s --toc --shift-heading-level-by -1 > build/docs/libraries.html",
"build:docs": "typedoc src/index.ts && bun run cli:libraries docs | pandoc -s --toc --shift-heading-level-by -1 > build/docs/libraries.html",
"build:copy-files": "copyfiles -u 1 'src/**/*' -e '**/*.ts' dist/",
"clean": "rimraf dist",
"cli": "ts-node --files src/bin/p5-analyze-cli.ts",
"cli:libraries": "ts-node --files src/bin/p5-libraries-cli.ts",
"cli:library": "ts-node --files src/bin/p5-libraries-cli.ts",
"cli:tree": "ts-node --files src/bin/p5-tree-cli.ts",
"lint": "eslint src/**/*.ts tests/**/*.ts",
"prepack": "yarn run build",
"prepack": "bun run build",
"test": "jest",
"test:watch": "jest --watch"
},
Expand Down
4 changes: 2 additions & 2 deletions p5-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
"clean": "rimraf dist 'src/server/static/*.min.js' 'src/server/static/*.min.js.map'",
"cli": "ts-node src/bin/p5-server.ts",
"_dev": "nodemon -w src -e 'js ts css html json njk pug' src/bin/p5-server.ts serve",
"dev": "yarn _dev examples",
"dev": "bun run _dev examples",
"lint": "eslint src tests",
"postpack": "rm README.md",
"prepack": "run-s build build:readme",
"start": "ts-node src/bin/p5-server.ts server",
"test": "jest",
"test:watch": "jest --watch",
"watch:testdata": "yarn _dev tests/testdata"
"watch:testdata": "bun run _dev tests/testdata"
},
"dependencies": {
"@types/ws": "^8.2.2",
Expand Down
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"private": true,
"packageManager": "yarn@3.1.0",
"packageManager": "bun@1.0.0",
"workspaces": [
"p5-analysis",
"p5-server"
],
"scripts": {
"build": "yarn workspaces foreach -tv run build",
"build:docs": "yarn build:docs:root && yarn workspaces foreach -v run build:docs",
"build": "bun --cwd p5-analysis run build && bun --cwd p5-server run build",
"build:docs": "bun run build:docs:root && bun --cwd p5-analysis run build:docs && bun --cwd p5-server run build:docs",
"build:docs:root": "pandoc -dpandoc.yml README.md -o gh-pages/index.html && cp -r docs LICENSE gh-pages",
"gh-pages:build": "rimraf 'gh-pages/*' && yarn build:docs && cp -r p5-analysis/build/docs gh-pages/p5-analysis && cp -r p5-server/build/docs gh-pages/p5-server",
"gh-pages:build": "rimraf 'gh-pages/*' && bun run build:docs && cp -r p5-analysis/build/docs gh-pages/p5-analysis && cp -r p5-server/build/docs gh-pages/p5-server",
"gh-pages:publish": "cd gh-pages && git add -A && (git commit -m 'gh-pages:publish' || true) && git push origin +gh-pages",
"gh-pages": "yarn gh-pages:build && yarn gh-pages:publish",
"clean": "yarn workspaces foreach run clean:ws",
"gh-pages": "bun run gh-pages:build && bun run gh-pages:publish",
"clean": "bun --cwd p5-analysis run clean:ws && bun --cwd p5-server run clean:ws",
"clean:ws": "cd $INIT_CWD && rimraf build dist",
"format": "prettier-eslint --write \"{,!(node_modules)/**/}*.ts\"",
"lint": "yarn workspaces foreach run lint",
"lint": "bun --cwd p5-analysis run lint && bun --cwd p5-server run lint",
"prepare": "husky install",
"test": "yarn workspace p5-analysis build && yarn workspaces foreach -tv run test"
"test": "bun --cwd p5-analysis run build && bun --cwd p5-server run test && bun --cwd p5-analysis run test"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.6.0",
Expand Down
Loading