mirror of https://github.com/vacp2p/waku-ts.git
setup
This commit is contained in:
parent
00e523fff1
commit
30a497b4f7
|
@ -0,0 +1,4 @@
|
|||
*.log
|
||||
.DS_Store
|
||||
node_modules
|
||||
dist
|
2
LICENSE
2
LICENSE
|
@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
SOFTWARE.
|
|
@ -1,2 +1,3 @@
|
|||
# waku-ts
|
||||
A Typescript client for waku
|
||||
# waku-ts [![npm version](https://badge.fury.io/js/waku-ts.svg)](https://badge.fury.io/js/waku-ts)
|
||||
|
||||
Waku Typescript Client
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
{
|
||||
"name": "waku-ts",
|
||||
"description": "Waku Typescript Client",
|
||||
"version": "0.1.0",
|
||||
"author": "Vac <github.com/vacp2p>",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"waku",
|
||||
"whisper",
|
||||
"messaging",
|
||||
"networking",
|
||||
"libp2p",
|
||||
"devp2p",
|
||||
"vac",
|
||||
"p2p"
|
||||
],
|
||||
"files": [
|
||||
"dist"
|
||||
],
|
||||
"main": "dist/cjs/index.js",
|
||||
"types": "dist/cjs/index.d.ts",
|
||||
"unpkg": "dist/umd/index.min.js",
|
||||
"homepage": "https://github.com/vacp2p/waku-ts",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/vacp2p/waku-ts.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/vacp2p/waku-ts/issues"
|
||||
},
|
||||
"scripts": {
|
||||
"start": "tsdx watch",
|
||||
"clean": "rm -rf dist",
|
||||
"build:cjs": "./node_modules/.bin/tsc -p tsconfig.cjs.json",
|
||||
"build:umd": "webpack",
|
||||
"build": "yarn clean && yarn build:cjs && yarn build:umd",
|
||||
"test": "tsdx test ./test",
|
||||
"lint": "tsdx lint src test",
|
||||
"prepare": "yarn lint && yarn build && yarn test"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/jest": "25.1.1",
|
||||
"@types/node": "13.7.0",
|
||||
"husky": "4.2.1",
|
||||
"tsdx": "0.12.3",
|
||||
"tslib": "1.10.0",
|
||||
"typescript": "3.7.5",
|
||||
"webpack": "4.41.6",
|
||||
"webpack-cli": "3.3.11"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "yarn lint"
|
||||
}
|
||||
},
|
||||
"prettier": {
|
||||
"printWidth": 80,
|
||||
"semi": true,
|
||||
"singleQuote": false,
|
||||
"trailingComma": "es5"
|
||||
}
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
export class Waku {}
|
|
@ -0,0 +1 @@
|
|||
export * from "./client";
|
|
@ -0,0 +1,8 @@
|
|||
import { Waku } from "../src";
|
||||
|
||||
describe("Waku", () => {
|
||||
it("needs tests", async () => {
|
||||
const waku = new Waku();
|
||||
expect(waku).toBeTruthy();
|
||||
});
|
||||
});
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"extends": "./tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "./dist/cjs",
|
||||
"rootDir": "./src",
|
||||
"target": "es6",
|
||||
"module": "commonjs",
|
||||
"incremental": true,
|
||||
"noUnusedLocals": false,
|
||||
"strict": false
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"include": ["./src/**/*"],
|
||||
"compilerOptions": {
|
||||
"allowJs": false,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"alwaysStrict": true,
|
||||
"declaration": true,
|
||||
"declarationMap": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"esModuleInterop": true,
|
||||
"experimentalDecorators": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["es2017", "dom", "esnext.asynciterable"],
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"noImplicitAny": false,
|
||||
"noImplicitReturns": true,
|
||||
"noImplicitThis": true,
|
||||
"noFallthroughCasesInSwitch": true,
|
||||
"noLib": false,
|
||||
"noUnusedLocals": false,
|
||||
"noUnusedParameters": false,
|
||||
"removeComments": true,
|
||||
"resolveJsonModule": true,
|
||||
"skipLibCheck": true,
|
||||
"sourceMap": true,
|
||||
"strict": true,
|
||||
"strictNullChecks": true,
|
||||
"strictFunctionTypes": true,
|
||||
"strictPropertyInitialization": true,
|
||||
"target": "es2017"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
const path = require("path");
|
||||
|
||||
module.exports = {
|
||||
mode: "production",
|
||||
entry: {
|
||||
index: path.resolve(__dirname, "dist", "cjs", "index.js"),
|
||||
},
|
||||
output: {
|
||||
path: path.resolve(__dirname, "dist", "umd"),
|
||||
filename: "[name].min.js",
|
||||
libraryTarget: "umd",
|
||||
library: "Waku",
|
||||
umdNamedDefine: true,
|
||||
globalObject: "this",
|
||||
},
|
||||
};
|
Loading…
Reference in New Issue