From 87500c78772133ce9876b9562d86d56a8c0ecc23 Mon Sep 17 00:00:00 2001 From: tanas80 Date: Tue, 25 Jun 2024 15:11:01 +0300 Subject: [PATCH] JSDraw: Fix build for TypeScript --- source/web/.npmignore | 9 +++++++++ source/web/CHANGELOG.md | 4 ++++ source/web/package-lock.json | 4 ++-- source/web/package.json | 6 +++--- source/web/tsconfig.json | 15 ++++++++------- 5 files changed, 26 insertions(+), 12 deletions(-) diff --git a/source/web/.npmignore b/source/web/.npmignore index ae57c3a..934e72b 100644 --- a/source/web/.npmignore +++ b/source/web/.npmignore @@ -1,3 +1,12 @@ +src/**/*.ts +!src/**/*.d.ts + +page/**/*.ts +!page/**/*.d.ts + +form/**/*.ts +!form/**/*.d.ts + # Developer keys upload.keys.json diff --git a/source/web/CHANGELOG.md b/source/web/CHANGELOG.md index 743918b..3bfba92 100644 --- a/source/web/CHANGELOG.md +++ b/source/web/CHANGELOG.md @@ -1,5 +1,9 @@ # JSDraw.Lite changelog +## 0.0.3 (2024-06-25) + +Fix build for TypeScript + ## 0.0.2 (2024-06-24) Typing to Typescript diff --git a/source/web/package-lock.json b/source/web/package-lock.json index d26fce5..9324894 100644 --- a/source/web/package-lock.json +++ b/source/web/package-lock.json @@ -1,12 +1,12 @@ { "name": "@datagrok-libraries/js-draw-lite", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@datagrok-libraries/js-draw-lite", - "version": "0.0.2", + "version": "0.0.3", "devDependencies": { "@types/node": "^18.11.18", "@types/wu": "^2.1.44", diff --git a/source/web/package.json b/source/web/package.json index 2880a6d..7303acd 100644 --- a/source/web/package.json +++ b/source/web/package.json @@ -1,7 +1,7 @@ { "name": "@datagrok-libraries/js-draw-lite", "friendlyName": "JsDrawLite", - "version": "0.0.2", + "version": "0.0.3", "description": "JSDraw.Lite forked from http://www.scilligence.com/", "devDependencies": { "@types/node": "^18.11.18", @@ -20,8 +20,8 @@ "webpack-cli": "^4.9.1" }, "scripts": { - "build": "webpack", - "build-prod": "cross-env NODE_ENV=production webpack", + "build": "tsc && webpack", + "build-prod": "cross-env NODE_ENV=production \"tsc && webpack\"", "lint": "eslint src --ext .ts", "lint-fix": "eslint src --ext .ts --fix" }, diff --git a/source/web/tsconfig.json b/source/web/tsconfig.json index 7c4f739..8b49f2c 100644 --- a/source/web/tsconfig.json +++ b/source/web/tsconfig.json @@ -10,8 +10,8 @@ "allowJs": true, /* Allow javascript files to be compiled. */ // "checkJs": true, /* Report errors in .js files. */ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ - // "declaration": true, /* Generates corresponding '.d.ts' file. */ - // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ + "declaration": true, /* Generates corresponding '.d.ts' file. */ + "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ // "outDir": "./", /* Redirect output structure to the directory. */ @@ -55,17 +55,18 @@ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ /* Source Map Options */ - // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ - // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ + "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ + "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ /* Experimental Options */ - "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ - "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ + // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ + // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ /* Advanced Options */ "skipLibCheck": true, /* Skip type checking of declaration files. */ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ - } + }, + "include": ["**/*.ts"] }