Skip to content

Commit

Permalink
Build dist-typings (#33)
Browse files Browse the repository at this point in the history
* chore: restore `declarationDir`

* chore: bump ts config

* chore: cleanup dependencies

* chore: add TS scripts

* chore: output of `yarn upgrade`

* chore: yarn

* fix: missing dependency
  • Loading branch information
DavideIadeluca authored Oct 27, 2024
1 parent 20420ee commit 5e2d357
Show file tree
Hide file tree
Showing 3 changed files with 708 additions and 753 deletions.
19 changes: 12 additions & 7 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@
"version": "0.0.0",
"private": true,
"prettier": "@flarum/prettier-config",
"dependencies": {
"devDependencies": {
"prettier": "^3.0.3",
"@flarum/prettier-config": "^1.0.0",
"flarum-tsconfig": "^1.0.2",
"flarum-tsconfig": "^1.0.3",
"flarum-webpack-config": "^2.0.0",
"webpack": "^5.94.0",
"webpack-cli": "^5.1.4"
},
"devDependencies": {
"prettier": "^3.0.3"
"webpack-cli": "^5.1.4",
"typescript-coverage-report": "^0.6.1"
},
"scripts": {
"dev": "webpack --mode development --watch",
"build": "webpack --mode production",
"analyze": "cross-env ANALYZER=true yarn run build",
"format": "prettier --write src",
"format-check": "prettier --check src"
"format-check": "prettier --check src",
"clean-typings": "npx rimraf dist-typings && mkdir dist-typings",
"build-typings": "yarn run clean-typings && ([ -e src/@types ] && cp -r src/@types dist-typings/@types || true) && tsc && yarn run post-build-typings",
"post-build-typings": "find dist-typings -type f -name '*.d.ts' -print0 | xargs -0 sed -i 's,../src/@types,@types,g'",
"check-typings": "tsc --noEmit --emitDeclarationOnly false",
"check-typings-coverage": "typescript-coverage-report"
}
}
1 change: 1 addition & 0 deletions js/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"extends": "flarum-tsconfig",
"include": ["src/**/*", "../vendor/*/*/js/dist-typings/@types/**/*", "@types/**/*"],
"compilerOptions": {
"declarationDir": "./dist-typings",
"noUnusedLocals": true,
"noUnusedParameters": true,
"baseUrl": ".",
Expand Down
Loading

0 comments on commit 5e2d357

Please sign in to comment.