mirror of
https://github.com/danbulant/monaco-yaml
synced 2026-06-20 06:51:12 +00:00
Change build output from /release to /lib
This commit is contained in:
parent
93c36d2bd4
commit
638ded2cd2
6 changed files with 25 additions and 19 deletions
6
.gitignore
vendored
6
.gitignore
vendored
|
|
@ -1,3 +1,3 @@
|
|||
/node_modules/
|
||||
/out/
|
||||
/release/
|
||||
/node_modules/
|
||||
/out/
|
||||
/lib/
|
||||
|
|
|
|||
12
.vscode/settings.json
vendored
12
.vscode/settings.json
vendored
|
|
@ -1,11 +1,11 @@
|
|||
// Place your settings in this file to overwrite default and user settings.
|
||||
{
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/release": true,
|
||||
"**/out": true
|
||||
"files.trimTrailingWhitespace": true,
|
||||
"search.exclude": {
|
||||
"**/node_modules": true,
|
||||
"**/lib": true,
|
||||
"**/out": true
|
||||
},
|
||||
"javascript.preferences.quoteStyle": "single",
|
||||
"typescript.preferences.quoteStyle": "single"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
// Loading basic-languages to get the YAML language definition
|
||||
var paths = {
|
||||
'vs/basic-languages': '../node_modules/monaco-languages/release/dev',
|
||||
'vs/language/yaml': '../release/dev',
|
||||
'vs/language/yaml': '../lib/dev',
|
||||
vs: '../node_modules/monaco-editor-core/dev/vs',
|
||||
};
|
||||
if (document.location.protocol === 'http:') {
|
||||
|
|
@ -36,7 +36,7 @@
|
|||
let testIndex = document.location.pathname.indexOf('/test/');
|
||||
if (testIndex !== -1) {
|
||||
let prefix = document.location.pathname.substr(0, testIndex);
|
||||
paths['vs/language/yaml'] = prefix + '/release/dev';
|
||||
paths['vs/language/yaml'] = prefix + '/lib/dev';
|
||||
}
|
||||
}
|
||||
var require = {
|
||||
|
|
|
|||
12
package.json
12
package.json
|
|
@ -7,14 +7,20 @@
|
|||
"compile": "rimraf ./out && yarn compile:umd && yarn compile:esm",
|
||||
"compile:umd": "tsc -p ./src/tsconfig.json",
|
||||
"compile:esm": "tsc -p ./src/tsconfig.esm.json",
|
||||
"bundle": "rimraf ./release && yarn bundle:umd && yarn bundle:esm",
|
||||
"bundle:umd": "node ./scripts/bundle && mcopy ./src/monaco.d.ts ./release/monaco.d.ts",
|
||||
"bundle:esm": "node ./scripts/release",
|
||||
"bundle": "rimraf ./lib && yarn bundle:umd && yarn bundle:esm && mcopy ./src/monaco.d.ts ./lib/monaco.d.ts",
|
||||
"bundle:umd": "node ./scripts/bundle-umd",
|
||||
"bundle:esm": "node ./scripts/bundle-esm",
|
||||
"build": "yarn compile && yarn bundle",
|
||||
"prepublish": "yarn build",
|
||||
"lint": "prettier \"{src,test}/**/*.{json,scss,html,ts}\" --write",
|
||||
"test": "jest --verbose"
|
||||
},
|
||||
"main": "./lib/esm/monaco.contribution.js",
|
||||
"module": "./lib/esm/monaco.contribution.js",
|
||||
"typings": "./lib/monaco.d.ts",
|
||||
"directories": {
|
||||
"lib": "./lib"
|
||||
},
|
||||
"author": "Kevin Decker <kpdecker@gmail.com> (http://incaseofstairs.com)",
|
||||
"maintainers": [
|
||||
"kpdecker",
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ const REPO_ROOT = path.join(__dirname, "../");
|
|||
helpers.packageESM({
|
||||
repoRoot: REPO_ROOT,
|
||||
esmSource: "out/esm",
|
||||
esmDestination: "release/esm",
|
||||
esmDestination: "lib/esm",
|
||||
entryPoints: ["monaco.contribution.js", "yamlMode.js", "yaml.worker.js"],
|
||||
resolveAlias: {
|
||||
"vscode-nls": path.join(REPO_ROOT, "out/esm/fillers/vscode-nls.js")
|
||||
|
|
@ -28,7 +28,7 @@ function bundleOne(moduleId, exclude) {
|
|||
requirejs.optimize({
|
||||
baseUrl: 'out/amd/',
|
||||
name: 'vs/language/yaml/' + moduleId,
|
||||
out: 'release/dev/' + moduleId + '.js',
|
||||
out: 'lib/dev/' + moduleId + '.js',
|
||||
exclude: exclude,
|
||||
paths: {
|
||||
'vs/language/yaml': REPO_ROOT + '/out/amd'
|
||||
|
|
@ -62,8 +62,8 @@ function bundleOne(moduleId, exclude) {
|
|||
main: 'vscode-nls'
|
||||
}]
|
||||
}, function () {
|
||||
const devFilePath = path.join(REPO_ROOT, 'release/dev/' + moduleId + '.js');
|
||||
const minFilePath = path.join(REPO_ROOT, 'release/min/' + moduleId + '.js');
|
||||
const devFilePath = path.join(REPO_ROOT, 'lib/dev/' + moduleId + '.js');
|
||||
const minFilePath = path.join(REPO_ROOT, 'lib/min/' + moduleId + '.js');
|
||||
const fileContents = fs.readFileSync(devFilePath).toString();
|
||||
console.log();
|
||||
console.log(`Minifying ${devFilePath}...`);
|
||||
|
|
@ -73,7 +73,7 @@ function bundleOne(moduleId, exclude) {
|
|||
}
|
||||
});
|
||||
console.log(`Done.`);
|
||||
try { fs.mkdirSync(path.join(REPO_ROOT, 'release/min')) } catch (err) { }
|
||||
try { fs.mkdirSync(path.join(REPO_ROOT, 'lib/min')) } catch (err) { }
|
||||
fs.writeFileSync(minFilePath, BUNDLED_FILE_HEADER + result.code);
|
||||
})
|
||||
}
|
||||
Loading…
Reference in a new issue