Adopt the new `editor/contrib` layering rules in the esm metadata generation

pull/2911/head
Alex Dima 3 years ago
parent 2a243d07fe
commit 9fac3918b2
No known key found for this signature in database
GPG Key ID: 39563C1504FDD0C9

@ -48,7 +48,7 @@ jobs:
run: npm run compile --prefix webpack-plugin
- name: Package using webpack plugin
run: npm run smoketest --prefix webpack-plugin
run: npm run package-for-smoketest --prefix webpack-plugin
- name: Run smoke test
run: npm run smoketest

@ -197,7 +197,7 @@ jobs:
- name: (monaco-editor) Package using webpack plugin
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
working-directory: './monaco-editor'
run: npm run smoketest --prefix webpack-plugin
run: npm run package-for-smoketest --prefix webpack-plugin
- name: (monaco-editor) Run smoke test
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}

@ -73,7 +73,7 @@ Open [http://localhost:8080/monaco-editor/test/manual/?editor=src](http://localh
/src/monaco-editor> npm run compile --prefix webpack-plugin
# package using the webpack plugin
/src/monaco-editor> npm run smoketest --prefix webpack-plugin
/src/monaco-editor> npm run package-for-smoketest --prefix webpack-plugin
# run the smoketest
/src/monaco-editor> npm run smoketest-debug

@ -245,8 +245,21 @@ function getFeatures() {
/** @type {{label:string;entry:any;}[]} */
let result = features.map((feature) => {
/** @type {string} */ let label;
if (customFeatureLabels[feature]) {
label = customFeatureLabels[feature];
} else {
const m1 = feature.match(/^vs\/editor\/contrib\/([^\/]+)/);
if (m1) {
// for editor/contrib features, use the first segment
label = m1[1];
} else {
// for everything else, use the last segment folder
label = path.basename(path.dirname(feature));
}
}
return {
label: customFeatureLabels[feature] || path.basename(path.dirname(feature)),
label: label,
entry: feature
};
});

@ -5,7 +5,7 @@
"main": "out/index.js",
"typings": "./out/index.d.ts",
"scripts": {
"smoketest": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack.config.js --progress",
"package-for-smoketest": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack.config.js --progress",
"smoketest-cross-origin": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack-cross-origin.config.js --progress",
"watch": "tsc -w -p tsconfig.json",
"compile": "tsc -p tsconfig.json",

Loading…
Cancel
Save