From b3cefa268b16cd2b104aeec4ffa64b66bd02f296 Mon Sep 17 00:00:00 2001 From: alemi Date: Fri, 13 Sep 2024 22:56:32 +0200 Subject: [PATCH] chore(js): slimmed down ci dist folder --- .github/workflows/javascript.yml | 32 ++++++----- dist/js/{publish => }/package.json | 0 dist/js/publish/README.md | 89 ------------------------------ 3 files changed, 17 insertions(+), 104 deletions(-) rename dist/js/{publish => }/package.json (100%) delete mode 100644 dist/js/publish/README.md diff --git a/.github/workflows/javascript.yml b/.github/workflows/javascript.yml index a5c704b..d5b158f 100644 --- a/.github/workflows/javascript.yml +++ b/.github/workflows/javascript.yml @@ -31,13 +31,13 @@ jobs: with: node-version: '20' - run: npm install - working-directory: dist/js/publish - - run: npx napi build --cargo-cwd=../../.. --platform --release --features=js --strip - working-directory: dist/js/publish + working-directory: dist/js + - run: npx napi build --cargo-cwd=../.. --platform --release --features=js --strip + working-directory: dist/js - uses: actions/upload-artifact@v4 with: name: codemp-js-${{ matrix.platform.target }} - path: dist/js/publish/codemp.*.node + path: dist/js/codemp.*.node publish: runs-on: ubuntu-latest @@ -56,32 +56,34 @@ jobs: node-version: '20' registry-url: 'https://registry.npmjs.org' - run: npm install - working-directory: dist/js/publish - - run: npx napi build --cargo-cwd=../../.. --platform --features=js - working-directory: dist/js/publish + working-directory: dist/js + - run: npx napi build --cargo-cwd=../.. --platform --features=js + working-directory: dist/js - run: rm *.node - working-directory: dist/js/publish + working-directory: dist/js - run: npx napi create-npm-dir -t .; tree - working-directory: dist/js/publish + working-directory: dist/js - uses: actions/download-artifact@v4 with: - path: dist/js/publish/artifacts + path: dist/js/artifacts pattern: codemp-js-* - run: npx napi artifacts; tree - working-directory: dist/js/publish + working-directory: dist/js - run: npx napi prepublish -t . --skip-gh-release - working-directory: dist/js/publish + working-directory: dist/js env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - run: rm -rf *.node artifacts node_modules - working-directory: dist/js/publish + working-directory: dist/js + - run: cp ../../README.md . + working-directory: dist/js # TODO this is a bit awful, but napi just appends the platform triplet to the resulting package name # however we want '@codemp/native-...' and 'codemp' (because otherwise it gets flagged as spam) # so we just sed out before releasing. this is really ugly but if it works right now i'll just # take it and think again about it later - run: sed -i 's/"@codemp\/native"/"codemp"/' package.json - working-directory: dist/js/publish + working-directory: dist/js - run: npm publish - working-directory: dist/js/publish + working-directory: dist/js env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/dist/js/publish/package.json b/dist/js/package.json similarity index 100% rename from dist/js/publish/package.json rename to dist/js/package.json diff --git a/dist/js/publish/README.md b/dist/js/publish/README.md deleted file mode 100644 index 47d0c0b..0000000 --- a/dist/js/publish/README.md +++ /dev/null @@ -1,89 +0,0 @@ -[![codemp](https://code.mp/static/banner.png)](https://code.mp) - -[![Actions Status](https://github.com/hexedtech/codemp/actions/workflows/ci.yml/badge.svg)](https://github.com/hexedtech/codemp/actions) -[![docs.rs](https://img.shields.io/docsrs/codemp)](https://docs.rs/codemp/0.7.0-beta.2/codemp/) -[![Crates.io Version](https://img.shields.io/crates/v/codemp)](https://crates.io/crates/codemp) -[![NPM Version](https://img.shields.io/npm/v/codemp)](https://npmjs.org/package/codemp) -[![PyPI - Version](https://img.shields.io/pypi/v/codemp)](https://pypi.org/project/codemp) -[![Crates.io License](https://img.shields.io/crates/l/codemp)](https://github.com/hexedtech/codemp/blob/dev/LICENSE) -[![Gitter](https://img.shields.io/gitter/room/hexedtech/codemp)](https://gitter.im/hexedtech/codemp) - -> `codemp` is a **collaborative** text editing solution to work remotely. - -It seamlessly integrates in your editor providing remote cursors and instant text synchronization, -as well as a remote virtual workspace for you and your team. - -> `codemp` is build with state-of-the-art CRDT technology, guaranteeing eventual consistency. - -This means everyone in a workspace will always be working on the exact same file _eventually_: -even under unreliable networks or constrained resources, the underlying CRDT will always reach a -convergent state across all users. Even with this baseline, `codemp`'s protocol is optimized for speed -and low network footprint, meaning even slow connections can provide stable real-time editing. - -The full documentation is available on [docs.rs](https://docs.rs/codemp/0.7.0-beta.2/codemp/). - -# Usage -`codemp` is primarily used as a plugin in your editor of choice. - -## Installation -> [!IMPORTANT] -> The editor plugins are in active development. Expect frequent changes. - -`codemp` is available as a plugin for a growing number of text editors. Currently we support: - - [NeoVim](https://github.com/hexedtech/codemp-nvim) - - [VSCode](https://github.com/hexedtech/codemp-vscode) - - [Sublime Text](https://github.com/hexedtech/codemp-sublime) - - -## Registration -The `codemp` protocol is [openly available](https://github.com/hexedtech/codemp-proto/) and servers may be freely developed with it. - -A reference instance is provided by hexed.technology at [code.mp](https://code.mp). You may create an account for it [here](https://code.mp/register). -During the initial closed beta, registrations will require an invite code. Get in contact if interested. - -An open beta is going to follow with free access to a single workspace per user. -After such period, [code.mp](https://code.mp) will switch to a subscription-based model. - -# Development -This is the main client library for `codemp`. It provides a batteries-included fully-featured `Client`, managed by the library itself, and exposes a number of functions to interact with it. The host program can obtain a `Client` handle by connecting, and from that reference can retrieve every other necessary component. - -`codemp` is primarily a rlib and can be used as such, but is also available in other languages via FFI. - -Adding a dependency on `codemp` is **easy**: - -### From Rust -Just `cargo add codemp` and check the docs for some examples. - -### From supported languages -We provide first-class bindings for: - - [JavaScript](./dist/js/README.md): available from `npm` as [`codemp`](https://npmjs.org/package/codemp) - - [Python](./dist/lua/README.md): available from `PyPI` as [`codemp`](https://pypi.org/project/codemp) - - [Lua](./dist/lua/README.md): run `cargo build --features=lua` - - [Java](./dist/java/README.md): run `gradle build` in `dist/java/` (requires Gradle) - -As a design philosophy, our binding APIs attempt to perfectly mimic their Rust counterparts, so the main documentation can still be referenced as source of truth. -Refer to specific language documentation for specifics, differences and quirks. - -### From other languages -> [!IMPORTANT] -> The common C bindings are not available yet! - -Any other language with C FFI capabilities will be able to use `codemp` via its bare C bindings. -This may be more complex and may require wrapping the native calls underneath. - -# Get in Touch -We love to hear back from users! Be it to give feedback, propose new features or highlight bugs, don't hesitate to reach out! - -## Contacts -We have a public [Gitter](https://gitter.im) room available on [gitter.im/hexedtech/codemp](https://gitter.im/hexedtech/codemp). -It's possible to freely browse the room history, but to send new messages it will be necessary to sign in with your GitHub account. - -If you have a [Matrix](https://matrix.org) account, you can join the gitter room directly at [#hexedtech_codemp:gitter.im](https://matrix.to/#/#hexedtech_codemp:gitter.im) - -## Contributing -If you find bugs or would like to see new features implemented, be sure to open an issue on this repository. - -> [!WARNING] -> The CLA necessary for code contributions is not yet available! - -In case you wish to contribute code, that's great! We love external contributions, but we require you to sign our CLA first (available soon).