-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename libs and fix npm build workflow
- Loading branch information
Showing
23 changed files
with
105 additions
and
42 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
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
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
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
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 @@ | ||
#! /usr/bin/env node | ||
|
||
// From https://github.com/vemonet/nanopub-rs/blob/main/js/build_package.js | ||
const fs = require("fs"); | ||
|
||
// We copy file to the new directory | ||
fs.mkdirSync("pkg"); | ||
for (const file of fs.readdirSync("./pkg-web")) { | ||
fs.copyFileSync(`./pkg-web/${file}`, `./pkg/${file}`); | ||
} | ||
for (const file of fs.readdirSync("./pkg-node")) { | ||
fs.copyFileSync(`./pkg-node/${file}`, `./pkg/${file}`); | ||
} | ||
|
||
const pkg = JSON.parse(fs.readFileSync("./pkg/package.json")); | ||
pkg.name = "@nanopub/sign"; | ||
pkg.main = "node.js"; | ||
pkg.browser = "web.js"; | ||
pkg.files = ["*.{js,wasm,d.ts}"]; | ||
pkg.homepage = "https://github.com/vemonet/nanopub-rs/tree/main/js"; | ||
pkg.bugs = { | ||
url: "https://github.com/vemonet/nanopub-rs/issues", | ||
}; | ||
pkg.collaborators = undefined; | ||
pkg.repository = { | ||
type: "git", | ||
url: "https://github.com/vemonet/nanopub-rs.git", | ||
directory: "js", | ||
}; | ||
fs.writeFileSync("./pkg/package.json", JSON.stringify(pkg, null, 2)); |
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 |
---|---|---|
@@ -1,11 +1,14 @@ | ||
{ | ||
"version": "0.1.0", | ||
"name": "nanopub-js", | ||
"description": "JavaScript bindings for the Nanopub rust toolkit", | ||
"license": "MIT", | ||
"homepage": "https://github.com/vemonet/nanopub-rs", | ||
"module": "nanopub_js.js", | ||
"types": "nanopub_js.d.ts", | ||
"collaborators": [ | ||
"Vincent Emonet <[email protected]>" | ||
], | ||
"description": "JavaScript bindings for the Nanopub rust toolkit", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/vemonet/nanopub-rs/tree/main/js" | ||
|
@@ -15,10 +18,35 @@ | |
"nanopub_js.js", | ||
"nanopub_js.d.ts" | ||
], | ||
"module": "nanopub_js.js", | ||
"homepage": "https://github.com/vemonet/nanopub-rs", | ||
"types": "nanopub_js.d.ts", | ||
"sideEffects": [ | ||
"./snippets/*" | ||
] | ||
} | ||
], | ||
"scripts": { | ||
"fmt": "prettier \"**/*.{ts,tsx,js,cjs,json,md,html}\" --ignore-path .gitignore --write", | ||
"test": "wasm-pack build --debug --target nodejs && mocha", | ||
"build": "rm -rf pkg && wasm-pack build --release --target web --out-name web && mv pkg pkg-web && wasm-pack build --release --target nodejs --out-name node && mv pkg pkg-node && node build_package.js && rm -r pkg-web && rm -r pkg-node", | ||
"release": "npm run build && npm publish ./pkg", | ||
"pack": "npm run build && npm pack ./pkg" | ||
}, | ||
"standard": { | ||
"ignore": [ | ||
"pkg*" | ||
] | ||
}, | ||
"devDependencies": { | ||
"prettier": "^3.1.0" | ||
}, | ||
"prettier": { | ||
"trailingComma": "none", | ||
"semi": false, | ||
"tabWidth": 2, | ||
"singleQuote": true, | ||
"bracketSpacing": false, | ||
"arrowParens": "avoid", | ||
"useTabs": false, | ||
"printWidth": 120, | ||
"pluginSearchDirs": [ | ||
"." | ||
] | ||
} | ||
} |
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
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[package] | ||
name = "nanopub_rs" | ||
name = "nanopub" | ||
version = "0.1.0" | ||
authors = ["Vincent Emonet <[email protected]>"] | ||
license = "MIT" | ||
|
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
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 |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# Introduction | ||
|
||
The [nanopub_rs crate](https://crates.io/crates/sophia) aims to provide a comprehensive toolkit for working with Nanopublications and RDF in Rust. | ||
The [nanopub crate](https://crates.io/crates/nanopub) aims to provide a comprehensive toolkit for working with Nanopublications and RDF in Rust. | ||
|
||
RDF is a data model designed to exchange knowledge on the Web in an interoperable way. Each piece of knowledge in RDF (a statement) is represented by a triple, made of three terms. A set of triples forms an RDF graph. Finally, several graphs can be grouped in a collection called a dataset, where each graph is identified by a unique name. | ||
|
||
## Code reference | ||
|
||
Checkout the [documentation generated from the code](/nanopub-rs/doc/nanopub_rs) | ||
Checkout the [documentation generated from the code](/nanopub-rs/doc/nanopub) |
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
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
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
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
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
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
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
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
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
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
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
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
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