Skip to content

Commit

Permalink
add o1js package and update build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
phn210 committed Mar 24, 2024
1 parent cb456d8 commit 2c7211f
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 37 deletions.
43 changes: 22 additions & 21 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
module.exports = {
root: true,
env: {
browser: true,
node: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:o1js/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
plugins: ['@typescript-eslint', 'o1js'],
rules: {
'no-constant-condition': 'off',
'prefer-const': 'off',
},
root: true,
env: {
browser: true,
node: true,
jest: true,
},
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:o1js/recommended',
],
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 'latest',
},
plugins: ['@typescript-eslint', 'o1js'],
ignorePatterns: ['*.sh', '*.md', '*.tgz'],
rules: {
'no-constant-condition': 'off',
'prefer-const': 'off',
},
};
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# NodeJS
node_modules
build
pkg
coverage

# Editor
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ coverage
.husky
*.yml

# Packages
*.tgz

# Editor
.vscode

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"main": "./build/esm/src/index.js",
"types": "./build/types/src/index.d.ts",
"scripts": {
"build": "tsc --build tsconfig.json tsconfig.cjs.json tsconfig.types.json && ./fix-export.sh",
"build": "tsc --build tsconfig.esm.json tsconfig.cjs.json tsconfig.types.json && ./fix-export.sh",
"buildw": "tsc --watch",
"scripts": "tsc --build tsconfig.json tsconfig.cjs.json tsconfig.types.json && ./fix-export.sh && node",
"coverage": "node --experimental-vm-modules node_modules/jest/bin/jest.js --coverage",
Expand All @@ -39,7 +39,7 @@
],
"lint-staged": {
"**/*": [
"eslint src/* --fix --ignore-pattern *.sh --ignore-pattern *.md",
"eslint src/* --fix",
"prettier --write --ignore-unknown"
]
},
Expand Down
Binary file added pkg/o1js-0.17.0.tgz
Binary file not shown.
12 changes: 6 additions & 6 deletions tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./build/cjs",
"module": "commonjs"
},
"include": ["./src"]
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./build/cjs",
"module": "commonjs"
},
"exclude": ["./src/**/*.test.ts"]
}
4 changes: 4 additions & 0 deletions tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["./src/**/*.test.ts"]
}
14 changes: 7 additions & 7 deletions tsconfig.types.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./build/types",
"declaration": true,
"emitDeclarationOnly": true
},
"include": ["./src"]
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "./build/types",
"declaration": true,
"emitDeclarationOnly": true
},
"exclude": ["./src/**/*.test.ts"]
}

0 comments on commit 2c7211f

Please sign in to comment.