ts setup
This commit is contained in:
parent
66e16aa1db
commit
7810f6aa51
|
@ -0,0 +1,3 @@
|
|||
/node_modules/
|
||||
/dist/
|
||||
/coverage/
|
|
@ -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",
|
||||
};
|
|
@ -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"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
export const hello_world = (x: number) => {
|
||||
return `hello ${x}`;
|
||||
};
|
|
@ -0,0 +1,6 @@
|
|||
import { hello_world } from "../src/index";
|
||||
describe("Serum Dev Tools", () => {
|
||||
test("sample test", () => {
|
||||
expect(hello_world(2)).toBe("hello 2");
|
||||
});
|
||||
});
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2015",
|
||||
"declaration": true,
|
||||
"outDir": "./dist",
|
||||
"rootDir": "./src"
|
||||
},
|
||||
"include": ["src/**/*"]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue