migrating cjs -> esm
This commit is contained in:
parent
b91c95bde3
commit
3609a154a9
1
.npmignore
Normal file
1
.npmignore
Normal file
@ -0,0 +1 @@
|
||||
dist/
|
2
dist/bundle.js
vendored
2
dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
12
dist/index.html
vendored
Normal file
12
dist/index.html
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>ZKL Key Derivation Service Demo</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="bundle.js"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
2
index.js → dist/index.js
vendored
2
index.js → dist/index.js
vendored
@ -1,4 +1,4 @@
|
||||
import { generateKeypair } from "./key-derivation.js";
|
||||
import { generateKeypair } from "../key-derivation.js";
|
||||
|
||||
(async () => {
|
||||
console.log("start");
|
@ -1,9 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>ZKL Key Derivation Service Demo</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="dist/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -4,7 +4,7 @@ import {
|
||||
} from "@scure/bip39";
|
||||
import { wordlist } from "@scure/bip39/wordlists/english";
|
||||
import elliptic from "elliptic";
|
||||
import { Key } from "./key";
|
||||
import { Key } from "./key.js";
|
||||
|
||||
const MNEMONIC_STRENGTH = 192;
|
||||
//const CURVE = "curve25519"
|
||||
|
@ -1,8 +1,9 @@
|
||||
{
|
||||
"name": "@zklx/kds",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "zk-Lokomotive key derivation service",
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
|
@ -1,9 +1,13 @@
|
||||
const path = require("path");
|
||||
const webpack = require("webpack");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
import path from "path";
|
||||
import { fileURLToPath } from "url";
|
||||
import webpack from "webpack";
|
||||
import TerserPlugin from "terser-webpack-plugin";
|
||||
|
||||
module.exports = {
|
||||
entry: "./index.js",
|
||||
const __filename = fileURLToPath(import.meta.url);
|
||||
const __dirname = path.dirname(__filename);
|
||||
|
||||
export default {
|
||||
entry: "./dist/index.js",
|
||||
output: {
|
||||
filename: "bundle.js",
|
||||
path: path.resolve(__dirname, "dist")
|
||||
|
Loading…
x
Reference in New Issue
Block a user