Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Aug 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 1 addition & 11 deletions scripts/gulpfiles/build_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -659,23 +659,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));
}

Expand Down
10 changes: 0 additions & 10 deletions scripts/gulpfiles/package_tasks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -414,7 +405,6 @@ const package = gulp.series(
cleanReleaseDir,
gulp.parallel(
packageIndex,
packageSources,
packageCompressed,
packageBrowser,
packageNode,
Expand Down