mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Simplify buildAMD usages
This commit is contained in:
parent
0278fd481d
commit
6b2860b7b0
6 changed files with 25 additions and 17 deletions
|
|
@ -212,7 +212,8 @@ exports.buildESM = buildESM;
|
|||
* @param {{
|
||||
* base: string;
|
||||
* entryPoint: string;
|
||||
* banner: string;
|
||||
* amdModuleId: string;
|
||||
* amdDependencies?: string[];
|
||||
* }} options
|
||||
*/
|
||||
function buildOneAMD(type, options) {
|
||||
|
|
@ -227,7 +228,7 @@ function buildOneAMD(type, options) {
|
|||
},
|
||||
globalName: 'moduleExports',
|
||||
banner: {
|
||||
js: `${bundledFileHeader}${options.banner}`
|
||||
js: `${bundledFileHeader}define("${options.amdModuleId}",[${(options.amdDependencies || []).map(dep => (`"${dep}"`)).join(',')}],()=>{`
|
||||
},
|
||||
footer: {
|
||||
js: 'return moduleExports;\n});'
|
||||
|
|
@ -251,7 +252,8 @@ function buildOneAMD(type, options) {
|
|||
* @param {{
|
||||
* base: string;
|
||||
* entryPoint: string;
|
||||
* banner: string;
|
||||
* amdModuleId: string;
|
||||
* amdDependencies?: string[];
|
||||
* }} options
|
||||
*/
|
||||
function buildAMD(options) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue