mirror of https://github.com/waku-org/js-waku.git
test: re-introduce build
This commit is contained in:
parent
b11d465a9d
commit
5ba1ee12c7
|
@ -1,7 +1,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
tsconfigRootDir: __dirname,
|
tsconfigRootDir: __dirname,
|
||||||
project: "./tsconfig.json",
|
project: "./tsconfig.dev.json",
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
"@typescript-eslint/no-non-null-assertion": "off",
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"extension": ["ts"],
|
"extension": ["ts"],
|
||||||
"spec": "tests/**/*.spec.ts",
|
"spec": "tests/*.spec.ts",
|
||||||
"require": ["ts-node/register", "isomorphic-fetch", "jsdom-global/register"],
|
"require": ["ts-node/register", "isomorphic-fetch", "jsdom-global/register"],
|
||||||
"loader": "ts-node/esm",
|
"loader": "ts-node/esm",
|
||||||
"node-option": [
|
"node-option": [
|
||||||
|
|
|
@ -4,9 +4,9 @@ const webpack = require("webpack");
|
||||||
module.exports = function (config) {
|
module.exports = function (config) {
|
||||||
config.set({
|
config.set({
|
||||||
frameworks: ["webpack", "mocha"],
|
frameworks: ["webpack", "mocha"],
|
||||||
files: ["src/lib/**/!(node).spec.ts"],
|
files: ["tests/**/!(node).spec.ts"],
|
||||||
preprocessors: {
|
preprocessors: {
|
||||||
"src/lib/**/!(node).spec.ts": ["webpack"],
|
"tests/**/!(node).spec.ts": ["webpack"],
|
||||||
},
|
},
|
||||||
envPreprocessor: ["CI"],
|
envPreprocessor: ["CI"],
|
||||||
reporters: ["progress"],
|
reporters: ["progress"],
|
||||||
|
|
|
@ -41,6 +41,7 @@
|
||||||
"privacy"
|
"privacy"
|
||||||
],
|
],
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"build": "tsc",
|
||||||
"fix": "run-s fix:*",
|
"fix": "run-s fix:*",
|
||||||
"fix:prettier": "prettier . --write",
|
"fix:prettier": "prettier . --write",
|
||||||
"fix:lint": "eslint src tests --ext .ts --ext .cjs --fix",
|
"fix:lint": "eslint src tests --ext .ts --ext .cjs --fix",
|
||||||
|
@ -50,8 +51,8 @@
|
||||||
"nwaku:build": "(PROC=$(nproc --all 2>/dev/null || echo 2); cd ../../nwaku; make -j$PROC update; NIMFLAGS=\"-d:chronicles_colors=off -d:chronicles_sinks=textlines -d:chronicles_log_level=TRACE\" make -j$PROC wakunode2)",
|
"nwaku:build": "(PROC=$(nproc --all 2>/dev/null || echo 2); cd ../../nwaku; make -j$PROC update; NIMFLAGS=\"-d:chronicles_colors=off -d:chronicles_sinks=textlines -d:chronicles_log_level=TRACE\" make -j$PROC wakunode2)",
|
||||||
"nwaku:force-build": "(cd ../../nwaku && rm -rf ./build/ ./vendor) && run-s nwaku:build",
|
"nwaku:force-build": "(cd ../../nwaku && rm -rf ./build/ ./vendor) && run-s nwaku:build",
|
||||||
"check": "run-s check:*",
|
"check": "run-s check:*",
|
||||||
"check:lint": "eslint src tests --ext .ts",
|
|
||||||
"check:prettier": "prettier . --list-different",
|
"check:prettier": "prettier . --list-different",
|
||||||
|
"check:lint": "eslint src tests --ext .ts",
|
||||||
"check:spelling": "cspell \"{README.md,{tests,src}/**/*.ts}\"",
|
"check:spelling": "cspell \"{README.md,{tests,src}/**/*.ts}\"",
|
||||||
"check:tsc": "tsc -p tsconfig.json",
|
"check:tsc": "tsc -p tsconfig.json",
|
||||||
"test": "run-s test:*",
|
"test": "run-s test:*",
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig",
|
||||||
|
"compilerOptions": {
|
||||||
|
"module": "esnext",
|
||||||
|
"noEmit": true
|
||||||
|
},
|
||||||
|
"include": ["src", "tests"]
|
||||||
|
}
|
|
@ -2,9 +2,9 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"incremental": true,
|
"incremental": true,
|
||||||
"target": "es2020",
|
"target": "es2020",
|
||||||
"noEmit": true,
|
"outDir": "dist/",
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"module": "esnext",
|
"module": "es2020",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||||
|
@ -44,7 +44,8 @@
|
||||||
"types": ["node", "mocha"],
|
"types": ["node", "mocha"],
|
||||||
"typeRoots": ["node_modules/@types", "src/types"]
|
"typeRoots": ["node_modules/@types", "src/types"]
|
||||||
},
|
},
|
||||||
"include": ["tests", "src"],
|
"include": ["src"],
|
||||||
|
"exclude": [],
|
||||||
"compileOnSave": false,
|
"compileOnSave": false,
|
||||||
"ts-node": {
|
"ts-node": {
|
||||||
"files": true
|
"files": true
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"extends": "./tsconfig",
|
"extends": "./tsconfig.dev",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"noEmit": false
|
"noEmit": false
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue