Skip to content

Commit

Permalink
Set up publishing of types to npm #1546
Browse files Browse the repository at this point in the history
  • Loading branch information
alansemenov committed Jan 2, 2025
1 parent 82761e9 commit 03f978d
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 2 deletions.
10 changes: 9 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,19 @@ tasks.register('npmBuild', NpmTask) {
outputs.dir 'build/resources/main'
outputs.upToDateWhen { false }
}

tasks.register('publishToNpm', NpmTask ) {
onlyIf { !version.endsWith( '-SNAPSHOT' ) }
args = ['publish']
dependsOn npmBuild
workingDir = file('build/types')
}

publish.dependsOn publishToNpm
compileTestJava.dependsOn npmBuild
jar.dependsOn npmBuild
javadoc.dependsOn npmBuild


if ( BUILD_ENV == 'development' )
{
task nsiInstall( type: NpmTask ) {
Expand Down
190 changes: 190 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
"@typescript-eslint/eslint-plugin": "^8.18.2",
"@typescript-eslint/parser": "^8.18.2",
"babel-loader": "^9.2.1",
"bun": "^1.1.42",
"concurrently": "^9.1.1",
"core-js-pure": "^3.39.0",
"diffable-html": "^5.0.0",
Expand Down Expand Up @@ -81,7 +82,7 @@
"license": "Apache-2.0",
"private": true,
"scripts": {
"build": "concurrently -c auto -g --timings npm:rollup:nodePolyfills npm:tsup:server",
"build": "concurrently -c auto -g --timings npm:rollup:nodePolyfills npm:tsup:server npm:build:types",
"build:types": "tsc -p types/tsconfig.types.json && bun types/process.ts",
"check:types": "concurrently -c auto -g --timings npm:check:types:*",
"check:types:graal": "npx tsc --noEmit -p tsconfig.graal.json",
Expand Down

0 comments on commit 03f978d

Please sign in to comment.