build: remove post-processing of .d.ts files (#13294)
Note that the duplication in tsconfig.json files will be fixed in a followup CL now that we have tsconfig inheritance BREAKING CHANGE: Angular 4 will support only TypeScript 2.1, so we no longer provide backwards compatibility to TS 1.8.
This commit is contained in:
parent
2ada3187a6
commit
5c431cee02
12
build.sh
12
build.sh
|
@ -161,18 +161,6 @@ do
|
||||||
${TSC} -p ${SRCDIR}/tsconfig-2015.json
|
${TSC} -p ${SRCDIR}/tsconfig-2015.json
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "====== TSC 1.8 d.ts compat for ${DESTDIR} ====="
|
|
||||||
# safely strips 'readonly' specifier from d.ts files to make them compatible with tsc 1.8
|
|
||||||
if [ "$(uname)" == "Darwin" ]; then
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -e 's/\/\/\/ <reference types="node" \/>//g'
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i '' -E 's/^( +)abstract ([[:alnum:]]+\:)/\1\2/g'
|
|
||||||
else
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -e 's/\(^ *(static |private )*\)*readonly */\1/g'
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -e 's/\/\/\/ <reference types="node" \/>//g'
|
|
||||||
find ${DESTDIR} -type f -name '*.d.ts' -print0 | xargs -0 sed -i -E 's/^( +)abstract ([[:alnum:]]+\:)/\1\2/g'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ${PACKAGE} == benchpress ]]; then
|
if [[ ${PACKAGE} == benchpress ]]; then
|
||||||
cp ${SRCDIR}/*.md ${DESTDIR}
|
cp ${SRCDIR}/*.md ${DESTDIR}
|
||||||
cp -r ${SRCDIR}/docs ${DESTDIR}
|
cp -r ${SRCDIR}/docs ${DESTDIR}
|
||||||
|
|
|
@ -14,7 +14,9 @@
|
||||||
"sourceRoot": ".",
|
"sourceRoot": ".",
|
||||||
"outDir": "../../../dist/packages-dist/benchpress",
|
"outDir": "../../../dist/packages-dist/benchpress",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true,
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"exclude": ["integrationtest"],
|
"exclude": ["integrationtest"],
|
||||||
"files": [
|
"files": [
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": [ "es2015", "dom" ]
|
"lib": [ "es2015", "dom" ],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -13,7 +13,12 @@
|
||||||
"moduleResolution": "node",
|
"moduleResolution": "node",
|
||||||
"rootDir": "",
|
"rootDir": "",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"lib": ["es6", "dom"],
|
"lib": [
|
||||||
"baseUrl": "."
|
"es6",
|
||||||
|
"dom"
|
||||||
|
],
|
||||||
|
"baseUrl": ".",
|
||||||
|
// don't auto-discover @types/fs-extra
|
||||||
|
"types": []
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -17,7 +17,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2015", "dom"]
|
"lib": ["es2015", "dom"],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -15,7 +15,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"lib": ["es2015", "dom"],
|
"lib": ["es2015", "dom"],
|
||||||
"skipLibCheck": true
|
"skipLibCheck": true,
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2015", "dom"]
|
"lib": ["es2015", "dom"],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2015", "dom"]
|
"lib": ["es2015", "dom"],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -16,7 +16,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2015", "dom"]
|
"lib": ["es2015", "dom"],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2015", "dom"]
|
"lib": ["es2015", "dom"],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -20,7 +20,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2015", "dom"]
|
"lib": ["es2015", "dom"],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": ["es2015", "dom"]
|
"lib": ["es2015", "dom"],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
|
@ -19,7 +19,9 @@
|
||||||
"inlineSources": true,
|
"inlineSources": true,
|
||||||
"target": "es5",
|
"target": "es5",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true,
|
||||||
"lib": [ "es2015", "dom" ]
|
"lib": [ "es2015", "dom" ],
|
||||||
|
// don't auto-discover @types/node, it results in a ///<reference in the .d.ts output
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"index.ts",
|
"index.ts",
|
||||||
|
|
Loading…
Reference in New Issue