@ui5/create-webcomponents-package
Advanced tools
Comparing version 1.10.3 to 1.10.4-rc.0
@@ -6,2 +6,10 @@ # Change Log | ||
## [1.10.4-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.10.3...v1.10.4-rc.0) (2023-01-26) | ||
**Note:** Version bump only for package @ui5/create-webcomponents-package | ||
## [1.10.3](https://github.com/SAP/ui5-webcomponents/compare/v1.10.2...v1.10.3) (2023-01-25) | ||
@@ -8,0 +16,0 @@ |
29
index.js
@@ -22,2 +22,5 @@ #!/usr/bin/env node | ||
}; | ||
const isTypescriptRelatedFile = sourcePath => { | ||
return ["MyFirstComponent.ts", "tsconfig.json", "global.d.ts"].some(fileName => sourcePath.includes(fileName)); | ||
} | ||
@@ -43,2 +46,9 @@ // Validation of user input | ||
const copyFile = (vars, sourcePath, destPath) => { | ||
const ignoreJsRelated = vars.INIT_PACKAGE_VAR_TYPESCRIPT && sourcePath.includes("MyFirstComponent.js") | ||
const ignoreTsRelated = !vars.INIT_PACKAGE_VAR_TYPESCRIPT && isTypescriptRelatedFile(sourcePath) | ||
if (ignoreJsRelated || ignoreTsRelated) { | ||
return; | ||
} | ||
let content = fs.readFileSync(sourcePath, {encoding: "UTF-8"}); | ||
@@ -81,2 +91,20 @@ content = replaceVarsInFileContent(vars, content); | ||
// Add TypeScript support | ||
response = await prompts({ | ||
type: "select", | ||
name: "language", | ||
message: "Support TypeScript:", | ||
choices: [ | ||
{ | ||
title: "JavaScript", | ||
value: "js", | ||
}, | ||
{ | ||
title: "TypeScript", | ||
value: "ts", | ||
}, | ||
] | ||
}); | ||
const typescript = response.language === "ts"; | ||
// Get the port | ||
@@ -110,2 +138,3 @@ response = await prompts({ | ||
INIT_PACKAGE_VAR_CLASS_NAME: className, | ||
INIT_PACKAGE_VAR_TYPESCRIPT: typescript | ||
}; | ||
@@ -112,0 +141,0 @@ |
{ | ||
"name": "@ui5/create-webcomponents-package", | ||
"version": "1.10.3", | ||
"version": "1.10.4-rc.0", | ||
"description": "UI5 Web Components: create package", | ||
@@ -26,3 +26,3 @@ "author": "SAP SE (https://www.sap.com)", | ||
}, | ||
"gitHead": "78222ac6ff90e19163d924b84ef405d39943e98d" | ||
"gitHead": "b618aed1a969ce5a738b620cb8b2d7d796638d4c" | ||
} |
@@ -5,2 +5,3 @@ const getScripts = require("@ui5/webcomponents-tools/components-package/nps.js"); //eslint-disable-line | ||
port: INIT_PACKAGE_VAR_PORT, | ||
typescript: INIT_PACKAGE_VAR_TYPESCRIPT, | ||
}; | ||
@@ -7,0 +8,0 @@ |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
31664
32
380
2