chore(build): use inline sources in sourcemaps; don't package sources separately (#6362)

* chore(build): Add inline sources to sourcemaps

* chore(build): Don't package sources

Since the sources are now inline in the sourcemaps, they no longer
need to be package separately.
This commit is contained in:
Christopher Allen
2022-08-23 00:12:55 +01:00
committed by GitHub
parent 76b1e023e3
commit bcd62f170b
2 changed files with 1 additions and 21 deletions

View File

@@ -660,23 +660,13 @@ function buildCompiled() {
// option to Closure Compiler; instead feed them as input via gulp.src.
};
// Symlink source dirs from build dir so that sourcemaps work in
// compiled-mode testing.
for (const src of ['core', 'blocks', 'generators']) {
const target = `${BUILD_DIR}/${src}`
if (!fs.existsSync(target)) {
fs.symlinkSync(`../${src}`, target);
}
}
// Fire up compilation pipline.
return gulp.src(chunkOptions.js, {base: './'})
.pipe(stripApacheLicense())
.pipe(gulp.sourcemaps.init())
.pipe(compile(options))
.pipe(gulp.rename({suffix: COMPILED_SUFFIX}))
.pipe(
gulp.sourcemaps.write('.', {includeContent: false, sourceRoot: './'}))
.pipe(gulp.sourcemaps.write('.'))
.pipe(gulp.dest(BUILD_DIR));
}

View File

@@ -79,15 +79,6 @@ function checkBuildDir(done) {
done();
}
/**
* This task copies source files into the release directory.
*/
function packageSources() {
return gulp.src(['core/**/**', 'blocks/**', 'generators/**/**'],
{base: '.'})
.pipe(gulp.dest(RELEASE_DIR));
};
/**
* This task copies the compressed files and their source maps into
* the release directory.
@@ -414,7 +405,6 @@ const package = gulp.series(
cleanReleaseDir,
gulp.parallel(
packageIndex,
packageSources,
packageCompressed,
packageBrowser,
packageNode,