test(packaging): added test for source map correctness
This commit is contained in:

committed by
Matias Niemelä

parent
9d93c859d7
commit
86f7b4170c
22
tools/gulp-tasks/source-map-test.js
Normal file
22
tools/gulp-tasks/source-map-test.js
Normal file
@ -0,0 +1,22 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const sourceMapTest = require('../source-map-test');
|
||||
|
||||
const excludedPackages = ['bazel', 'tsc-wrapped', 'benchpress', 'compiler-cli', 'language-service'];
|
||||
|
||||
module.exports = (gulp) => () => {
|
||||
const packageDir = path.resolve(process.cwd(), 'dist/packages-dist/');
|
||||
const packages =
|
||||
fs.readdirSync(packageDir).filter(package => excludedPackages.indexOf(package) === -1);
|
||||
|
||||
packages.forEach(package => {
|
||||
if (sourceMapTest(package).length) {
|
||||
process.exit(1);
|
||||
}
|
||||
});
|
||||
|
||||
if (!packages.length) {
|
||||
console.log('No packages found in packages-dist. Unable to run source map test.');
|
||||
process.exit(1);
|
||||
}
|
||||
};
|
Reference in New Issue
Block a user