Skip to content

Commit

Permalink
refactor: change package name (#29)
Browse files Browse the repository at this point in the history
Because a js package don't need to have the "js" tag,
we decided to change the name from `afrim-js` to `afrim`.
  • Loading branch information
pythonbrad authored Aug 20, 2024
1 parent 5452672 commit 6ece09d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "afrim-js"
name = "afrim"
version = "0.4.0"
authors = ["Brady Fomegne <[email protected]>"]
edition = "2018"
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div align="center">

<h1><code>afrim-js</code></h1>
<h1><code>afrim</code></h1>

<strong>A binding of the <a href="https://github.com/pythonbrad/afrim">afrim ime engine</a> for the web.</strong>

<p>
<a href="https://github.com/pythonbrad/afrim-js/actions/workflows/ci.yml"><img alt="Build Status" src="https://github.com/pythonbrad/afrim-js/actions/workflows/ci.yml/badge.svg?branch=main"/></a>
<a href="https://www.npmjs.org/package/afrim-js"><img alt="NPM version" src="https://img.shields.io/npm/v/afrim-js.svg?style=flat-square"/></a>
<a href="https://www.npmjs.org/package/afrim"><img alt="NPM version" src="https://img.shields.io/npm/v/afrim.svg?style=flat-square"/></a>
</p>

<h3>
Expand All @@ -32,14 +32,14 @@ wasm-pack build
### Installation

```
npm install afrim-js
npm install afrim
```

### Usage

```javascript
import { Preprocessor, Translator } from "afrim-js";
import { convertTomlToJson } from "afrim-js";
import { Preprocessor, Translator } from "afrim";
import { convertTomlToJson } from "afrim";

(async function () {
// We execute preprocessor commands in idle.
Expand Down
8 changes: 4 additions & 4 deletions tests/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ wasm_bindgen_test_configure!(run_in_browser);

#[wasm_bindgen_test]
fn test_process() {
use afrim_js::Preprocessor;
use afrim::Preprocessor;

let mut data = HashMap::new();
data.insert("a1".to_owned(), "à".to_owned());
Expand Down Expand Up @@ -43,7 +43,7 @@ fn test_process() {

#[wasm_bindgen_test]
fn test_translate() {
use afrim_js::Translator;
use afrim::Translator;
use afrim_translator::Predicate;

let mut dictionary = HashMap::new();
Expand Down Expand Up @@ -90,7 +90,7 @@ fn test_translate() {
#[cfg(feature = "rhai")]
#[wasm_bindgen_test]
fn test_transaltor() {
use afrim_js::Translator;
use afrim::Translator;
use afrim_translator::Predicate;

// Script
Expand Down Expand Up @@ -120,7 +120,7 @@ fn test_transaltor() {

#[wasm_bindgen_test]
fn test_toml() {
use afrim_js::convert_toml_to_json;
use afrim::convert_toml_to_json;

let data = convert_toml_to_json("[data]\nhi = \"hello\"");
assert!(data.unwrap().is_object());
Expand Down

0 comments on commit 6ece09d

Please sign in to comment.