Skip to content

Commit

Permalink
ts and jest configs
Browse files Browse the repository at this point in the history
  • Loading branch information
weijiekoh committed Feb 16, 2021
0 parents commit 23609db
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 0 deletions.
32 changes: 32 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
module.exports = {
verbose: true,
transform: {
"^.+\\.tsx?$": 'ts-jest'
},
testPathIgnorePatterns: [
"<rootDir>/build/",
"<rootDir>/node_modules/",
],
testRegex: '/__tests__/.*\\.test\\.ts$',
moduleFileExtensions: [
'ts',
'tsx',
'js',
'jsx',
'json',
'node'
],
moduleNameMapper: {
"^@circom-helper(.*)$": "<rootDir>./$1",
},
globals: {
'ts-jest': {
diagnostics: {
// Do not fail on TS compilation errors
// https://kulshekhar.github.io/ts-jest/user/config/diagnostics#do-not-fail-on-first-error
warnOnly: true
}
}
},
testEnvironment: 'node'
}
42 changes: 42 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"name": "zkey-manager",
"version": "0.0.1",
"description": "A convenient way for developers to manage the .zkey files from circom circuits, for production and testing.",
"main": "build/index.js",
"scripts": {
"watch": "tsc --watch",
"build": "tsc",
"prepare": "tsc"
},
"bin": {
"zkey-manager": "build/index.js"
},
"repository": {
"type": "git",
"url": "git+https://github.com/appliedzkp/zkey-manager.git"
},
"keywords": [
"snarkjs",
"circom"
],
"author": "Koh Wei Jie",
"license": "MIT",
"bugs": {
"url": "https://github.com/appliedzkp/zkey-manager/issues"
},
"homepage": "https://github.com/appliedzkp/zkey-manager#readme",
"dependencies": {
"argparse": "2.0.1",
"circom": "0.5.38",
"circomlib": "0.4.1",
"snarkjs": "0.3.59",
"js-yaml": "4.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.19",
"ffjavascript": "^0.2.33",
"jest": "^26.6.3",
"ts-jest": "^26.4.4",
"typescript": "^4.1.3"
}
}
24 changes: 24 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"experimentalDecorators": true,
"alwaysStrict": true,
"allowJs": true,
"noImplicitAny": false,
"forceConsistentCasingInFileNames": true,
"noUnusedLocals": false,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"sourceMap": true,
"esModuleInterop": true,
"strict": true,
"outDir": "./build",
"lib": [ "es2015", "dom" ]
},
"exclude": [
"node_modules/**"
],
"include": [
"./ts"
]
}

0 comments on commit 23609db

Please sign in to comment.