Skip to content

Commit

Permalink
Obtain WASM/JS files from emscripten-forge (#37)
Browse files Browse the repository at this point in the history
* Obtain WASM/JS files from emscripten-forge

Co-authored-by: Thorsten Beier <[email protected]>

* Update CI

* Install micromamba in check-release CI

* Install micromamba in prep-release CI run

---------

Co-authored-by: Thorsten Beier <[email protected]>
  • Loading branch information
ianthomas23 and DerThorsten committed Aug 15, 2024
1 parent eca76f4 commit 1da67a1
Show file tree
Hide file tree
Showing 11 changed files with 299 additions and 16,276 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install micromamba executable
uses: mamba-org/setup-micromamba@main

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Check Release
uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2
with:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/prep-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ jobs:
permissions:
contents: write
steps:
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install micromamba executable
uses: mamba-org/setup-micromamba@main

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Prep Release
id: prep-release
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,21 @@ jobs:
with:
fetch-depth: 0

- name: Install node
uses: actions/setup-node@v4
- name: Set conda environment
uses: mamba-org/setup-micromamba@main
with:
node-version: 20
environment-name: cockle
environment-file: environment-dev.yml
init-shell: bash
cache-downloads: true

- name: Install dependencies
run: |
npm install
- name: Fetch wasm dependencies
run: npm run fetch:wasm

- name: Build
run: |
npm run build
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@ tsconfig.tsbuildinfo
.eslintcache
playwright-report/
test-results/
test/package-lock.json
*.js
*.wasm
cockle_wasm_env/
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,18 @@ In-browser bash-like shell implemented in a combination of TypeScript and WebAss

Used in the [JupyterLite terminal extension](https://github.com/jupyterlite/terminal).

The commands used here are either built-in commands implemented in TypeScript, or WebAssembly
commands compiled into .js and .wasm files. The latter are built by
[Emscripten-forge](https://emscripten-forge.org/) and are added to the `cockle` NPM package using
a `micromamba` environment as part of the `npm prepack` process.

To build:

```bash
micromamba env create -f environment-dev.yml -y
micromamba activate cockle
npm install
npm run fetch:wasm
npm run build
npm run lint:check
```
Expand Down
6 changes: 6 additions & 0 deletions environment-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
name: cockle
channels:
- conda-forge
dependencies:
- micromamba
- nodejs =20
Loading

0 comments on commit 1da67a1

Please sign in to comment.