mirror of
https://github.com/google/blockly.git
synced 2026-01-06 08:30:13 +01:00
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:
committed by
GitHub
parent
76b1e023e3
commit
bcd62f170b
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user