This commit is contained in:
Sayantan Karmakar 2022-04-02 01:04:20 +05:30
parent 66e16aa1db
commit 7810f6aa51
7 changed files with 2634 additions and 0 deletions

3
ts/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/node_modules/
/dist/
/coverage/

11
ts/jest.config.js Normal file
View File

@ -0,0 +1,11 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: "ts-jest/presets/default",
testEnvironment: "node",
collectCoverage: true,
verbose: true,
testPathIgnorePatterns: ["/node_modules/"],
roots: ["<rootDir>/tests"],
testTimeout: 90000,
resolver: "ts-jest-resolver",
};

24
ts/package.json Normal file
View File

@ -0,0 +1,24 @@
{
"name": "serum-dev-tools",
"version": "1.0.0",
"description": "developer tooling suite for building on serum",
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
"author": "Sayantan Karmakar",
"license": "MIT",
"files": [
"dist"
],
"scripts": {
"build": "rm -rf dist/; tsc",
"test": "jest"
},
"devDependencies": {
"@types/jest": "^27.4.1",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"ts-jest-resolver": "^2.0.0",
"typescript": "^4.6.3"
}
}

3
ts/src/index.ts Normal file
View File

@ -0,0 +1,3 @@
export const hello_world = (x: number) => {
return `hello ${x}`;
};

6
ts/tests/dev.spec.ts Normal file
View File

@ -0,0 +1,6 @@
import { hello_world } from "../src/index";
describe("Serum Dev Tools", () => {
test("sample test", () => {
expect(hello_world(2)).toBe("hello 2");
});
});

10
ts/tsconfig.json Normal file
View File

@ -0,0 +1,10 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es2015",
"declaration": true,
"outDir": "./dist",
"rootDir": "./src"
},
"include": ["src/**/*"]
}

2577
ts/yarn.lock Normal file

File diff suppressed because it is too large Load Diff