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

adopt building extensions #207731

Merged
merged 6 commits into from
Mar 15, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
rename
  • Loading branch information
sandy081 committed Mar 14, 2024
commit e077d093eb7bf2a40112e6be8f426ce92ae7e88a
19 changes: 9 additions & 10 deletions build/gulpfile.extensions.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,23 +73,22 @@ const compilations = [

const getBaseUrl = out => `https://ticino.blob.core.windows.net/sourcemaps/${commit}/${out}`;

const tasks = compilations.map(function (tsconfigFileRelativePath) {
const tsconfigFile = path.join(root, tsconfigFileRelativePath);
const extensionRoot = path.dirname(tsconfigFile);
const relativeDirname = path.dirname(tsconfigFileRelativePath.substring(tsconfigFileRelativePath.indexOf('extensions/') + 11));
const tasks = compilations.map(function (tsconfigFile) {
const absolutePath = path.join(root, tsconfigFile);

const overrideOptions = {};
overrideOptions.sourceMap = true;

const name = relativeDirname.replace(/\//g, '-');

const srcBase = path.join(extensionRoot, 'src');
const srcRoot = path.dirname(absolutePath);
const srcBase = path.join(srcRoot, 'src');
const src = path.join(srcBase, '**');
const srcOpts = { cwd: path.dirname(__dirname), base: srcBase, dot: true };

const out = path.join(extensionRoot, 'out');
const out = path.join(srcRoot, 'out');
const baseUrl = getBaseUrl(out);

const relativeDirname = path.dirname(tsconfigFile.substring(tsconfigFile.indexOf('extensions/') + 11));
sandy081 marked this conversation as resolved.
Show resolved Hide resolved
const name = relativeDirname.replace(/\//g, '-');
sandy081 marked this conversation as resolved.
Show resolved Hide resolved
let headerId, headerOut;
const index = relativeDirname.indexOf('/');
sandy081 marked this conversation as resolved.
Show resolved Hide resolved
if (index < 0) {
Expand All @@ -108,9 +107,9 @@ const tasks = compilations.map(function (tsconfigFileRelativePath) {
const reporter = createReporter('extensions');

overrideOptions.inlineSources = Boolean(build);
overrideOptions.base = path.dirname(tsconfigFile);
overrideOptions.base = path.dirname(absolutePath);

const compilation = tsb.create(tsconfigFile, overrideOptions, { verbose: false, transpileOnly, transpileOnlyIncludesDts: transpileOnly, transpileWithSwc: true }, err => reporter(err.toString()));
const compilation = tsb.create(absolutePath, overrideOptions, { verbose: false, transpileOnly, transpileOnlyIncludesDts: transpileOnly, transpileWithSwc: true }, err => reporter(err.toString()));

const pipeline = function () {
const input = es.through();
Expand Down
Loading