From bcd62f170b18f330c50603ecc259ad089ff0951b Mon Sep 17 00:00:00 2001 From: Christopher Allen Date: Tue, 23 Aug 2022 00:12:55 +0100 Subject: [PATCH] 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. --- scripts/gulpfiles/build_tasks.js | 12 +----------- scripts/gulpfiles/package_tasks.js | 10 ---------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/scripts/gulpfiles/build_tasks.js b/scripts/gulpfiles/build_tasks.js index 8521bf6d6..8f0cecfeb 100644 --- a/scripts/gulpfiles/build_tasks.js +++ b/scripts/gulpfiles/build_tasks.js @@ -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)); } diff --git a/scripts/gulpfiles/package_tasks.js b/scripts/gulpfiles/package_tasks.js index f0cc9d878..312754d6c 100644 --- a/scripts/gulpfiles/package_tasks.js +++ b/scripts/gulpfiles/package_tasks.js @@ -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,