Add css/less/scss plugin
This commit is contained in:
Родитель
500e5616c6
Коммит
b83bf844f2
|
@ -13,6 +13,12 @@
|
||||||
path: 'node_modules/monaco-typescript/release',
|
path: 'node_modules/monaco-typescript/release',
|
||||||
srcPath: '/monaco-typescript/out'
|
srcPath: '/monaco-typescript/out'
|
||||||
}, {
|
}, {
|
||||||
|
name: 'monaco-css',
|
||||||
|
contrib: 'vs/language/css/monaco.contribution',
|
||||||
|
modulePrefix: 'vs/language/css',
|
||||||
|
path: 'node_modules/monaco-css/release/min',
|
||||||
|
srcPath: '/monaco-css/release/dev'
|
||||||
|
},{
|
||||||
name: 'monaco-languages',
|
name: 'monaco-languages',
|
||||||
contrib: 'vs/basic-languages/src/monaco.contribution',
|
contrib: 'vs/basic-languages/src/monaco.contribution',
|
||||||
modulePrefix: 'vs/basic-languages',
|
modulePrefix: 'vs/basic-languages',
|
||||||
|
|
|
@ -19,8 +19,9 @@
|
||||||
"gulp": "^3.9.1",
|
"gulp": "^3.9.1",
|
||||||
"http-server": "^0.9.0",
|
"http-server": "^0.9.0",
|
||||||
"monaco-editor-core": "0.4.2",
|
"monaco-editor-core": "0.4.2",
|
||||||
"monaco-languages": "0.2.0",
|
"monaco-languages": "0.2.1",
|
||||||
"monaco-typescript": "0.2.1",
|
"monaco-typescript": "0.2.1",
|
||||||
|
"monaco-css": "1.0.0",
|
||||||
"rimraf": "^2.5.2"
|
"rimraf": "^2.5.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,19 +25,20 @@
|
||||||
<script src="../metadata.js"></script>
|
<script src="../metadata.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var RUN_EDITOR_FROM_SOURCE = false; // should run the editor from source? (or from the node module)
|
function getQueryStringValue (key) {
|
||||||
var RUN_PLUGINS_FROM_SOURCE = {}; // should run the editor plugins from source? (or from node modules)
|
return unescape(window.location.search.replace(new RegExp("^(?:.*[&\\?]" + escape(key).replace(/[\.\+\*]/g, "\\$&") + "(?:\\=([^&]*))?)?.*$", "i"), "$1"));
|
||||||
RUN_PLUGINS_FROM_SOURCE['monaco-typescript'] = false;
|
}
|
||||||
RUN_PLUGINS_FROM_SOURCE['monaco-languages'] = false;
|
|
||||||
|
|
||||||
// Resolve paths
|
// Resolve paths
|
||||||
if (RUN_EDITOR_FROM_SOURCE) {
|
// should run the editor and/or plugins from source? (or from the node module)
|
||||||
|
if (getQueryStringValue('editor') === 'dev') {
|
||||||
METADATA.CORE.path = METADATA.CORE.srcPath;
|
METADATA.CORE.path = METADATA.CORE.srcPath;
|
||||||
} else {
|
} else {
|
||||||
METADATA.CORE.path = '/monaco-editor/' + METADATA.CORE.path;
|
METADATA.CORE.path = '/monaco-editor/' + METADATA.CORE.path;
|
||||||
}
|
}
|
||||||
METADATA.PLUGINS.forEach(function(plugin) {
|
METADATA.PLUGINS.forEach(function(plugin) {
|
||||||
if (RUN_PLUGINS_FROM_SOURCE[plugin.name]) {
|
// should run the editor plugins from source? (or from node modules)
|
||||||
|
if (plugin.srcPath && getQueryStringValue(plugin.name) === 'dev') {
|
||||||
plugin.path = plugin.srcPath;
|
plugin.path = plugin.srcPath;
|
||||||
} else {
|
} else {
|
||||||
plugin.path = '/monaco-editor/' + plugin.path;
|
plugin.path = '/monaco-editor/' + plugin.path;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче