зеркало из https://github.com/Azure/ms-rest-js.git
Enable strict on scripts, fix problems
This commit is contained in:
Родитель
9cd19888a4
Коммит
3cdc7ae9dc
|
@ -266,7 +266,7 @@ function writePackageJson(packageJson: any, packageJsonFilePath: string): void {
|
||||||
fs.writeFileSync(packageJsonFilePath, JSON.stringify(packageJson, undefined, " ") + "\n");
|
fs.writeFileSync(packageJsonFilePath, JSON.stringify(packageJson, undefined, " ") + "\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
export function updateLocalDependencies(packageFolders: PackageFolder[], localDependencyNPMScript: string, getNewDependencyVersion: (dependencyName: string) => string): void {
|
export function updateLocalDependencies(packageFolders: PackageFolder[], localDependencyNPMScript: string, getNewDependencyVersion: (dependencyName: string) => string | undefined): void {
|
||||||
const forceRefresh: boolean = shouldForceRefresh(process.argv);
|
const forceRefresh: boolean = shouldForceRefresh(process.argv);
|
||||||
|
|
||||||
for (const packageFolder of packageFolders) {
|
for (const packageFolder of packageFolders) {
|
||||||
|
@ -309,8 +309,8 @@ export function updateLocalDependencies(packageFolders: PackageFolder[], localDe
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateLocalDependency(packageFolder: PackageFolder, dependencyName: string, getNewDependencyVersion: (dependencyName: string) => string): boolean {
|
function updateLocalDependency(packageFolder: PackageFolder, dependencyName: string, getNewDependencyVersion: (dependencyName: string) => string | undefined): boolean {
|
||||||
const newDependencyVersion: string = getNewDependencyVersion(dependencyName);
|
const newDependencyVersion: string = getNewDependencyVersion(dependencyName) || "";
|
||||||
|
|
||||||
const packageFolderPath: string = packageFolder.folderPath;
|
const packageFolderPath: string = packageFolder.folderPath;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"extends": "../tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"noEmit": true,
|
||||||
|
"strict": true
|
||||||
|
},
|
||||||
|
"include": [
|
||||||
|
"*.ts",
|
||||||
|
"*.js"
|
||||||
|
]
|
||||||
|
}
|
|
@ -84,7 +84,8 @@
|
||||||
"url": "http://github.com/Azure/ms-rest-js/issues"
|
"url": "http://github.com/Azure/ms-rest-js/issues"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "run-p build:node build:es build:browser",
|
"build": "run-p build:scripts build:node build:es build:browser",
|
||||||
|
"build:scripts": "tsc -p ./.scripts/",
|
||||||
"build:node": "tsc",
|
"build:node": "tsc",
|
||||||
"build:es": "tsc -p tsconfig.es.json",
|
"build:es": "tsc -p tsconfig.es.json",
|
||||||
"build:browser": "webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o msRestBundle.min.js msRestBundle.js",
|
"build:browser": "webpack && node node_modules/uglify-es/bin/uglifyjs --source-map -c -m -o msRestBundle.min.js msRestBundle.js",
|
||||||
|
|
Загрузка…
Ссылка в новой задаче