Skip to content

Commit

Permalink
Merge pull request #56 from osmosis-labs/tsc-compile
Browse files Browse the repository at this point in the history
use `tsc`
  • Loading branch information
pyramation authored Jul 15, 2023
2 parents b4c05b2 + 14d2953 commit 46b647e
Show file tree
Hide file tree
Showing 6 changed files with 257 additions and 58 deletions.
37 changes: 19 additions & 18 deletions packages/math/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,29 @@
"author": "Dan Lynch <pyramation@gmail.com>",
"homepage": "https://github.com/osmosis-labs/osmojs/tree/master/packages/osmojs#readme",
"license": "SEE LICENSE IN LICENSE",
"main": "main/index.js",
"module": "module/index.js",
"typings": "types/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"directories": {
"lib": "src",
"test": "__tests__"
},
"files": [
"main",
"module",
"src",
"types"
"dist",
"!CHANGELOG.md"
],
"scripts": {
"build:main": "cross-env BABEL_ENV=production babel src --out-dir main --delete-dir-on-start --extensions \".tsx,.ts,.js\"",
"build:module": "cross-env MODULE=true babel src --out-dir module --delete-dir-on-start --extensions \".tsx,.ts,.js\"",
"build:ts": "tsc --project ./tsconfig.json",
"build": "npm run build:module && npm run build:main",
"buidl": "npm run build && npm run build:ts",
"build:proto": "npm run clean && npm run proto",
"build:cjs": "yarn tsc -p tsconfig.json --outDir dist --module commonjs || true",
"build:mjs": "yarn tsc -p tsconfig.json --outDir mjs --module es2022 --declaration false || true",
"clean:mjs": "rimraf mjs",
"clean:dist": "rimraf dist",
"clean": "npm run clean:mjs && npm run clean:dist",
"build:rename": "publish-scripts --cmd rename --srcDir mjs --outDir dist --findExt js --replaceExt mjs --no-rmDir",
"build": "npm run clean && npm run build:cjs && npm run build:mjs && npm run build:rename",
"codegen": "cross-env NODE_ENV=development babel-node scripts/codegen.js",
"prepare": "npm run build",
"lint": "eslint .",
"format": "eslint . --fix",
"clean": "rimraf ./types && rimraf ./src/codegen",
"test": "jest",
"test:watch": "jest --watch",
"test:debug": "node --inspect node_modules/.bin/jest --runInBand"
Expand Down Expand Up @@ -75,17 +77,16 @@
"jest-in-case": "^1.0.2",
"mkdirp": "1.0.4",
"prettier": "^2.7.0",
"regenerator-runtime": "^0.13.7",
"publish-scripts": "0.1.0",
"rimraf": "3.0.2",
"ts-jest": "^29.0.1",
"typescript": "^4.8.3"
"typescript": "^5.0.4"
},
"dependencies": {
"@babel/runtime": "^7.19.0",
"@chain-registry/osmosis": "1.11.0",
"@chain-registry/types": "0.14.0",
"bignumber.js": "9.1.1",
"long": "5.2.1",
"osmojs": "^16.0.0"
}
}
}
29 changes: 21 additions & 8 deletions packages/math/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
{
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"skipLibCheck": true,
"emitDeclarationOnly": false,
"declaration": true,
"declarationDir": "./types",
"emitDeclarationOnly": true,
"isolatedModules": true,
"esModuleInterop": true,
"resolveJsonModule": true,
"target": "es2022",
"lib": [
"es2022",
"DOM"
],
"sourceMap": true,
"isolatedModules": true,
"allowJs": true,
"lib": ["es2015"]
"downlevelIteration": true,
"moduleResolution": "node",
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
}
"include": [
"src/**/*"
],
"exclude": [
"node_modules"
]
}
3 changes: 2 additions & 1 deletion packages/osmojs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ pids
*.seed

# dist
out
dist
mjs
main
module

