mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Adopt the new editor/contrib layering rules in the esm metadata generation
This commit is contained in:
parent
2a243d07fe
commit
9fac3918b2
5 changed files with 18 additions and 5 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
|
|
@ -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…
Add table
Add a link
Reference in a new issue