update builder

This commit is contained in:
pragmatos
2022-12-14 15:44:31 +02:00
parent b6edfd10d4
commit 6f941f7bdf
6 changed files with 1687 additions and 2007 deletions

7
config/tsconfig.esm.json Normal file
View File

@@ -0,0 +1,7 @@
{
"extends": "../tsconfig",
"compilerOptions": {
"module": "ESNext",
"outDir": "../dist/esm"
}
}

Binary file not shown.

View File

@@ -18,6 +18,7 @@
const claim = Iden3Core.Claim.newClaim(new Iden3Core.SchemaHash(), Iden3Core.ClaimOptions.withFlagUpdatable(true));
const { index, value } = claim.rawSlots();
console.log(index, value, claim);
console.log(claim.hIndex());
console.assert(claim.value.length === 4);
</script>

3667
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -5,14 +5,20 @@
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
"source": "./src/index.ts",
"esm:esbuild": "dist/esm_esbuild/index.js",
"typings": "dist/types/index.d.ts",
"files": [
"dist/**/*"
"dist",
"config",
"scripts",
"src",
"tsconfig.json"
],
"scripts": {
"clean": "rimraf ./dist",
"build": "npm run clean && npm run build:esm && npm run build:umd && npm run build:tsc",
"build:esm": "node ./scripts/esm.config.js",
"build": "npm run clean && npm run build:esm && npm run build:umd && npm run build:esm:esbuild && npm run build:tsc",
"build:esm:esbuild": "node ./scripts/esm.config.js",
"build:esm": "tsc -p config/tsconfig.esm.json",
"build:umd": "node ./scripts/umd.config.js",
"build:tsc": "tsc --module commonjs",
"test:coverage": "jest --coverage",
@@ -21,7 +27,8 @@
"test:watch": "jest --watch",
"semantic-release": "semantic-release",
"lint": "eslint --fix --ext .js,.ts src/**",
"format": "prettier --config .prettierrc './**/*.ts' --write"
"format": "prettier --config .prettierrc './**/*.ts' --write",
"prepare": "npm run build"
},
"release": {
"branches": [
@@ -62,7 +69,7 @@
"typescript": "^4.7.4"
},
"dependencies": {
"@iden3/js-crypto": "file:./iden3-js-crypto-0.0.1.tgz",
"@iden3/js-crypto": "git@github.com:iden3/js-crypto.git",
"base58-js": "^1.0.4",
"cross-sha256": "^1.2.0"
}

View File

@@ -13,7 +13,7 @@ const esmConfig = {
bundle: true,
sourcemap: true,
target: 'esnext',
outfile: pkg.module,
outfile: pkg['esm:esbuild'],
format: 'esm',
};
module.exports = esmConfig;