Expand Down
37 changes: 19 additions & 18 deletions packages/osmojs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,32 @@
"author": "Dan Lynch <pyramation@gmail.com>",
"homepage": "https://github.com/osmosis-labs/osmojs/tree/master/packages/osmojs#readme",
"license": "SEE LICENSE IN LICENSE",
"main": "main/index.js",
"module": "module/index.js",
"typings": "types/index.d.ts",
"main": "dist/index.js",
"module": "dist/index.mjs",
"typings": "dist/index.d.ts",
"jest": {
"testTimeout": 15000
},
"directories": {
"lib": "src",
"test": "__tests__"
},
"files": [
"main",
"module",
"src",
"types"
"dist",
"!CHANGELOG.md"
],
"scripts": {
"build:main": "cross-env BABEL_ENV=production babel src --out-dir main --delete-dir-on-start --extensions \".tsx,.ts,.js\"",
"build:module": "cross-env MODULE=true babel src --out-dir module --delete-dir-on-start --extensions \".tsx,.ts,.js\"",
"build:ts": "tsc --project ./tsconfig.json",
"build": "npm run build:module && npm run build:main",
"buidl": "npm run build && npm run build:ts",
"build:proto": "npm run clean && npm run proto",
"build:cjs": "yarn tsc -p tsconfig.json --outDir dist --module commonjs || true",
"build:mjs": "yarn tsc -p tsconfig.json --outDir mjs --module es2022 --declaration false || true",
"clean:mjs": "rimraf mjs",
"clean:dist": "rimraf dist",
"clean": "npm run clean:mjs && npm run clean:dist",
"build:rename": "publish-scripts --cmd rename --srcDir mjs --outDir dist --findExt js --replaceExt mjs --no-rmDir",
"build": "npm run clean && npm run build:cjs && npm run build:mjs && npm run build:rename",
"codegen": "cross-env NODE_ENV=development babel-node scripts/codegen.js",
"prepare": "npm run build",
"lint": "eslint .",
"format": "eslint . --fix",
"clean": "rimraf ./types && rimraf ./src/codegen",
"test": "jest --testPathIgnorePatterns=starship/",
"test:watch": "jest --watch --testPathIgnorePatterns=starship/",
"test:debug": "node --inspect node_modules/.bin/jest --runInBand --testPathIgnorePatterns=starship/",
Expand Down Expand Up @@ -106,14 +108,13 @@
"node-fetch": "^2.6.9",
"path": "^0.12.7",
"prettier": "^2.7.0",
"regenerator-runtime": "^0.13.7",
"publish-scripts": "0.1.0",
"rimraf": "3.0.2",
"sinon": "14.0.2",
"ts-jest": "^29.0.1",
"typescript": "^4.8.3"
"typescript": "^5.0.4"
},
"dependencies": {
"@babel/runtime": "^7.19.0",
"@cosmjs/amino": "0.29.3",
"@cosmjs/proto-signing": "0.29.3",
"@cosmjs/stargate": "0.29.3",
Expand All @@ -122,4 +123,4 @@
"long": "^5.2.0",
"protobufjs": "^6.11.3"
}
}
}
20 changes: 14 additions & 6 deletions packages/osmojs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
{
"compilerOptions": {
"baseUrl": ".",
"rootDir": "src",
"skipLibCheck": true,
"emitDeclarationOnly": false,
"declaration": true,
"declarationDir": "./types",
"emitDeclarationOnly": true,
"isolatedModules": true,
"esModuleInterop": true,
"allowJs": true,
"target": "es2022",
"lib": [
"es2015"
]
"es2022",
"DOM"
],
"sourceMap": true,
"isolatedModules": true,
"allowJs": true,
"downlevelIteration": true,
"moduleResolution": "node",
"resolveJsonModule": true
},
"include": [
"src/**/*"
Expand Down
Loading

0 comments on commit 46b647e

Please sign in to comment.