@nevware21/grunt-ts-plugin
Advanced tools
Comparing version 0.4.6 to 0.5.0
@@ -0,1 +1,9 @@ | ||
# v0.5.0 (July 21st, 2024) | ||
## Changelog | ||
- #44 [Feature] Add support to inlining the tsconfig.json within the grunt config | ||
- #254 [Feature] Add Support for multiple tsconfigs | ||
- #259 Bump @nevware21 gunt plugins to latest | ||
# v0.4.6 (July 4th, 2024) | ||
@@ -2,0 +10,0 @@ |
{ | ||
"name": "@nevware21/grunt-ts-plugin", | ||
"description": "TypeScript Compilation Plugin for GruntJS", | ||
"version": "0.4.6", | ||
"version": "0.5.0", | ||
"homepage": "https://github.com/nevware21/grunt-plugins", | ||
@@ -26,5 +26,6 @@ "license": "MIT", | ||
"build": "grunt ts_plugin --verbose && npm run package", | ||
"rebuild": "npm run build", | ||
"rebuild": "npm run build && npm run test", | ||
"package": "rollup -c rollup.config.mjs", | ||
"test": "grunt ts_plugin_test", | ||
"test": "grunt ts_plugin_test && npm run test:node", | ||
"test:node": "nyc ts-mocha -p ./test/tsconfig.test.json ./test/src/**/*.test.ts", | ||
"lint": "tslint -p tsconfig.json" | ||
@@ -55,5 +56,5 @@ }, | ||
"@types/grunt": "^0.4.27", | ||
"@nevware21/grunt-plugins-shared-utils": "0.3.3", | ||
"@nevware21/grunt-eslint-ts": "^0.2.4", | ||
"@nevware21/grunt-ts-plugin": "^0.4.5", | ||
"@nevware21/grunt-plugins-shared-utils": "0.5.0", | ||
"@nevware21/grunt-eslint-ts": "^0.2.5", | ||
"@nevware21/grunt-ts-plugin": "^0.4.6", | ||
"grunt": "^1.5.3", | ||
@@ -60,0 +61,0 @@ "grunt-cli": "^1.4.3", |
@@ -71,7 +71,19 @@ <h1 align="center">@Nevware21/grunt-ts-plugin</h1> | ||
|------|------|------------ | ||
| tsconfig | string | The path to the tsConfig file to use, when specified | ||
| src | string | string[] | A single string or an array of source files to be "added" to the tsconfig as either files or include. When a string it assumes a single entry, there is not encoded list etc. | ||
| out | string | Concatenate the output into a single file using the tsc --out parameter. If the tscConfig also includes an ```outDir``` this value will be ignored. | ||
| outDir | string | Use the tsc --outDir parameter. If the tscConfig also includes an ```out``` or ```outFile``` the value will be ignored. | ||
| tsconfig | `string` \| `ITsOption` \| `Array<string \| ITsOption>` \| `Iterable<string \| ITsOption>` \| `Iterator<string \| ITsOption>` it may also be a `function` that returns any of these or a `Promise` that also returns any of the above including a function that returns the result<br/> <sub>(since 0.5.0)</sub><br />`string` <sub>(prior to 0.5.0)</sub> | The path to the tsConfig file to use, when specified | ||
| src | `string` | string[] | A single string or an array of source files to be "added" to the tsconfig as either files or include. When a string it assumes a single entry, there is not encoded list etc. | ||
| out | `string` | Concatenate the output into a single file using the tsc --out parameter. If the tscConfig also includes an ```outDir``` this value will be ignored. | ||
| outDir | `string` | Use the tsc --outDir parameter. If the tscConfig also includes an ```out``` or ```outFile``` the value will be ignored. | ||
#### ITsOption | ||
| Name | Type | Description | ||
|------|------|------------ | ||
| name | `string` | The filename / location of the `tsconfig.json` to be used | ||
| tsconfig | `Object` | An inlined version of the supported `tsconfig`, supports all options supported by TypeScript (no direct validate is applied) | ||
| src | `string` \| `string[]` | A single string or an array of source files to be "added" to the tsconfig as either files or include. When a string it assumes a single entry, there is not encoded list etc. | ||
| out | `string` | Concatenate the output into a single file using the tsc --out parameter. If the tscConfig also includes an ```outDir``` this value will be ignored. | ||
| outDir | `string` | Use the tsc --outDir parameter. If the tscConfig also includes an ```out``` or ```outFile``` the value will be ignored. | ||
| keepTemp | `Boolean`<br/>Defaults: `false` | Additional debugging switch that will not cleanup (delete) the temporary files used for building, use this flag to review the generated temporary tsconfig.json if one is required. | ||
| execute | `(grunt: IGrunt, args: string[]) => IPromise<IExecuteResponse>` | An optional function that will be called to compile the project. | ||
#### __Common options:__ Global and Task | ||
@@ -81,12 +93,12 @@ | ||
|------|------|------------ | ||
| src | string | string[] | A single string or an array of source files to included in each task. | ||
| additionalFlags | string \| string[]<br />Default: Empty String | Pass in additional flags to the tsc compiler (added to the end of the command line) | ||
| failOnTypeErrors | Boolean<br/>Defaults: true | Should the compile run fail when type errors are identified, ignores failures from imported node_module/** packages | ||
| failOnExternalTypeErrors | Boolean<br/>Defaults: false | Should the compile run fail when type errors are identified as originating from an external packages (node_modules/) | ||
| tscPath | String<br>Defaults: reverse scan from project path for node_modules/typescript/bin folder | Identify the root path of the version of the TypeScript is installed, this may include be either the root folder of where the node_modules/typescript/bin folder is located or the location of the command-line version of tsc. | ||
| compiler | String <br />Defaults: to "tsc" within the located or defined tscPath | Identify the complete path to the command line version of tsc | ||
| onError | ErrorHandlerResponse<br />| This callback function will be called when an error matching "error: TS\d+:" is found, the errorNumber is the detected value and line is the entire line containing the error message. | ||
| debug | Boolean<br/>Defaults: false | Log additional debug messages during the build, you can also enable grunt --verbose mode. | ||
| logOutput | Boolean<br/>Defaults: false | Log the output of the execute response | ||
| keepTemp | Boolean<br/>Defaults: false | Additional debugging switch that will not cleanup (delete) the temporary files used for building, use this flag to review the generated temporary tsconfig.json if one is required. | ||
| src | `string` \| `string[]` | A single string or an array of source files to included in each task. | ||
| additionalFlags | `string` \| `string[]`<br />Default: Empty String | Pass in additional flags to the tsc compiler (added to the end of the command line) | ||
| failOnTypeErrors | `Boolea`n<br/>Defaults: `true` | Should the compile run fail when type errors are identified, ignores failures from imported node_module/** packages | ||
| failOnExternalTypeErrors | `Boolean`<br/>Defaults: `false` | Should the compile run fail when type errors are identified as originating from an external packages (node_modules/) | ||
| tscPath | `String`<br>Defaults: reverse scan from project path for node_modules/typescript/bin folder | Identify the root path of the version of the TypeScript is installed, this may include be either the root folder of where the node_modules/typescript/bin folder is located or the location of the command-line version of tsc. | ||
| compiler | `String` <br />Defaults: to "tsc" within the located or defined tscPath | Identify the complete path to the command line version of tsc | ||
| onError | `ErrorHandlerResponse`<br />| This callback function will be called when an error matching "error: TS\d+:" is found, the errorNumber is the detected value and line is the entire line containing the error message. | ||
| debug | `Boolean`<br/>Defaults: `false` | Log additional debug messages during the build, you can also enable grunt --verbose mode. | ||
| logOutput | `Boolean`<br/>Defaults: `false` | Log the output of the execute response | ||
| keepTemp | `Boolean`<br/>Defaults: `false` | Additional debugging switch that will not cleanup (delete) the temporary files used for building, use this flag to review the generated temporary tsconfig.json if one is required. | ||
@@ -145,2 +157,29 @@ **Example showing some option combinations** | ||
] | ||
}, | ||
"inline_utils_esnext": { | ||
tsconfig: { | ||
name: "./shared/tsconfig.json", | ||
tsconfig: { // Since 0.5.0 | ||
compilerOptions: { | ||
target: "esnext", | ||
outDir: "../dist/esnext" | ||
} | ||
} | ||
} | ||
}, | ||
"multiple_utils_default_and_esnext": { | ||
tsconfig: [ // Since 0.5.0 | ||
{ | ||
name: "./shared/tsconfig.json", | ||
}, | ||
{ | ||
name: "./shared/tsconfig.json", | ||
tsconfig: { | ||
compilerOptions: { | ||
target: "esnext", | ||
outDir: "../dist/esnext" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
@@ -147,0 +186,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
388898
2439
287
0