-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 308324b
Showing
14 changed files
with
1,132 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Changesets | ||
|
||
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works | ||
with multi-package repos, or single-package repos to help you version and publish your code. You can | ||
find the full documentation for it [in our repository](https://github.com/changesets/changesets) | ||
|
||
We have a quick list of common questions to get you started engaging with this project in | ||
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) |
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json", | ||
"changelog": "@changesets/cli/changelog", | ||
"commit": false, | ||
"fixed": [], | ||
"linked": [], | ||
"access": "restricted", | ||
"baseBranch": "main", | ||
"updateInternalDependencies": "patch", | ||
"ignore": [] | ||
} |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: 'Setup Node, deno, pnpm & install' | ||
|
||
description: 'Setup node, deno, pnpm and install' | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: pnpm/[email protected] | ||
with: | ||
version: 8 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: '20' | ||
cache: 'pnpm' | ||
cache-dependency-path: './pnpm-lock.yaml' | ||
|
||
- uses: denoland/setup-deno@v1 | ||
with: | ||
deno-version: v1.x | ||
|
||
- name: Install | ||
shell: bash | ||
run: pnpm install --frozen-lockfile | ||
|
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: Release Changeset | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
release: | ||
permissions: | ||
contents: write | ||
issues: write | ||
pull-requests: write | ||
|
||
name: Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup Javascript | ||
uses: ./.github/actions/setup-project | ||
|
||
- name: Create Release Pull Request | ||
uses: changesets/action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
publish: "pnpm run ci:publish" | ||
version: "pnpm run ci:version" | ||
title: "🎉 Release" | ||
createGithubReleases: true |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Continous integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- '*' | ||
|
||
jobs: | ||
checkout: | ||
runs-on: ubuntu-latest | ||
|
||
name: 'Install, lint and test' | ||
|
||
steps: | ||
- name: 'Checkout' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Setup Javascript' | ||
uses: ./.github/actions/setup-project | ||
|
||
- name: 'Lint' | ||
run: deno task lint | ||
|
||
- name: 'Test' | ||
run: deno task test |
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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: On merge changeset | ||
|
||
on: | ||
# To enable the Changeset pattern, you'll need to uncomment those line so each | ||
# time a Pull Request is closed you run this action. | ||
# pull_request: | ||
# types: [closed] | ||
# branches: | ||
# - 'main' | ||
# Every push on main are going to run this action. | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
permissions: | ||
id-token: write | ||
contents: read | ||
|
||
jobs: | ||
publish: | ||
# To ensure you only run this action when closing a Release PR, you should | ||
# uncomment this | ||
# if: contains(github.event.pull_request.head.ref, 'changeset-release') | ||
|
||
name: 'Upload script' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Setup Javascript' | ||
uses: ./.github/actions/setup-project | ||
|
||
- name: Bundle the script into a single file | ||
run: deno task build | ||
|
||
- name: Publish the script to Bunny | ||
uses: 'BunnyWay/actions/deploy-script@main' | ||
with: | ||
script_id: ${{ secrets.SCRIPT_ID }} | ||
file: "dist/index.ts" |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
/dist/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
.vscode | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
# es-wasm-application |
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Template: es-wasm-application | ||
|
||
This templates demonstrates a WASM application built for Bunny using a local `Deno`. | ||
|
||
> You do not want to use Deno? Feel free to use something else, [here](https://bunny.net) is a full | ||
> fledged example with `node` instead! | ||
## Setup | ||
|
||
To run this example you'll need to have a valid | ||
[Deno](https://docs.deno.com/runtime/manual/getting_started/installation/) installation. | ||
|
||
When you have the `deno` binary available, you should be able to run the `check` | ||
task which is the task ensuring everything is compiling fine. | ||
|
||
``` | ||
# A tiny lint just to be sure! | ||
deno task lint | ||
# We ensure everything is type compliant! | ||
deno task check | ||
``` | ||
|
||
We also use `pnpm` to use `changeset`. | ||
|
||
## Changeset | ||
|
||
This template uses [changeset](https://github.com/changesets/changesets) for | ||
version management. Changeset helps track and document changes in your project, | ||
making it easier to manage releases and generate changelogs. | ||
|
||
When you make changes to the project, you should create a changeset to describe | ||
those changes: | ||
|
||
1. Run the following command: | ||
``` | ||
pnpm changeset | ||
``` | ||
2. Follow the prompts to select the type of change (major, minor, or patch) and provide a brief description. | ||
3. Commit the generated changeset file along with your code changes. | ||
|
||
This process ensures that all modifications are properly documented and | ||
versioned, facilitating smoother releases and better communication about | ||
project updates. | ||
|
||
When you merge a pull request that includes a changeset, it will automatically | ||
create an associated pull request to release your changes. | ||
|
||
This new pull request will trigger the release process of the script to your | ||
PullZone in Bunny. | ||
|
||
|
||
> This behavior is disabled by default, every pushes on main are now pushed to | ||
> Bunny directly. | ||
> You can enable this pattern again by updating this | ||
> [action](./.github/workflows/on-merge.yml) |
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"name": "es-wasm-application", | ||
"version": "0.1.0", | ||
"main": "src/index.ts", | ||
"type": "module", | ||
"private": true, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/BunnyWay/es-wasm-application.git" | ||
}, | ||
"keywords": [ | ||
"github", | ||
"bunny" | ||
], | ||
"author": "Bunny Devs", | ||
"license": "MIT", | ||
"scripts": { | ||
"lint": "deno lint", | ||
"test": "deno test --allow-none -A src/**/*.test.ts", | ||
"check": "deno check src/main.ts", | ||
"build": "mkdir -p dist && deno bundle src/main.ts dist/index.ts", | ||
"dev": "deno run src/main.ts", | ||
"release": "echo \"No release\"", | ||
"ci:version": "pnpm changeset version", | ||
"ci:publish": "./scripts/publish.sh" | ||
}, | ||
"devDependencies": { | ||
"@changesets/cli": "^2.26.2" | ||
} | ||
} |
Oops, something went wrong.