mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 10:25:42 +01:00
Use glob for bundling
This commit is contained in:
parent
9ca6cef477
commit
eee394ef11
2 changed files with 12 additions and 67 deletions
|
|
@ -78,19 +78,10 @@ This npm module is bundled and distributed in the [monaco-editor](https://www.np
|
|||
* create `$/src/myLang/myLang.contribution.ts`
|
||||
* create `$/src/myLang/myLang.ts`
|
||||
* create `$/src/myLang/myLang.test.ts`
|
||||
* restart compilation with `$> npm run watch`
|
||||
* edit `$/src/monaco.contribution.ts` and register your new language
|
||||
```js
|
||||
import './myLang/myLang.contribution';
|
||||
```
|
||||
* edit `$/test/setup.js` and load your new language while testing
|
||||
```js
|
||||
'release/dev/myLang/myLang.test',
|
||||
```
|
||||
* edit `$/scripts/bundle.js` and ship your new language
|
||||
```js
|
||||
bundleOne('myLang/myLang');
|
||||
```
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ const requirejs = require('requirejs');
|
|||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const terser = require('terser');
|
||||
const glob = require('glob');
|
||||
const helpers = require('monaco-plugin-helpers');
|
||||
|
||||
const REPO_ROOT = path.resolve(__dirname, '..');
|
||||
|
|
@ -21,64 +22,17 @@ const BUNDLED_FILE_HEADER = [
|
|||
].join('\n');
|
||||
|
||||
bundleOne('monaco.contribution');
|
||||
bundleOne('abap/abap');
|
||||
bundleOne('bat/bat');
|
||||
bundleOne('cameligo/cameligo'),
|
||||
bundleOne('css/css');
|
||||
bundleOne('coffee/coffee');
|
||||
bundleOne('cpp/cpp');
|
||||
bundleOne('csharp/csharp');
|
||||
bundleOne('dockerfile/dockerfile');
|
||||
bundleOne('fsharp/fsharp');
|
||||
bundleOne('go/go');
|
||||
bundleOne('handlebars/handlebars');
|
||||
bundleOne('html/html');
|
||||
bundleOne('ini/ini');
|
||||
bundleOne('pug/pug');
|
||||
bundleOne('java/java');
|
||||
bundleOne('javascript/javascript');
|
||||
bundleOne('kotlin/kotlin');
|
||||
bundleOne('less/less');
|
||||
bundleOne('lua/lua');
|
||||
bundleOne('markdown/markdown');
|
||||
bundleOne('msdax/msdax');
|
||||
bundleOne('objective-c/objective-c');
|
||||
bundleOne('pascal/pascal');
|
||||
bundleOne('pascaligo/pascaligo');
|
||||
bundleOne('php/php');
|
||||
bundleOne('powershell/powershell');
|
||||
bundleOne('postiats/postiats');
|
||||
bundleOne('python/python');
|
||||
bundleOne('r/r');
|
||||
bundleOne('razor/razor');
|
||||
bundleOne('ruby/ruby');
|
||||
bundleOne('rust/rust');
|
||||
bundleOne('scss/scss');
|
||||
bundleOne('sql/sql');
|
||||
bundleOne('st/st');
|
||||
bundleOne('swift/swift');
|
||||
bundleOne('typescript/typescript');
|
||||
bundleOne('vb/vb');
|
||||
bundleOne('xml/xml');
|
||||
bundleOne('yaml/yaml');
|
||||
bundleOne('sophia/sophia');
|
||||
bundleOne('solidity/solidity');
|
||||
bundleOne('sb/sb');
|
||||
bundleOne('mysql/mysql');
|
||||
bundleOne('redshift/redshift');
|
||||
bundleOne('pgsql/pgsql');
|
||||
bundleOne('redis/redis');
|
||||
bundleOne('csp/csp');
|
||||
bundleOne('scheme/scheme');
|
||||
bundleOne('clojure/clojure');
|
||||
bundleOne('shell/shell');
|
||||
bundleOne('perl/perl');
|
||||
bundleOne('powerquery/powerquery');
|
||||
bundleOne('azcli/azcli');
|
||||
bundleOne('apex/apex');
|
||||
bundleOne('tcl/tcl');
|
||||
bundleOne('graphql/graphql');
|
||||
bundleOne('twig/twig');
|
||||
glob('release/dev/*/*.contribution.js', { cwd: path.dirname(__dirname) }, function (err, files) {
|
||||
if (err) {
|
||||
console.log(err);
|
||||
return;
|
||||
}
|
||||
files.forEach(function (file) {
|
||||
file = file.replace(/\.contribution\.js$/, '');
|
||||
file = file.replace(/release[/\\]dev[/\\]/, '');
|
||||
bundleOne(file);
|
||||
});
|
||||
});
|
||||
|
||||
function bundleOne(moduleId, exclude) {
|
||||
requirejs.optimize({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue