prep for release

This commit is contained in:
Aravinth Manivannan 2021-12-08 14:28:38 +05:30
parent 9ea8676d24
commit 03c8026470
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
4 changed files with 45 additions and 47 deletions

View file

@ -15,9 +15,7 @@
To generate proof-of-work, per mCaptcha specification:
```typescript
import {generate_proof} from "@mcaptcha/pow_sha256-polyfill"; /* yet to
be published in npm */
import {generate_proof} from "@mcaptcha/pow_sha256-polyfill";
let salt = "randomsaltvalueprovidedbymcaptcha";
let phrase = "randomphrasevalueprovidedbymcaptcha";

View file

@ -1,12 +1,13 @@
{
"author": "Aravinth Manivannan <realaravinth@batsense.net>",
"name": "pow_sha256-polyfill",
"name": "@mcaptcha/pow_sha256-polyfill",
"version": "0.1.0-alpha-1",
"license": "(MIT OR Apache-2.0)",
"keywords": [
"mCaptcha",
"CAPTCHA",
"proof of work"
],
"keywords": ["mCaptcha", "CAPTCHA", "proof of work"],
"browser": "dist/index.js",
"types": "dist/index.d.ts",
"files": ["dist"],
"homepage": "https://mcaptcha.org",
"bugs": {
"url": "https://github.com/mCaptcha/pow_sha256-polyfill/issues",
@ -16,7 +17,25 @@
"type": "git",
"url": "https://github.com/mCaptcha/pow_sha256-polyfill.git"
},
"version": "0.1.0",
"funding": [
{
"type": "individual",
"url": "http://mcaptcha.org/donate"
},
{
"type": "liberapay",
"url": "https://liberapay.com/mcaptcha"
},
{
"type": "individual",
"url": "http://batsense.net/donate"
},
{
"type": "liberapay",
"url": "https://liberapay.com/realaravinth"
}
],
"scripts": {
"build": "webpack --mode production",
"doc": "yarn typedoc src/index.ts",

View file

@ -2,30 +2,18 @@
"compilerOptions": {
"incremental": true,
"target": "es2020",
"module": "es2020",
"lib": ["es2015", "dom"],
"module": "commonjs",
"allowJs": false,
"sourceMap": true,
"outDir": "./dist/bundle",
"declaration": true,
"outDir": "./dist/",
"rootDir": "./src/",
"removeComments": true,
"moduleResolution": "node",
//"strict": true,
"strict": true,
"noImplicitAny": true,
//"strictNullChecks": true,
//"strictFunctionTypes": true,
//"strictBindCallApply": true,
//"strictPropertyInitialization": true,
//"noImplicitThis": true,
//"alwaysStrict": true,
//"noUnusedLocals": true,
//"noUnusedParameters": true,
//"noImplicitReturns": true,
//"noFallthroughCasesInSwitch": true,
//"noUncheckedIndexedAccess": true,
//"noPropertyAccessFromIndexSignature": true,
"esModuleInterop": true,
"skipLibCheck": true,
@ -37,8 +25,8 @@
"docs",
"jest.config.ts",
"**/*.test.ts",
"src/test-data.ts",
"tmp",
"dist",
"**/*setupTests"
],

View file

@ -1,43 +1,36 @@
('use strict');
const path = require('path');
("use strict");
const path = require("path");
const dist = path.resolve(__dirname, 'dist');
const dist = path.resolve(__dirname, "dist");
module.exports = {
//devtool: 'inline-source-map',
//mode: 'development',
mode: 'production',
entry: './src/index.ts',
mode: "production",
entry: "./src/",
output: {
path: dist,
filename: 'bundle.js',
libraryTarget: "umd",
filename: "index.js",
library: "pow256-polyfill",
},
module: {
rules: [
{
test: /\.tsx?$/,
loader: 'ts-loader',
test: /\.ts$/,
loader: "ts-loader",
},
],
},
resolve: {
extensions: ['.ts', '.tsx', '.js'],
extensions: [".ts", ".tsx", ".js"],
},
plugins: [],
optimization: {
minimizer: [
// For webpack@5 you can use the `...` syntax to extend existing minimizers (i.e. `terser-webpack-plugin`), uncomment the next line
`...`,
"...",
],
},
experiments: {
// executeModule: true,
// outputModule: true,
//syncWebAssembly: true,
// topLevelAwait: true,
//asyncWebAssembly: true,
// layers: true,
// lazyCompilation: true,
},
};