Merge branch 'main' into patch-2
commit
bd6aa19f1f
@ -0,0 +1,70 @@
|
||||
###############################################################################################
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
###############################################################################################
|
||||
name: $(Date:yyyyMMdd)$(Rev:.r)
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
schedules:
|
||||
- cron: '0 7 * * *'
|
||||
displayName: Daily release
|
||||
branches:
|
||||
include:
|
||||
- main
|
||||
always: true
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: templates
|
||||
type: github
|
||||
name: microsoft/vscode-engineering
|
||||
ref: main
|
||||
endpoint: Monaco
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/npm-package/pipeline.yml@templates
|
||||
parameters:
|
||||
npmPackages:
|
||||
- name: monaco-editor-core
|
||||
workingDirectory: $(Build.SourcesDirectory)/dependencies/vscode/out-monaco-editor-core
|
||||
testPlatforms: []
|
||||
buildSteps:
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/monaco-editor-core-prepare nightly
|
||||
displayName: Setup, Build & Test monaco-editor-core
|
||||
|
||||
tag: next
|
||||
publishPackage: true
|
||||
publishRequiresApproval: false
|
||||
|
||||
- name: monaco-editor
|
||||
workingDirectory: $(Build.SourcesDirectory)/out/monaco-editor
|
||||
testPlatforms: []
|
||||
buildSteps:
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/monaco-editor-prepare nightly
|
||||
displayName: Setup, Build & Test monaco-editor
|
||||
|
||||
tag: next
|
||||
publishPackage: true
|
||||
publishRequiresApproval: false
|
||||
|
||||
postPublishSteps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
git config user.email "vscode@microsoft.com"
|
||||
git config user.name "VSCode"
|
||||
|
||||
git tag -a v$(SetPackageSpec.PACKAGE_VERSION) -m v$(SetPackageSpec.PACKAGE_VERSION)
|
||||
git push origin v$(SetPackageSpec.PACKAGE_VERSION)
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
@ -0,0 +1,90 @@
|
||||
###############################################################################################
|
||||
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
# Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
###############################################################################################
|
||||
name: $(Date:yyyyMMdd)$(Rev:.r)
|
||||
|
||||
trigger: none
|
||||
pr: none
|
||||
|
||||
resources:
|
||||
repositories:
|
||||
- repository: templates
|
||||
type: github
|
||||
name: microsoft/vscode-engineering
|
||||
ref: main
|
||||
endpoint: Monaco
|
||||
|
||||
parameters:
|
||||
- name: publishMonacoEditorCore
|
||||
displayName: 🚀 Publish Monaco Editor Core
|
||||
type: boolean
|
||||
default: false
|
||||
- name: publishMonacoEditor
|
||||
displayName: 🚀 Publish Editor Core
|
||||
type: boolean
|
||||
default: false
|
||||
- name: publishWebpackPlugin
|
||||
displayName: 🚀 Publish Webpack Plugin
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
extends:
|
||||
template: azure-pipelines/npm-package/pipeline.yml@templates
|
||||
parameters:
|
||||
npmPackages:
|
||||
- name: monaco-editor-core
|
||||
workingDirectory: $(Build.SourcesDirectory)/dependencies/vscode/out-monaco-editor-core
|
||||
testPlatforms: []
|
||||
buildSteps:
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/monaco-editor-core-prepare stable
|
||||
displayName: Setup, Build & Test monaco-editor-core
|
||||
|
||||
tag: latest
|
||||
publishPackage: ${{ parameters.publishMonacoEditorCore }}
|
||||
publishRequiresApproval: false
|
||||
|
||||
- name: monaco-editor
|
||||
workingDirectory: $(Build.SourcesDirectory)/out/monaco-editor
|
||||
testPlatforms: []
|
||||
buildSteps:
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: yarn ts-node ./scripts/ci/monaco-editor-prepare stable
|
||||
displayName: Setup, Build & Test monaco-editor
|
||||
|
||||
tag: latest
|
||||
publishPackage: ${{ parameters.publishMonacoEditor }}
|
||||
publishRequiresApproval: false
|
||||
|
||||
postPublishSteps:
|
||||
- checkout: self
|
||||
persistCredentials: true
|
||||
|
||||
- script: |
|
||||
set -e
|
||||
|
||||
git config user.email "vscode@microsoft.com"
|
||||
git config user.name "VSCode"
|
||||
|
||||
git tag -a v$(SetPackageSpec.PACKAGE_VERSION) -m v$(SetPackageSpec.PACKAGE_VERSION)
|
||||
git push origin v$(SetPackageSpec.PACKAGE_VERSION)
|
||||
workingDirectory: $(Build.SourcesDirectory)
|
||||
|
||||
- name: monaco-editor-webpack-plugin
|
||||
workingDirectory: $(Build.SourcesDirectory)/webpack-plugin
|
||||
testPlatforms: []
|
||||
buildSteps:
|
||||
- script: npm ci
|
||||
displayName: Install NPM dependencies
|
||||
|
||||
- script: npm run compile
|
||||
displayName: Build plugin
|
||||
|
||||
tag: latest
|
||||
publishPackage: ${{ parameters.publishWebpackPlugin }}
|
||||
publishRequiresApproval: false
|
@ -0,0 +1,8 @@
|
||||
{
|
||||
"image": "mcr.microsoft.com/devcontainers/typescript-node",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"extensions": ["ms-vscode.js-debug-nightly"]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,25 +0,0 @@
|
||||
name: PR Chat
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [opened, ready_for_review, closed]
|
||||
|
||||
jobs:
|
||||
main:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ !github.event.pull_request.draft }}
|
||||
steps:
|
||||
- name: Checkout Actions
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/vscode-github-triage-actions'
|
||||
ref: stable
|
||||
path: ./actions
|
||||
- name: Install Actions
|
||||
run: npm install --production --prefix ./actions
|
||||
- name: Run Code Review Chat
|
||||
uses: ./actions/code-review-chat
|
||||
with:
|
||||
token: ${{secrets.GITHUB_TOKEN}}
|
||||
slack_token: ${{ secrets.SLACK_TOKEN }}
|
||||
slack_bot_name: 'VSCodeBot'
|
||||
notification_channel: codereview
|
@ -1,14 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
COMMITTER_USER_NAME="$(git log --format='%an' -1)"
|
||||
COMMITTER_EMAIL="$(git log --format='%ae' -1)"
|
||||
|
||||
cd ../monaco-editor-website
|
||||
git init
|
||||
git config user.name "${COMMITTER_USER_NAME}"
|
||||
git config user.email "${COMMITTER_EMAIL}"
|
||||
git remote add origin "https://x-access-token:${GITHUB_TOKEN}@github.com/microsoft/monaco-editor.git"
|
||||
git checkout -b gh-pages
|
||||
git add .
|
||||
git commit -m "Publish website"
|
||||
git push origin gh-pages --force
|
@ -1,235 +0,0 @@
|
||||
name: Publish to npm
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 7 * * *'
|
||||
# enable users to manually trigger with workflow_dispatch
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
nightly:
|
||||
description: 'is nightly?'
|
||||
required: true
|
||||
default: 'true'
|
||||
jobs:
|
||||
publish:
|
||||
if: ${{ github.repository == 'microsoft/monaco-editor' }}
|
||||
name: Publish to npm
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: (monaco-editor) checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/monaco-editor'
|
||||
path: './monaco-editor'
|
||||
|
||||
- name: Compute state
|
||||
id: state
|
||||
run: |
|
||||
echo '::echo::on'
|
||||
node ./monaco-editor/.github/workflows/publish/computeState.js "${{github.event_name}}" "${{github.event.inputs.nightly}}"
|
||||
# outputs: dist_tag, version, vscode_branch, skip_monaco_editor_core, skip_monaco_editor
|
||||
|
||||
- name: (vscode) checkout
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/vscode'
|
||||
ref: ${{ steps.state.outputs.vscode_branch }}
|
||||
path: './vscode'
|
||||
|
||||
- name: (vscode-loc) checkout
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
repository: 'microsoft/vscode-loc'
|
||||
path: './vscode-loc'
|
||||
|
||||
- name: (vscode) execute `yarn`
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
|
||||
- name: (vscode) Download Playwright
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: ./vscode
|
||||
run: yarn playwright-install
|
||||
|
||||
- name: (vscode) Run Hygiene Checks
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn gulp hygiene
|
||||
|
||||
- name: (vscode) Run Valid Layers Checks
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn valid-layers-check
|
||||
|
||||
- name: (vscode) Compile /build/
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn --cwd build compile
|
||||
|
||||
- name: (vscode) Run eslint
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn eslint
|
||||
|
||||
- name: (vscode) Run Monaco Editor Checks
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn monaco-compile-check
|
||||
|
||||
- name: (vscode) Compile
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn --max_old_space_size=4095 compile
|
||||
|
||||
- name: (vscode) Run Unit Tests (Browser)
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn test-browser --browser chromium
|
||||
|
||||
- name: (vscode) Patch package.json version
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
run: node ./monaco-editor/.github/workflows/publish/setVersion.js ./vscode/build/monaco/package.json ${{ steps.state.outputs.version }}
|
||||
|
||||
- name: (vscode) Editor Distro
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: yarn gulp editor-distro
|
||||
|
||||
- name: Editor ESM sources check
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode/test/monaco'
|
||||
run: yarn run esm-check
|
||||
|
||||
- name: (vscode) Typings validation prep
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode'
|
||||
run: mkdir typings-test
|
||||
|
||||
- name: (vscode) Typings validation
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: ./vscode/typings-test
|
||||
run: |
|
||||
yarn init -yp
|
||||
../node_modules/.bin/tsc --init
|
||||
echo "import '../out-monaco-editor-core';" > a.ts
|
||||
../node_modules/.bin/tsc --noEmit
|
||||
|
||||
- name: (vscode) Package Editor with Webpack
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: ./vscode/test/monaco
|
||||
run: yarn run bundle-webpack
|
||||
|
||||
- name: (vscode) Compile Editor Tests
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: ./vscode/test/monaco
|
||||
run: yarn run compile
|
||||
|
||||
- name: (vscode) Run Editor Tests
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
timeout-minutes: 5
|
||||
working-directory: ./vscode/test/monaco
|
||||
run: yarn test
|
||||
|
||||
- name: Set `npm` config
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Publish `monaco-editor-core`
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
working-directory: './vscode/out-monaco-editor-core'
|
||||
run: npm publish --tag ${{ steps.state.outputs.dist_tag }}
|
||||
|
||||
- name: Delete `npm` config
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor_core == 'false' }}
|
||||
run: npm config delete //registry.npmjs.org/:_authToken
|
||||
|
||||
- name: (monaco-editor) Patch package.json version
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
run: node ./monaco-editor/.github/workflows/publish/setVersion.js ./monaco-editor/package.json ${{ steps.state.outputs.version }}
|
||||
|
||||
- name: (monaco-editor) execute `npm ci` (1)
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm ci
|
||||
|
||||
- name: (monaco-editor) execute `npm ci` (2)
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor/webpack-plugin'
|
||||
run: npm ci
|
||||
|
||||
- name: (monaco-editor) Patch package.json monaco-editor-core dev dependency version
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
run: node ./monaco-editor/.github/workflows/publish/setDevDependencyVersion.js ./monaco-editor/package.json monaco-editor-core ${{ steps.state.outputs.version }}
|
||||
|
||||
- name: (monaco-editor) execute `npm install` to pick up local monaco-editor-core
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm install
|
||||
|
||||
- name: (monaco-editor) Install OS Dependencies for Playwright
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: sudo npm run playwright-install-deps
|
||||
|
||||
- name: (monaco-editor) Check prettier
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm run prettier-check
|
||||
|
||||
- name: (monaco-editor) Build
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm run release
|
||||
|
||||
- name: (monaco-editor) Run unit tests
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm test
|
||||
|
||||
- name: (monaco-editor) Compile webpack plugin
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm run compile --prefix webpack-plugin
|
||||
|
||||
- name: (monaco-editor) Package using webpack plugin
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm run package-for-smoketest --prefix webpack-plugin
|
||||
|
||||
- name: (monaco-editor) Run smoke test
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm run smoketest
|
||||
|
||||
- name: (monaco-editor) Build website
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor'
|
||||
run: npm run build-website
|
||||
|
||||
- name: Set `npm` config
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
run: npm config set //registry.npmjs.org/:_authToken ${NPM_TOKEN}
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
|
||||
- name: Publish `monaco-editor`
|
||||
if: ${{ steps.state.outputs.skip_monaco_editor == 'false' }}
|
||||
working-directory: './monaco-editor/release'
|
||||
run: npm publish --tag ${{ steps.state.outputs.dist_tag }}
|
||||
|
||||
- name: Create Issue On Failure
|
||||
if: failure()
|
||||
uses: JasonEtco/create-an-issue@9e6213aec58987fa7d2f4deb8b256b99e63107a2
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
filename: ./monaco-editor/.github/publish-failure-issue-template.md
|
@ -1,19 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
if (process.argv.length !== 5) {
|
||||
console.error(
|
||||
`usage: node setDevDependencyVersion.js <PATH_TO_PACKAGE_JSON_FILE> <PACKAGE> <VERSION>`
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const packagejson = JSON.parse(fs.readFileSync(process.argv[2]).toString());
|
||||
packagejson['devDependencies'][process.argv[3]] = process.argv[4];
|
||||
fs.writeFileSync(process.argv[2], JSON.stringify(packagejson, null, '\t') + '\n');
|
@ -1,17 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
const fs = require('fs');
|
||||
|
||||
if (process.argv.length !== 4) {
|
||||
console.error(`usage: node setVersion.js <PATH_TO_PACKAGE_JSON_FILE> <VERSION>`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const packagejson = JSON.parse(fs.readFileSync(process.argv[2]).toString());
|
||||
packagejson.version = process.argv[3];
|
||||
fs.writeFileSync(process.argv[2], JSON.stringify(packagejson, null, '\t') + '\n');
|
@ -1,4 +1,8 @@
|
||||
**/node_modules/
|
||||
**/out/
|
||||
**/release/
|
||||
**/dependencies/
|
||||
/test/manual/generated/**
|
||||
/test/smoke/vite/dist/**
|
||||
/test/smoke/parcel/dist/**
|
||||
/test/smoke/parcel/.cache/**
|
||||
**/dist/
|
||||
**/out/
|
||||
|
@ -0,0 +1,30 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "Launch Http Server",
|
||||
"type": "shell",
|
||||
"command": "node_modules/.bin/http-server --cors --port 5002 -a 127.0.0.1 -c-1",
|
||||
"isBackground": true,
|
||||
"problemMatcher": {
|
||||
"pattern": {
|
||||
"regexp": "does not support problems"
|
||||
},
|
||||
"background": {
|
||||
"activeOnStart": true,
|
||||
"beginsPattern": "Shutting down http-server (will never match)",
|
||||
"endsPattern": "Starting up http-server"
|
||||
}
|
||||
},
|
||||
"dependsOn": ["npm: watch"]
|
||||
},
|
||||
{
|
||||
"type": "npm",
|
||||
"script": "watch",
|
||||
"group": "build",
|
||||
"problemMatcher": ["$tsc-watch"],
|
||||
"isBackground": true,
|
||||
"label": "npm: watch"
|
||||
}
|
||||
]
|
||||
}
|
@ -0,0 +1,53 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as glob from 'glob';
|
||||
import * as path from 'path';
|
||||
import { REPO_ROOT } from './utils';
|
||||
|
||||
checkEveryMonacoLanguageHasASample();
|
||||
|
||||
function checkEveryMonacoLanguageHasASample() {
|
||||
let languages = glob
|
||||
.sync('src/basic-languages/*/*.contribution.ts', { cwd: REPO_ROOT })
|
||||
.map((f) => path.dirname(f))
|
||||
.map((f) => f.substring('src/basic-languages/'.length));
|
||||
languages.push('css');
|
||||
languages.push('html');
|
||||
languages.push('json');
|
||||
languages.push('typescript');
|
||||
|
||||
// some languages have a different id than their folder
|
||||
languages = languages.map((l) => {
|
||||
switch (l) {
|
||||
case 'coffee':
|
||||
return 'coffeescript';
|
||||
case 'protobuf':
|
||||
return 'proto';
|
||||
case 'solidity':
|
||||
return 'sol';
|
||||
case 'sophia':
|
||||
return 'aes';
|
||||
default:
|
||||
return l;
|
||||
}
|
||||
});
|
||||
|
||||
let fail = false;
|
||||
for (const language of languages) {
|
||||
const expectedSamplePath = path.join(
|
||||
REPO_ROOT,
|
||||
`website/src/website/data/home-samples/sample.${language}.txt`
|
||||
);
|
||||
if (!fs.existsSync(expectedSamplePath)) {
|
||||
console.error(`Missing sample for ${language} at ${expectedSamplePath}`);
|
||||
fail = true;
|
||||
}
|
||||
}
|
||||
if (fail) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
@ -1,7 +1,8 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"noEmit": true,
|
||||
"module": "CommonJS",
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": ["./**/*"]
|
||||
"include": ["./**/*"]
|
||||
}
|
||||
|
@ -1,163 +0,0 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import glob = require('glob');
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import cp = require('child_process');
|
||||
import CleanCSS from 'clean-css';
|
||||
import { REPO_ROOT, readFiles, writeFiles } from './utils';
|
||||
import { removeDir } from './fs';
|
||||
|
||||
const MONACO_EDITOR_VERSION: string = (() => {
|
||||
const output = cp.execSync(`npm show monaco-editor version`).toString();
|
||||
const version = output.split(/\r\n|\r|\n/g)[0];
|
||||
if (!/\d+\.\d+\.\d+/.test(version)) {
|
||||
console.log('unrecognized package.json version: ' + version);
|
||||
process.exit(1);
|
||||
}
|
||||
return version;
|
||||
})();
|
||||
|
||||
removeDir(`../monaco-editor-website`);
|
||||
checkSamples();
|
||||
generateWebsite();
|
||||
|
||||
/**
|
||||
* Check that there are samples for all available languages
|
||||
*/
|
||||
function checkSamples() {
|
||||
let languages = glob
|
||||
.sync('src/basic-languages/*/*.contribution.ts', { cwd: REPO_ROOT })
|
||||
.map((f) => path.dirname(f))
|
||||
.map((f) => f.substring('src/basic-languages/'.length));
|
||||
languages.push('css');
|
||||
languages.push('html');
|
||||
languages.push('json');
|
||||
languages.push('typescript');
|
||||
|
||||
// some languages have a different id than their folder
|
||||
languages = languages.map((l) => {
|
||||
switch (l) {
|
||||
case 'coffee':
|
||||
return 'coffeescript';
|
||||
case 'protobuf':
|
||||
return 'proto';
|
||||
case 'solidity':
|
||||
return 'sol';
|
||||
case 'sophia':
|
||||
return 'aes';
|
||||
default:
|
||||
return l;
|
||||
}
|
||||
});
|
||||
|
||||
let fail = false;
|
||||
for (const language of languages) {
|
||||
const expectedSamplePath = path.join(REPO_ROOT, `website/index/samples/sample.${language}.txt`);
|
||||
if (!fs.existsSync(expectedSamplePath)) {
|
||||
console.error(`Missing sample for ${language} at ${expectedSamplePath}`);
|
||||
fail = true;
|
||||
}
|
||||
}
|
||||
if (fail) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
function replaceWithRelativeResource(
|
||||
dataPath: string,
|
||||
contents: string,
|
||||
regex: RegExp,
|
||||
callback: (match: string, fileContents: Buffer) => string
|
||||
): string {
|
||||
return contents.replace(regex, function (_, m0) {
|
||||
const filePath = path.join(REPO_ROOT, 'website', path.dirname(dataPath), m0);
|
||||
return callback(m0, fs.readFileSync(filePath));
|
||||
});
|
||||
}
|
||||
|
||||
function generateWebsite() {
|
||||
const files = readFiles('website/**/*', {
|
||||
base: 'website',
|
||||
ignore: ['website/typedoc/**/*'],
|
||||
dot: true
|
||||
});
|
||||
|
||||
for (const file of files) {
|
||||
if (!file.contents || !/\.(html)$/.test(file.path) || /new-samples/.test(file.path)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let contents = file.contents.toString();
|
||||
contents = contents.replace(/\.\.\/release\/dev/g, 'node_modules/monaco-editor/min');
|
||||
// contents = contents.replace(/\.\.\/\.\.\/release\/dev/g, '../monaco-editor/release/dev');
|
||||
contents = contents.replace(/{{version}}/g, MONACO_EDITOR_VERSION);
|
||||
contents = contents.replace(/{{year}}/g, String(new Date().getFullYear()));
|
||||
|
||||
// Preload xhr contents
|
||||
contents = replaceWithRelativeResource(
|
||||
file.path,
|
||||
contents,
|
||||
/<pre data-preload="([^"]+)".*/g,
|
||||
function (m0, fileContents) {
|
||||
return (
|
||||
'<pre data-preload="' +
|
||||
m0 +
|
||||
'" style="display:none">' +
|
||||
fileContents
|
||||
.toString('utf8')
|
||||
.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>') +
|
||||
'</pre>'
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
// Inline fork.png
|
||||
contents = replaceWithRelativeResource(
|
||||
file.path,
|
||||
contents,
|
||||
/src="(\.\/fork.png)"/g,
|
||||
function (m0, fileContents) {
|
||||
return 'src="data:image/png;base64,' + fileContents.toString('base64') + '"';
|
||||
}
|
||||
);
|
||||
|
||||
// let allCSS = '';
|
||||
contents = replaceWithRelativeResource(
|
||||
file.path,
|
||||
contents,
|
||||
/<link data-inline="yes-please" href="([^"]+)".*/g,
|
||||
function (m0, fileContents) {
|
||||
const minifiedCSS = (new CleanCSS() as any).minify(fileContents.toString('utf8')).styles;
|
||||
return `<style>${minifiedCSS}</style>`;
|
||||
}
|
||||
);
|
||||
|
||||
// Inline javascript
|
||||
contents = replaceWithRelativeResource(
|
||||
file.path,
|
||||
contents,
|
||||
/<script data-inline="yes-please" src="([^"]+)".*/g,
|
||||
function (m0, fileContents) {
|
||||
return '<script>' + fileContents.toString('utf8') + '</script>';
|
||||
}
|
||||
);
|
||||
|
||||
file.contents = Buffer.from(contents.split(/\r\n|\r|\n/).join('\n'));
|
||||
}
|
||||
|
||||
writeFiles(files, `../monaco-editor-website`);
|
||||
|
||||
// temporarily create package.json so that npm install doesn't bark
|
||||
fs.writeFileSync(path.join(REPO_ROOT, '../monaco-editor-website/package.json'), '{}');
|
||||
fs.writeFileSync(path.join(REPO_ROOT, '../monaco-editor-website/.nojekyll'), '');
|
||||
cp.execSync('npm install monaco-editor', {
|
||||
cwd: path.join(REPO_ROOT, '../monaco-editor-website')
|
||||
});
|
||||
fs.unlinkSync(path.join(REPO_ROOT, '../monaco-editor-website/package.json'));
|
||||
}
|
@ -0,0 +1,275 @@
|
||||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="601px" height="391px" viewBox="-0.5 -0.5 601 391" content="<mxfile><diagram id="cU4r2CM7fKKh95v30pN0" name="Page-1">1Vpdk9osFP41XrqThBj1sqvd9qKd6XTfmbaXmKChjSED8au//j0kkA+IdtXo7t6sgcAJPOechwfYAZqt9584zuKvLCLJwHOi/QDNB57nOhMHfmTNoayZ+KpixWmkGtUVz/Qv0T1V7YZGRLQa5owlOc3alSFLUxLmrTrMOdu1my1Z0v5qhlfEqngOcWLX/qBRHqtZeOO6/jOhq1h/2Q2m5Zs11o3VTESMI7ZrVKGPAzTjjOXl03o/I4kET+NS9ns68rYaGCdp/pIOHlLjyA96ciSCuapiylL4eYzzdQIlFx7JnuY/4dl5GKnSr8abuXSxowsHXUhzfmh0ksVfzXd1t6Kk+5VDk+M5OjtVJdiGh7pVoCIC8xXRzcYVthCUhK0JfAfacJLgnG7b9rGKjlXVrgYQHhSG3Xgir7SxxclGWf3G2bYIVxhSTOrByrjjneh/wQtImBbsOKGrFJ5DmDnhULElPKcQkR/UizWNImnjkRNB/+JFYU+CmDGa5sWMRo+D0byCVRog+0FHuqjOdZA2AS8DxkZSWXIeIJnLXiq3FSAvRlqZ/iaHXdsdul7L6tD32ybYcinA26arqhG+yHs6dBre+0Tzz5sF1H0nGRM0Z3KUQQJoPC7Ae8FKPq1pyJlgS/j+01aEwHeWX3cxzclzhoso3QEttv171CdWsB+F3tXuUhAFU1Xe1RTlauaNG/QUONfHvTu2kEuzdTH+8I9kUxszluKQDUkkMR2GjJ+N2ZImyYwlkEQVUZlZkbPsNuBWK9a/wHWdPtCdXh+XLbzPhbob1w4H9AA1mvw7jpHfBbXbA9TazxcG8ivkPZq28XIdryM2gxslPhrdV0B4ZykIkkYfpN6TK2eChaBhWflEk7YHzhUZlexsiIyGgLtMZBRdYbz40Gig1u+jK6M/NphpZCg+sz0y2k8cw9/lCC5dQ5G9EjQUUILT1aZII2dJcL7htSASdmrRNEw2EU1X0Oi/QwYSnNMM5jKTgSxDqngKhSgffguW2kZwGsE7BtqLi85Yfctyq0yvE3ILTYO2MlLGr9VbuovWW1p/9aq39EcasfIEezHCbS+CKcHDV6DXkdPOl3HXyu90sOuoj9XIv5RdG9xaM203u0ZYxCTSBm7GmF4f7GgFanUmoOnM1FslQ6te10WrrcLmRAAlLSSJxYCZPIaAP4sNTaJ3RzVlrJ2gGteZGJsw1AvXGNJ6aBjoh2nsffkppinWGXu1uL+Yuy/bjC9lGyXLzhVz47PE3J14SgnaXo+PLlJ2gdbWmtrMszwzjwLnVPvrlZ29NZqTLVTMSQbIkzQ8vD/SO+LZivTGAGubnrx+SK9tdHIDzkPBxel8h2y+awK/ztYsMBMSnU7gkaFlpqjnBJ5YCaxONR7KrdM7S94ywE9tjnyt2Qxtce3uqG01GN9CsYxsxUKTjvMnMHTSi7cXLYH7iqIF3fkG640cQKE3cwBl7sCm0/MOoIz217OcbyWOdQVXXjc4+sy2PoF6bwx4+jZu6Dw4vtvrfdxNBYt9HCRimmUg+o+76A4Xa+aJadfFWtf5un8+vUGxvvwvIaz/hQJ9/B8=</diagram></mxfile>">
|
||||
<defs/>
|
||||
<g>
|
||||
<path d="M 90 60 L 90 143.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 90 148.88 L 86.5 141.88 L 90 143.63 L 93.5 141.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 74px; margin-left: 80px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Provides the source for
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="80" y="77" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Provides the source for
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="0" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 30px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
GitHub Repository
|
||||
<br/>
|
||||
microsoft/vscode
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="90" y="34" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
GitHub Repository...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="150" width="180" height="100" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 157px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor-core
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="90" y="169" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="260" y="0" width="340" height="110" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 338px; height: 1px; padding-top: 7px; margin-left: 261px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
GitHub Repository
|
||||
<br/>
|
||||
microsoft/monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="430" y="19" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
GitHub Repository...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="270" y="330" width="160" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 360px; margin-left: 271px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="364" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 430 100 L 358 154 Q 350 160 342 166 L 318 184 Q 310 190 310 200 L 310 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 310 328.88 L 306.5 321.88 L 310 323.63 L 313.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 231px; margin-left: 290px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Provides language feature sources
|
||||
<br/>
|
||||
including TypeScript, html, css, json
|
||||
<br/>
|
||||
and others
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="290" y="234" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Provides language feature sources...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="380" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 381px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
Folder
|
||||
<br/>
|
||||
/src
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="430" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Folder...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 270 75 L 96.25 108.78" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/>
|
||||
<path d="M 91.1 109.79 L 97.3 105.01 L 96.25 108.78 L 98.64 111.89 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 91px; margin-left: 190px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Describe how to build
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="190" y="94" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Describe how to build
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="270" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 271px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
Folder
|
||||
<br/>
|
||||
/scripts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="320" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
Folder...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 515 100 L 515 120 Q 515 130 505 130 L 150 130 Q 140 130 138.27 136.91 L 136.54 143.82" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" stroke-dasharray="3 3" pointer-events="stroke"/>
|
||||
<path d="M 135.27 148.92 L 133.57 141.28 L 136.54 143.82 L 140.36 142.97 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 120px; margin-left: 181px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Dev Dependency
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="181" y="124" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Dev Dependency
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 540 100 L 540 130 Q 540 140 531.68 145.55 L 398.32 234.45 Q 390 240 390 250 L 390 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 390 328.88 L 386.5 321.88 L 390 323.63 L 393.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 300px; margin-left: 391px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
package.json
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="391" y="303" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
package.json
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="490" y="50" width="100" height="50" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 98px; height: 1px; padding-top: 75px; margin-left: 491px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
File
|
||||
<br/>
|
||||
/package.json
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="540" y="79" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
File...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 90 240 L 90 290 Q 90 300 100 300 L 300 300 Q 310 300 310 310 L 310 323.63" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 310 328.88 L 306.5 321.88 L 310 323.63 L 313.5 321.88 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 290px; margin-left: 179px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
Provides the core editor sources
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="179" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
Provides the core editor sources
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="10" y="200" width="160" height="40" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 158px; height: 1px; padding-top: 220px; margin-left: 11px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
shipped sources
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="90" y="224" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
shipped sources
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Text is not SVG - cannot display
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
After Width: | Height: | Size: 23 KiB |
Binary file not shown.
After Width: | Height: | Size: 249 KiB |
Binary file not shown.
After Width: | Height: | Size: 200 KiB |
Binary file not shown.
After Width: | Height: | Size: 10 KiB |
@ -0,0 +1,347 @@
|
||||
<svg host="65bd71144e" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" width="772px" height="562px" viewBox="-0.5 -0.5 772 562" content="<mxfile><diagram id="cU4r2CM7fKKh95v30pN0" name="Page-1">7Vvdc9o4EP9rmLnrDIzlL+AxIaV9aG4yk4e7PgosQFfb4mQRoH/9SZZkbEmEj5hAp3lprJW0lnb399NqTTvBKNt8oXC5eCQJSju+l2w6wUPH96Owz/8Vgq0UxEAJ5hQnUgR2gmf8Eymhp6QrnKCiMZARkjK8bAqnJM/RlDVkkFKybg6bkbT51iWcI0vwPIWpLf0bJ2whpQO/v5N/RXi+0G8G8VD2ZFAPVjspFjAh65oo+NwJRpQQJp+yzQilwnbaLnLeeE9vtTCKcnbMhFAt7AWmK7W5fJmVKqY/hBX8OOWK7ieUP83FU0ZyOCVdlGBGqNoE22rLrBeYoWc+WbTX3Pl8xoJlKW8B/viCKMPcjncpnudcxogYMMNpOiIpVxc85CTnU+/tfaitCQ1oUxOpfX1BJEOMbvmQjQ6qSE5RQQYiZfP1zmV+oMYsau7yh2ogVGEyr3TvLMkflDHLJpn8KwLN91I4QamcJpVoS/u1xSon1OyGEh5gqqlMUDMb2mD2T+35O3/2epFqPYgNe7qx1Y2cr1hM6no9zwNaIqcG/VALdrPLVmP6E6KY7xxRJdzrlYKs6FRtRYGAQTpHatRAisQmX/UcRSlk+KWJMpcX1NQngnO283jlOO1x05FyTWqW4ctqGS738qbysBtGgYUiVkwtcIj9f5PxUfcuVGCYcqsKU1soyXCSCB33FBX4J5yU+oQ/lmIn5d6i+0704PSQvwc3FTsqfQ0CcuGJx5Ef+oov3ugpDU09g8xmBTrRJzaXWU5AxWSFObf73ufnR6c7TsVc/0jQeU28RQfQdi6whkcCS5mdM0EVEKd58I5SuK0NUJG3H4pxE4q+FzXPoQPjA+AZ0SBXYMxuNX6iMyOkFhXfa123ESEAXIR7T40H0Df8O3zFv2f4Ln4F+3ePD7dBxVFbVOz1wjBqZjdRK7ysCUUp7V6CpvuWq/iMgtrH5YFcci8ijk8RB0a+ENsZItCZej1DjNtKEMdkxWXjFObzFc+2OYDGMEu6VfKgbTaobcNOHm8o6Q78wyb1XSYdnG7SQ0lZOGjlyL/iiT+0+TxoPZfeY13LnPZN0Rm/k1XOGZLz7hgVmeUASng3SpQRXIF7gSCsgutQEJ6Ba/sK7lmb/sWiTqcMjTQivFbY6dUcH3eCQTv9+wS9dHyu3stw3unbKcBVQjE4lg9bCUX/Vw/F8F1C8ayMNjIy2ujADccc33YGDOwaxCmVvO6UUGSFyw1lFkauFoaOXK3vABII20CSXVuoSMgoiI5vhXri6DD1gMGFqEenKccY7Gp5gmkhV55wMQuF18wT/FbYOXDkp/rTzqVrvZFR67VKintqvW+lef2eM2nbdQ381Et6cgk1/AxrSzr5xtcCNip+rQp4NjaGDmgEb77HOW/Kfb6ncUWrQkGNWStIgSsbDRjZXjh8L6PZ9HJuNfN2cr/AZpf2b7/nkYJBPlF4IPczxr9a3T6PRKpDtAqA4MbAEAXXA4Oz5ujORmS7RslXz0oczHuxrES/u2EpwwrFAi7F43RF0+095dcLAU+nOWoRtbOdaM1SvPyqnssofiIFZpiIWwSVW6puF9+M/qoGr6v1KZrVx9u1esKgmtsdCs8V8hclkqhacFkUhw2XxcDymOuOXyHkTR5z1UfkVS/BLw3Pxf+tSHkF5C6bl/7gt77ynnYnKHM++cMXXxXECVt/+LM0kjcjOevOYIbTrZzAFcJMeFmpHcFiChMMedeIJMjslvpGJC9IyjesDnJDBed/jDgMvb/Q2q2A45MUZZS1rW+3SxkfYo8ALDeyI8U56mrvlV1D1RVX+uS9Wpufa82d9t/3DlMRK7p5aUivVxa4ys9Z8m/XoC35RvEhpXxpcyEidRKhoKUGnnmQs8t9BoMrRhTehOqCUfIDGeUBR8VA2EiLEjSDq1RbTv0cDLSW6IIGdge+jd2onWPKxq7/m7Kt4xOo5cS9HvONA/Jd2dZVCPpg2yuyrSxy0pWgWkWRvwfrvQ1DoIkhV+ULXIr1IgeGPljv0DlleKwLov5RvBcGcQs+s39g88F7t8V7e1PCDxbch6kANO9tvs2C1e377SWK3a/6ZYln918jgs//Aw==</diagram></mxfile>">
|
||||
<defs/>
|
||||
<g>
|
||||
<rect x="535" y="130" width="235" height="290" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 233px; height: 1px; padding-top: 137px; margin-left: 536px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="653" y="149" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 120 170 L 233.41 169.92" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 238.66 169.92 L 231.66 173.43 L 233.41 169.92 L 231.66 166.43 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 170px; margin-left: 180px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
tsc
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="180" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
tsc
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 120 185 L 170 185 Q 180 185 180 195 L 180 280 Q 180 290 190 290 L 233.63 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 238.88 290 L 231.88 293.5 L 233.63 290 L 231.88 286.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 240px; margin-left: 180px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
esbuild ESM
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="180" y="243" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
esbuild ESM
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 90 200 L 90 360 Q 90 370 100 370 L 233.63 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 238.88 370 L 231.88 373.5 L 233.63 370 L 231.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 360px; margin-left: 181px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; background-color: rgb(255, 255, 255); white-space: nowrap;">
|
||||
esbuild AMD
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="181" y="364" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
esbuild AMD
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="0" y="140" width="120" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 118px; height: 1px; padding-top: 170px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/src
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="60" y="174" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/src
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="240" y="140" width="220" height="80" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 147px; margin-left: 241px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/languages/amd-tsc
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="159" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/languages/amd-tsc
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 460 290 L 563.63 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 290 L 561.88 293.5 L 563.63 290 L 561.88 286.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="240" y="260" width="220" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 290px; margin-left: 241px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/languages/bundled/esm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/languages/bundled/esm
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 460 370 L 563.63 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 370 L 561.88 373.5 L 563.63 370 L 561.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="240" y="340" width="220" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 218px; height: 1px; padding-top: 370px; margin-left: 241px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/languages/bundled/amd-{dev, min}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="350" y="374" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/languages/bundled/amd-{dev, min}
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 130 485 L 480 485 Q 490 485 490 475 L 490 380 Q 490 370 500 370 L 563.63 370" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 370 L 561.88 373.5 L 563.63 370 L 561.88 366.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="0" y="420" width="170" height="140" fill="none" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe flex-start; justify-content: unsafe center; width: 168px; height: 1px; padding-top: 427px; margin-left: 1px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
npm package
|
||||
<br/>
|
||||
monaco-editor-core
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="85" y="439" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
npm package...
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="570" y="340" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 370px; margin-left: 571px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/monaco-editor/{dev, min}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="660" y="374" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/monaco-editor/{dev, min}
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="570" y="260" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 290px; margin-left: 571px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/monaco-editor/esm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="660" y="294" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/monaco-editor/esm
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 450 195 L 480 195 Q 490 195 500 195 L 563.63 195" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 195 L 561.88 198.5 L 563.63 195 L 561.88 191.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="360" y="180" width="90" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 195px; margin-left: 361px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
*.d.ts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="405" y="199" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
*.d.ts
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="40" y="470" width="90" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 485px; margin-left: 41px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
{/dev, /min}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="85" y="489" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
{/dev, /min}
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 130 525 L 500 525 Q 510 525 510 515 L 510 300 Q 510 290 520 290 L 563.63 290" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="stroke"/>
|
||||
<path d="M 568.88 290 L 561.88 293.5 L 563.63 290 L 561.88 286.5 Z" fill="rgb(0, 0, 0)" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
|
||||
<rect x="40" y="510" width="90" height="30" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 88px; height: 1px; padding-top: 525px; margin-left: 41px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
esm
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="85" y="529" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
esm
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<rect x="570" y="180" width="180" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 178px; height: 1px; padding-top: 210px; margin-left: 571px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: normal; overflow-wrap: normal;">
|
||||
/out/monaco-editor/monaco.d.ts
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="660" y="214" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="12px" text-anchor="middle">
|
||||
/out/monaco-editor/monaco.d.ts
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 504 41 L 499 41 Q 494 41 494 51 L 494 91 Q 494 101 489 101 L 486.5 101 Q 484 101 489 101 L 491.5 101 Q 494 101 494 111 L 494 151 Q 494 161 499 161 L 504 161" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" transform="translate(494,0)scale(-1,1)translate(-494,0)rotate(90,494,101)" pointer-events="all"/>
|
||||
<rect x="361" y="62" width="250" height="30" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 77px; margin-left: 486px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">
|
||||
<div style="background-color: rgb(255, 255, 255); font-family: "Cascadia Code", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 11px; line-height: 19px;">
|
||||
<span style="font-size: 11px;">
|
||||
ts-node ./build/build-monaco-editor
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="486" y="80" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
ts-node ./build/build-monaco-editor
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 190 41 L 185 41 Q 180 41 180 51 L 180 91 Q 180 101 175 101 L 172.5 101 Q 170 101 175 101 L 177.5 101 Q 180 101 180 111 L 180 151 Q 180 161 185 161 L 190 161" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" transform="translate(180,0)scale(-1,1)translate(-180,0)rotate(90,180,101)" pointer-events="all"/>
|
||||
<rect x="130" y="60" width="110" height="30" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 75px; margin-left: 185px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">
|
||||
<div style="background-color: rgb(255, 255, 255); font-family: "Cascadia Code", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 11px; line-height: 19px;">
|
||||
npm run build
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="185" y="78" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
npm run build
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
<path d="M 350 -177 L 345 -177 Q 340 -177 340 -167 L 340 31 Q 340 41 335 41 L 332.5 41 Q 330 41 335 41 L 337.5 41 Q 340 41 340 51 L 340 249 Q 340 259 345 259 L 350 259" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" transform="translate(340,0)scale(-1,1)translate(-340,0)rotate(90,340,41)" pointer-events="all"/>
|
||||
<rect x="234" y="0" width="200" height="30" fill="none" stroke="none" pointer-events="all"/>
|
||||
<g transform="translate(-0.5 -0.5)">
|
||||
<switch>
|
||||
<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility" style="overflow: visible; text-align: left;">
|
||||
<div xmlns="http://www.w3.org/1999/xhtml" style="display: flex; align-items: unsafe center; justify-content: unsafe center; width: 1px; height: 1px; padding-top: 15px; margin-left: 334px;">
|
||||
<div data-drawio-colors="color: rgb(0, 0, 0); " style="box-sizing: border-box; font-size: 0px; text-align: center;">
|
||||
<div style="display: inline-block; font-size: 11px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space: nowrap;">
|
||||
<div style="background-color: rgb(255, 255, 255); font-family: "Cascadia Code", Consolas, "Courier New", monospace, Consolas, "Courier New", monospace; font-size: 11px; line-height: 19px;">
|
||||
npm run build-monaco-editor
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</foreignObject>
|
||||
<text x="334" y="18" fill="rgb(0, 0, 0)" font-family="Helvetica" font-size="11px" text-anchor="middle">
|
||||
npm run build-monaco-editor
|
||||
</text>
|
||||
</switch>
|
||||
</g>
|
||||
</g>
|
||||
<switch>
|
||||
<g requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"/>
|
||||
<a transform="translate(0,-5)" xlink:href="https://www.diagrams.net/doc/faq/svg-export-text-problems" target="_blank">
|
||||
<text text-anchor="middle" font-size="10px" x="50%" y="100%">
|
||||
Text is not SVG - cannot display
|
||||
</text>
|
||||
</a>
|
||||
</switch>
|
||||
</svg>
|
After Width: | Height: | Size: 31 KiB |
File diff suppressed because it is too large
Load Diff
@ -1,2 +1,3 @@
|
||||
/dist/*.js
|
||||
/dist/*.ttf
|
||||
dist/*.js
|
||||
dist/*.txt
|
||||
dist/*.ttf
|
||||
|
@ -0,0 +1,77 @@
|
||||
import { mkdir, rm } from 'fs/promises';
|
||||
import { join, resolve } from 'path';
|
||||
import { PackageJson, group, gitShallowClone, run, writeJsonFile, getNightlyVersion } from '../lib';
|
||||
|
||||
const selfPath = __dirname;
|
||||
const rootPath = join(selfPath, '..', '..');
|
||||
const dependenciesPath = join(rootPath, 'dependencies');
|
||||
const vscodePath = resolve(dependenciesPath, 'vscode');
|
||||
const monacoEditorPackageJsonPath = resolve(rootPath, 'package.json');
|
||||
|
||||
async function prepareMonacoEditorCoreReleaseStableOrNightly() {
|
||||
const monacoEditorPackageJson = require(monacoEditorPackageJsonPath) as {
|
||||
version: string;
|
||||
vscodeRef: string;
|
||||
};
|
||||
let version: string;
|
||||
let ref: string;
|
||||
|
||||
const arg = process.argv[2];
|
||||
if (arg === 'stable') {
|
||||
version = monacoEditorPackageJson.version;
|
||||
ref = monacoEditorPackageJson.vscodeRef;
|
||||
} else if (arg === 'nightly') {
|
||||
version = getNightlyVersion(monacoEditorPackageJson.version);
|
||||
ref = 'main';
|
||||
} else {
|
||||
throw new Error('Invalid argument');
|
||||
}
|
||||
|
||||
await prepareMonacoEditorCoreRelease(version, ref);
|
||||
|
||||
// npm package is now in dependencies/vscode/out-monaco-editor-core, ready to be published
|
||||
}
|
||||
|
||||
async function prepareMonacoEditorCoreRelease(version: string, vscodeRef: string) {
|
||||
await mkdir(vscodePath, { recursive: true });
|
||||
|
||||
await rm(dependenciesPath, { force: true, recursive: true });
|
||||
|
||||
let vscodeCommitId: string;
|
||||
|
||||
await group('Checkout vscode', async () => {
|
||||
const result = await gitShallowClone(
|
||||
vscodePath,
|
||||
'https://github.com/microsoft/vscode.git',
|
||||
vscodeRef
|
||||
);
|
||||
vscodeCommitId = result.commitId;
|
||||
});
|
||||
|
||||
await group('Checkout vscode-loc', async () => {
|
||||
await gitShallowClone(
|
||||
// Must be a sibling to the vscode repository
|
||||
'dependencies/vscode-loc',
|
||||
'https://github.com/microsoft/vscode-loc.git',
|
||||
'main'
|
||||
);
|
||||
});
|
||||
|
||||
await group('Set Version', async () => {
|
||||
const monacoEditorCorePackageJsonSourcePath = resolve(
|
||||
vscodePath,
|
||||
'./build/monaco/package.json'
|
||||
);
|
||||
const packageJson = require(monacoEditorCorePackageJsonSourcePath) as PackageJson;
|
||||
packageJson.version = version;
|
||||
// This ensures we can always figure out which commit monaco-editor-core was built from
|
||||
packageJson.vscodeCommitId = vscodeCommitId;
|
||||
await writeJsonFile(monacoEditorCorePackageJsonSourcePath, packageJson);
|
||||
});
|
||||
|
||||
await group('Building & Testing', async () => {
|
||||
await run(resolve(selfPath, './monaco-editor-core.sh'), { cwd: vscodePath });
|
||||
});
|
||||
}
|
||||
|
||||
prepareMonacoEditorCoreReleaseStableOrNightly();
|
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# cwd must be the vscode repository.
|
||||
|
||||
yarn --frozen-lockfile --network-timeout 180000
|
||||
yarn playwright-install
|
||||
yarn gulp hygiene
|
||||
yarn valid-layers-check
|
||||
yarn --cwd build compile
|
||||
yarn eslint
|
||||
yarn monaco-compile-check
|
||||
yarn --max_old_space_size=4095 compile
|
||||
|
||||
yarn test-browser --browser chromium
|
||||
|
||||
yarn gulp editor-distro
|
||||
mkdir typings-test
|
||||
|
||||
cd typings-test
|
||||
yarn init -yp
|
||||
../node_modules/.bin/tsc --init
|
||||
echo "import '../out-monaco-editor-core';" > a.ts
|
||||
../node_modules/.bin/tsc --noEmit
|
||||
cd ..
|
||||
|
||||
cd test/monaco
|
||||
yarn run esm-check
|
||||
yarn run bundle-webpack
|
||||
yarn run compile
|
||||
yarn test
|
||||
cd ../..
|
||||
|
||||
# npm package is now in dependencies/vscode/out-monaco-editor-core, ready to be published
|
@ -0,0 +1,71 @@
|
||||
import { readFile } from 'fs/promises';
|
||||
import { join, resolve } from 'path';
|
||||
import { PackageJson, getNightlyVersion, group, run, writeJsonFile, gitCommitId } from '../lib';
|
||||
|
||||
const selfPath = __dirname;
|
||||
const rootPath = join(selfPath, '..', '..');
|
||||
const monacoEditorPackageJsonPath = resolve(rootPath, 'package.json');
|
||||
const monacoEditorCorePackageJsonPath = resolve(
|
||||
rootPath,
|
||||
'node_modules',
|
||||
'monaco-editor-core',
|
||||
'package.json'
|
||||
);
|
||||
|
||||
async function prepareMonacoEditorReleaseStableOrNightly() {
|
||||
const monacoEditorPackageJson = JSON.parse(
|
||||
await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
|
||||
) as PackageJson;
|
||||
|
||||
let version: string;
|
||||
|
||||
const arg = process.argv[2];
|
||||
if (arg === 'stable') {
|
||||
version = monacoEditorPackageJson.version;
|
||||
} else if (arg === 'nightly') {
|
||||
version = getNightlyVersion(monacoEditorPackageJson.version);
|
||||
} else {
|
||||
throw new Error('Invalid argument');
|
||||
}
|
||||
|
||||
await prepareMonacoEditorRelease(version);
|
||||
|
||||
// npm package is now in ./out/monaco-editor, ready to be published
|
||||
}
|
||||
|
||||
async function prepareMonacoEditorRelease(monacoEditorCoreVersion: string) {
|
||||
await group('npm ci', async () => {
|
||||
await run('npm ci', { cwd: resolve(rootPath, 'webpack-plugin') });
|
||||
});
|
||||
|
||||
await group('Set Version & Update monaco-editor-core Version', async () => {
|
||||
const packageJson = JSON.parse(
|
||||
await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
|
||||
) as PackageJson;
|
||||
packageJson.version = monacoEditorCoreVersion;
|
||||
packageJson.devDependencies['monaco-editor-core'] = monacoEditorCoreVersion;
|
||||
await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
|
||||
});
|
||||
|
||||
await group('npm install to pick up monaco-editor-core', async () => {
|
||||
await run('npm install', { cwd: rootPath });
|
||||
});
|
||||
|
||||
await group('Setting vscode commitId from monaco-editor-core', async () => {
|
||||
const monacoEditorCorePackageJson = JSON.parse(
|
||||
await readFile(monacoEditorCorePackageJsonPath, { encoding: 'utf-8' })
|
||||
) as PackageJson;
|
||||
const packageJson = JSON.parse(
|
||||
await readFile(monacoEditorPackageJsonPath, { encoding: 'utf-8' })
|
||||
) as PackageJson;
|
||||
packageJson.vscodeCommitId = monacoEditorCorePackageJson.vscodeCommitId;
|
||||
packageJson.monacoCommitId = await gitCommitId(rootPath);
|
||||
await writeJsonFile(monacoEditorPackageJsonPath, packageJson);
|
||||
});
|
||||
|
||||
await group('Building & Testing', async () => {
|
||||
await run(resolve(selfPath, './monaco-editor.sh'), { cwd: rootPath });
|
||||
});
|
||||
}
|
||||
|
||||
prepareMonacoEditorReleaseStableOrNightly();
|
@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Install OS Dependencies for Playwright
|
||||
sudo npm run playwright-install-deps
|
||||
# Check prettier
|
||||
npm run prettier-check
|
||||
# Build
|
||||
npm run build-monaco-editor
|
||||
|
||||
# Run unit tests
|
||||
npm test
|
||||
|
||||
# Compile webpack plugin
|
||||
npm run compile --prefix webpack-plugin
|
||||
# Package using webpack plugin
|
||||
npm run package-for-smoketest-webpack
|
||||
# Package using esbuild
|
||||
npm run package-for-smoketest-esbuild
|
||||
# Package using vite
|
||||
npm run package-for-smoketest-vite
|
||||
# Package using parcel
|
||||
npm run package-for-smoketest-parcel --prefix test/smoke/parcel
|
||||
|
||||
# Run smoke test
|
||||
npm run smoketest
|
||||
|
||||
# npm package is now ready to be published in ./out/monaco-editor
|
@ -0,0 +1,92 @@
|
||||
import { spawn } from 'child_process';
|
||||
import { mkdir, writeFile } from 'fs/promises';
|
||||
|
||||
export interface RunOptions {
|
||||
cwd: string;
|
||||
}
|
||||
|
||||
export async function run(command: string, options: RunOptions) {
|
||||
console.log(`Running ${command} in ${options.cwd}`);
|
||||
const process = spawn(command, { shell: true, cwd: options.cwd, stdio: 'inherit' });
|
||||
return new Promise<void>((resolve, reject) => {
|
||||
process.on('exit', (code) => {
|
||||
if (code !== 0) {
|
||||
reject(new Error(`Command ${command} exited with code ${code}`));
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export async function runGetOutput(command: string, options: RunOptions): Promise<string> {
|
||||
console.log(`Running ${command} in ${options.cwd}`);
|
||||
return new Promise<string>((resolve, reject) => {
|
||||
const process = spawn(command, { shell: true, cwd: options.cwd, stdio: 'pipe' });
|
||||
let output = '';
|
||||
process.stdout.on('data', (data) => {
|
||||
output += data;
|
||||
});
|
||||
process.on('exit', (code) => {
|
||||
if (code !== 0) {
|
||||
reject(new Error(`Command ${command} exited with code ${code}`));
|
||||
} else {
|
||||
resolve(output);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export async function gitCommitId(repositoryPath: string): Promise<string> {
|
||||
const commitId = (await runGetOutput('git rev-parse HEAD', { cwd: repositoryPath })).trim();
|
||||
return commitId;
|
||||
}
|
||||
|
||||
export async function gitShallowClone(
|
||||
targetPath: string,
|
||||
repositoryUrl: string,
|
||||
ref: string
|
||||
): Promise<{ commitId: string }> {
|
||||
await mkdir(targetPath, { recursive: true });
|
||||
const options: RunOptions = { cwd: targetPath };
|
||||
await run('git init', options);
|
||||
await run(`git remote add origin ${repositoryUrl}`, options);
|
||||
await run(`git fetch --depth 1 origin ${ref}`, options);
|
||||
await run(`git checkout ${ref}`, options);
|
||||
const commitId = await gitCommitId(targetPath);
|
||||
return { commitId };
|
||||
}
|
||||
|
||||
export async function group(name: string, body: () => Promise<void>): Promise<void> {
|
||||
console.log(`##[group]${name}`);
|
||||
try {
|
||||
await body();
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
throw e;
|
||||
} finally {
|
||||
console.log('##[endgroup]');
|
||||
}
|
||||
}
|
||||
|
||||
export async function writeJsonFile(filePath: string, jsonData: unknown): Promise<void> {
|
||||
await writeFile(filePath, JSON.stringify(jsonData, null, '\t') + '\n');
|
||||
}
|
||||
|
||||
export function getNightlyVersion(version: string): string {
|
||||
const pieces = version.split('.');
|
||||
const minor = parseInt(pieces[1], 10);
|
||||
const date = new Date();
|
||||
const yyyy = date.getUTCFullYear();
|
||||
const mm = String(date.getUTCMonth() + 1).padStart(2, '0');
|
||||
const dd = String(date.getUTCDate()).padStart(2, '0');
|
||||
return `0.${minor + 1}.0-dev.${yyyy}${mm}${dd}`;
|
||||
}
|
||||
|
||||
export interface PackageJson {
|
||||
version: string;
|
||||
vscodeRef?: string;
|
||||
vscodeCommitId?: string;
|
||||
monacoCommitId?: string;
|
||||
devDependencies: Record<string, string>;
|
||||
}
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as vite from 'vite';
|
||||
import * as path from 'path';
|
||||
|
||||
async function main() {
|
||||
await vite.build({
|
||||
root: path.resolve(__dirname, './vite/'),
|
||||
base: '/test/smoke/vite/dist/',
|
||||
build: {
|
||||
minify: false
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
main();
|
@ -0,0 +1,56 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import webpack from 'webpack';
|
||||
import MonacoWebpackPlugin from '../../webpack-plugin/out/index.js';
|
||||
import * as path from 'path';
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '../../');
|
||||
const CROSS_ORIGIN_ASSETS = process.argv.includes('--cross-origin');
|
||||
|
||||
webpack(
|
||||
{
|
||||
mode: 'development',
|
||||
entry: './index.js',
|
||||
context: path.join(__dirname, 'webpack'),
|
||||
output: {
|
||||
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
|
||||
filename: 'app.js',
|
||||
publicPath: CROSS_ORIGIN_ASSETS
|
||||
? 'http://localhost:8088/monaco-editor/test/smoke/webpack/out/'
|
||||
: undefined
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'monaco-editor': path.resolve(REPO_ROOT, 'out/monaco-editor')
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /\.ttf$/,
|
||||
use: ['file-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [<any>new MonacoWebpackPlugin({
|
||||
monacoEditorPath: path.resolve(REPO_ROOT, 'out/monaco-editor')
|
||||
})]
|
||||
},
|
||||
(err: Error | undefined, stats: webpack.Stats | undefined) => {
|
||||
if (err) {
|
||||
console.error(err);
|
||||
process.exit(1);
|
||||
}
|
||||
if (stats && stats.hasErrors()) {
|
||||
console.log(stats.compilation.errors);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
);
|
@ -0,0 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="editor-container" style="width: 800px; height: 600px; border: 1px solid #ccc"></div>
|
||||
|
||||
<script type="module" src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,41 @@
|
||||
import * as monaco from '../../../out/monaco-editor/esm/vs/editor/editor.main.js';
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorker: function (moduleId, label) {
|
||||
if (label === 'json') {
|
||||
return new Worker(
|
||||
new URL('../../../out/monaco-editor/esm/vs/language/json/json.worker.js', import.meta.url),
|
||||
{ type: 'module' }
|
||||
);
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return new Worker(
|
||||
new URL('../../../out/monaco-editor/esm/vs/language/css/css.worker.js', import.meta.url),
|
||||
{ type: 'module' }
|
||||
);
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return new Worker(
|
||||
new URL('../../../out/monaco-editor/esm/vs/language/html/html.worker.js', import.meta.url),
|
||||
{ type: 'module' }
|
||||
);
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return new Worker(
|
||||
new URL(
|
||||
'../../../out/monaco-editor/esm/vs/language/typescript/ts.worker.js',
|
||||
import.meta.url
|
||||
),
|
||||
{ type: 'module' }
|
||||
);
|
||||
}
|
||||
return new Worker(
|
||||
new URL('../../../out/monaco-editor/esm/vs/editor/editor.worker.js', import.meta.url),
|
||||
{
|
||||
type: 'module'
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
window.monacoAPI = monaco;
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"name": "parcel-smoketest",
|
||||
"scripts": {
|
||||
"package-for-smoketest-parcel": "parcel build ./index.html --cache-dir ./.cache --public-url /test/smoke/parcel/dist/ --no-optimize"
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="editor-container" style="position: absolute; width: 500px; height: 400px"></div>
|
||||
<script type="module" src="index.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,31 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as monaco from '../../../out/monaco-editor/esm/vs/editor/editor.main';
|
||||
import editorWorker from '../../../out/monaco-editor/esm/vs/editor/editor.worker?worker';
|
||||
import jsonWorker from '../../../out/monaco-editor/esm/vs/language/json/json.worker?worker';
|
||||
import cssWorker from '../../../out/monaco-editor/esm/vs/language/css/css.worker?worker';
|
||||
import htmlWorker from '../../../out/monaco-editor/esm/vs/language/html/html.worker?worker';
|
||||
import tsWorker from '../../../out/monaco-editor/esm/vs/language/typescript/ts.worker?worker';
|
||||
|
||||
self.MonacoEnvironment = {
|
||||
getWorker(moduleId, label) {
|
||||
if (label === 'json') {
|
||||
return new jsonWorker();
|
||||
}
|
||||
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||
return new cssWorker();
|
||||
}
|
||||
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||
return new htmlWorker();
|
||||
}
|
||||
if (label === 'typescript' || label === 'javascript') {
|
||||
return new tsWorker();
|
||||
}
|
||||
return new editorWorker();
|
||||
}
|
||||
};
|
||||
|
||||
window.monacoAPI = monaco;
|
@ -1,39 +0,0 @@
|
||||
const MonacoWebpackPlugin = require('../out/index.js');
|
||||
const path = require('path');
|
||||
|
||||
const ASSET_PATH = 'http://localhost:8088/monaco-editor/test/smoke/webpack/out/';
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '../../');
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
entry: './index.js',
|
||||
context: __dirname,
|
||||
output: {
|
||||
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
|
||||
filename: 'app.js',
|
||||
publicPath: ASSET_PATH
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'monaco-editor': path.resolve(REPO_ROOT, 'release')
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /\.ttf$/,
|
||||
use: ['file-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new MonacoWebpackPlugin({
|
||||
monacoEditorPath: path.resolve(REPO_ROOT, 'release')
|
||||
})
|
||||
]
|
||||
};
|
@ -1,36 +0,0 @@
|
||||
const MonacoWebpackPlugin = require('../out/index.js');
|
||||
const path = require('path');
|
||||
|
||||
const REPO_ROOT = path.join(__dirname, '../../');
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
entry: './index.js',
|
||||
context: __dirname,
|
||||
output: {
|
||||
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
|
||||
filename: 'app.js'
|
||||
},
|
||||
resolve: {
|
||||
alias: {
|
||||
'monaco-editor': path.resolve(REPO_ROOT, 'release')
|
||||
}
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
},
|
||||
{
|
||||
test: /\.ttf$/,
|
||||
use: ['file-loader']
|
||||
}
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
new MonacoWebpackPlugin({
|
||||
monacoEditorPath: path.resolve(REPO_ROOT, 'release')
|
||||
})
|
||||
]
|
||||
};
|
@ -1,2 +1,51 @@
|
||||
node_modules/monaco-editor/dev
|
||||
node_modules/monaco-editor/esm
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules
|
||||
jspm_packages
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
dist
|
||||
api
|
||||
|
||||
dist/
|
||||
|
||||
.npmrc
|
||||
|
||||
.yarn/cache
|
||||
.yarn/unplugged
|
||||
.yarn/build-state.yml
|
||||
.yarn/install-state.gz
|
||||
.pnp.js
|
||||
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"tabWidth": 4,
|
||||
"semi": true,
|
||||
"useTabs": true
|
||||
}
|
@ -1,302 +0,0 @@
|
||||
body {
|
||||
padding: 54px 0 40px 0;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
body.home {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
body,
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea,
|
||||
.navbar-search .search-query {
|
||||
font: 400 14px/1.4em 'Segoe UI', 'Open Sans', Calibri, Candara, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.navbar .nav {
|
||||
float: left;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #0066cc;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
letter-spacing: -0.01em;
|
||||
margin: 0;
|
||||
line-height: normal;
|
||||
}
|
||||
|
||||
/***** Bootstrap Cosmo Overrides *****/
|
||||
h1,
|
||||
h2 {
|
||||
font-family: 'Segoe UI Light', 'Segoe UI', 'Open Sans', Calibri, Candara, Arial, sans-serif;
|
||||
font-weight: 300;
|
||||
}
|
||||
h1 {
|
||||
font-size: 72px;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.hero-unit h1 {
|
||||
font-size: 48px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
h1 small,
|
||||
h2 small,
|
||||
h3 small,
|
||||
h4 small,
|
||||
h5 small,
|
||||
h6 small {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.alert-heading,
|
||||
.alert h1,
|
||||
.alert h2,
|
||||
.alert h3,
|
||||
.alert h4,
|
||||
.alert h5,
|
||||
.alert h6 {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.alert-info {
|
||||
color: #3a87ad;
|
||||
background-color: #d9edf7;
|
||||
}
|
||||
|
||||
.navbar-inverse .navbar-inner {
|
||||
background-color: #68217a;
|
||||
-webkit-filter: none;
|
||||
filter: none;
|
||||
}
|
||||
|
||||
.navbar-inverse.home .navbar-inner {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.navbar-inverse .btn-navbar {
|
||||
background: transparent;
|
||||
margin-top: 14px;
|
||||
}
|
||||
|
||||
.navbar-inverse .btn-navbar:hover,
|
||||
.navbar-inverse .btn-navbar:focus,
|
||||
.navbar-inverse .btn-navbar:active,
|
||||
.navbar-inverse .btn-navbar.active,
|
||||
.navbar-inverse .btn-navbar.disabled,
|
||||
.navbar-inverse .btn-navbar[disabled] {
|
||||
background: #442359;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
background-color: #0072c6;
|
||||
}
|
||||
|
||||
.home .hero-unit {
|
||||
margin-top: -54px;
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.hero-unit {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.hero-unit h1 {
|
||||
margin: 0 0 6px;
|
||||
}
|
||||
|
||||
.nav-tabs > li > a {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.nav-tabs > li > a:hover {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.nav-tabs > .active > a,
|
||||
.nav-tabs > .active > a:hover,
|
||||
.nav-tabs > .active > a:focus {
|
||||
color: #0072c6;
|
||||
}
|
||||
|
||||
/***** General *****/
|
||||
|
||||
body > section > .container {
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.masthead {
|
||||
background-color: #0072c6;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.masthead .hero-unit {
|
||||
padding: 30px 0 0;
|
||||
background: none;
|
||||
}
|
||||
|
||||
.navbar.home {
|
||||
position: relative;
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
.navbar .nav > li > a {
|
||||
text-shadow: none;
|
||||
padding-top: 18px;
|
||||
font-size: 14px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.navbar-inverse .nav-collapse .nav > li > a {
|
||||
color: white;
|
||||
padding-left: 0;
|
||||
}
|
||||
|
||||
.navbar-inverse .nav > li > a.nav-item:focus,
|
||||
.navbar-inverse .nav > li > a.nav-item:hover {
|
||||
background-color: rgba(0, 0, 0, 0.12);
|
||||
}
|
||||
|
||||
.navbar-inverse .nav .active > a.nav-item,
|
||||
.navbar-inverse .nav .active > a.nav-item:hover,
|
||||
.navbar-inverse .nav .active > a.nav-item:focus {
|
||||
color: #fff;
|
||||
background-color: rgba(0, 0, 0, 0.24);
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.navbar .logo {
|
||||
/*background: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyOCIgaGVpZ2h0PSIyOSI+PHBhdGggZmlsbD0iI2ZmZiIgZD0iTTIxIDBsLTExIDEyLTcuMzMzLTUuNjY2LTIuNjY3IDEuNjgydjEzLjk4NGwyLjY2NyAxLjY2NiA3LjMzMy01LjY2NiAxMSAxMSA3LTN2LTIyLjMzM2wtNy0zLjY2N3ptLTE4IDE5di05bDQgNS00IDR6bTExLTRsNy02djEybC03LTZ6Ii8+PC9zdmc+") left center no-repeat;*/
|
||||
/*padding: 16px 12px 0 34px;*/
|
||||
padding: 16px 12px 0 0px;
|
||||
height: 35px;
|
||||
display: block;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.navbar .logo a {
|
||||
color: #fff;
|
||||
font-size: 24px;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
.navbar-fixed-top {
|
||||
z-index: 500;
|
||||
}
|
||||
|
||||
.flgroup:after {
|
||||
content: '';
|
||||
display: block;
|
||||
visibility: hidden;
|
||||
height: 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Controls */
|
||||
|
||||
/* Media Queries */
|
||||
@media (min-width: 1200px) {
|
||||
h1,
|
||||
h2 {
|
||||
letter-spacing: -0.04em;
|
||||
}
|
||||
|
||||
.hero-unit h1 {
|
||||
font-size: 72px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 36px;
|
||||
}
|
||||
}
|
||||
|
||||
#gh-link {
|
||||
display: none;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
z-index: 1000;
|
||||
}
|
||||
@media (min-width: 980px) {
|
||||
#gh-link {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 980px) {
|
||||
.navbar .nav {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.navbar-inverse .nav-collapse .nav > li > a {
|
||||
padding-left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 768px) and (max-width: 979px) {
|
||||
h1 {
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 979px) {
|
||||
body {
|
||||
padding: inherit;
|
||||
}
|
||||
|
||||
.navbar-fixed-top,
|
||||
.navbar-fixed-bottom,
|
||||
.navbar-static-top {
|
||||
margin-right: inherit;
|
||||
margin-left: inherit;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.navbar-fixed-top .navbar-inner {
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
.navbar .container {
|
||||
width: 724px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.navbar .container {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.navbar .logo a {
|
||||
display: none;
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 9.0 KiB |
@ -1,229 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
|
||||
<title>Monaco Editor</title>
|
||||
|
||||
<link data-inline="yes-please" href="./lib/bootstrap-cosmo.css" rel="stylesheet" />
|
||||
<link data-inline="yes-please" href="./lib/bootstrap-responsive.min.css" rel="stylesheet" />
|
||||
<link data-inline="yes-please" href="./all.css" rel="stylesheet" />
|
||||
<link data-inline="yes-please" href="./index/index.css" rel="stylesheet" />
|
||||
|
||||
<link
|
||||
data-name="vs/editor/editor.main"
|
||||
rel="stylesheet"
|
||||
href="../release/dev/vs/editor/editor.main.css"
|
||||
/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<pre data-preload="index/samples/sample.typescript.txt"></pre>
|
||||
<pre data-preload="index/samples/diff.lhs.txt"></pre>
|
||||
<pre data-preload="index/samples/diff.rhs.txt"></pre>
|
||||
<a id="gh-link" href="https://github.com/microsoft/monaco-editor"
|
||||
><img width="149" height="149" alt="Fork me on GitHub" src="./fork.png"
|
||||
/></a>
|
||||
<nav class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<div class="logo">
|
||||
<a href="index.html">Monaco Editor</a>
|
||||
</div>
|
||||
<!-- collapse button for smaller screens -->
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-navbar"
|
||||
data-toggle="collapse"
|
||||
data-target=".nav-collapse"
|
||||
>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
|
||||
<!-- navbar title -->
|
||||
<div class="nav-collapse collapse">
|
||||
<ul class="nav">
|
||||
<li><a class="nav-item" href="index.html">Home</a></li>
|
||||
<li><a class="nav-item" href="api/index.html">API Doc</a></li>
|
||||
<li><a class="nav-item" href="playground.html">Playground</a></li>
|
||||
<li><a class="nav-item" href="monarch.html">Monarch</a></li>
|
||||
<li>
|
||||
<a
|
||||
class="nav-item"
|
||||
target="_blank"
|
||||
href="https://registry.npmjs.org/monaco-editor/-/monaco-editor-{{version}}.tgz"
|
||||
>Download {{version}}</a
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<section class="try">
|
||||
<div class="container">
|
||||
<h3>About</h3>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<br />
|
||||
<p>
|
||||
The Monaco Editor is the code editor that powers
|
||||
<a href="https://github.com/microsoft/vscode">VS Code</a>. A good page describing the
|
||||
code editor's features is
|
||||
<a href="https://code.visualstudio.com/docs/editor/editingevolved">here</a>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
It is licensed under the MIT License and supports Edge, Chrome, Firefox, Safari and
|
||||
Opera.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
The Monaco editor is
|
||||
<span style="font-weight: bold; color: #ff5722">not</span>
|
||||
supported in mobile browsers or mobile web frameworks.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Find more information at the
|
||||
<a href="https://github.com/microsoft/monaco-editor">Monaco Editor repo</a>.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<h3>Download v{{version}}</h3>
|
||||
<div class="row">
|
||||
<div class="span12">
|
||||
<br />
|
||||
<p>The latest released version is <strong>{{version}}</strong>.</p>
|
||||
<p>
|
||||
Download with this direct
|
||||
<a
|
||||
target="_blank"
|
||||
href="https://registry.npmjs.org/monaco-editor/-/monaco-editor-{{version}}.tgz"
|
||||
>download link</a
|
||||
>
|
||||
or
|
||||
<a href="https://www.npmjs.com/package/monaco-editor">from npm</a>:
|
||||
</p>
|
||||
<pre style="color: black">npm install monaco-editor@{{version}}</pre>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<h3>Editor</h3>
|
||||
<div class="editor row">
|
||||
<div class="span3">
|
||||
<h4
|
||||
title="Syntax colorization plus support for errors, warnings, IntelliSense, formatting and outlining"
|
||||
>
|
||||
Rich IntelliSense, Validation
|
||||
</h4>
|
||||
<p>TypeScript, JavaScript, CSS, LESS, SCSS, JSON, HTML</p>
|
||||
<br />
|
||||
<h4 title="Syntax colorization">Basic Syntax Colorization</h4>
|
||||
<p>
|
||||
XML, PHP, C#, C++, Razor, Markdown, Diff, Java, VB, CoffeeScript, Handlebars, Batch,
|
||||
Pug, F#, Lua, Powershell, Python, Ruby, SASS, R, Objective-C
|
||||
</p>
|
||||
<br />
|
||||
<p>
|
||||
Colorizers are implemented using
|
||||
<a href="monarch.html" target="_blank">Monarch</a>.
|
||||
</p>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div class="row">
|
||||
<div class="span4">
|
||||
<label class="control-label">Language</label>
|
||||
<select class="language-picker"></select>
|
||||
</div>
|
||||
<div class="span4">
|
||||
<label class="control-label">Theme</label>
|
||||
<select class="theme-picker">
|
||||
<option>Visual Studio</option>
|
||||
<option>Visual Studio Dark</option>
|
||||
<option>High Contrast Dark</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-frame">
|
||||
<div class="loading editor" style="display: none">
|
||||
<div class="progress progress-striped active">
|
||||
<div class="bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="editor"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
<h3>Diff Editor</h3>
|
||||
<div class="editor row">
|
||||
<div class="span3">
|
||||
<h4 title="As you type diffing for all supported languages">
|
||||
Side by side live comparison
|
||||
</h4>
|
||||
<p>Supports all languages out of the box</p>
|
||||
</div>
|
||||
<div class="span9">
|
||||
<div class="row">
|
||||
<div class="span8">
|
||||
<div class="checkbox">
|
||||
<label class="control-label">
|
||||
<input id="inline-diff-checkbox" type="checkbox" value="" />
|
||||
Inline diff
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="editor-frame">
|
||||
<div class="loading diff-editor" style="display: none">
|
||||
<div class="progress progress-striped active">
|
||||
<div class="bar"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="diff-editor"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<footer class="container">
|
||||
<hr />
|
||||
<p class="text-center">
|
||||
<a href="https://microsoft.com" title="Microsoft">
|
||||
<img
|
||||
src="https://opensource.microsoft.com/assets/images/Microsoft_logo.svg"
|
||||
alt="Microsoft"
|
||||
style="max-height: 23px; margin-bottom: 12px"
|
||||
/>
|
||||
</a>
|
||||
<br />
|
||||
<small>© {{year}} Microsoft</small>
|
||||
</p>
|
||||
</footer>
|
||||
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js"
|
||||
integrity="sha256-wS9gmOZBqsqWxgIVgA8Y9WcQOa7PgSIX+rPA0VL2rbQ="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/bootstrap.min.js"
|
||||
integrity="sha256-u+l2mGjpmGK/mFgUncmMcFKdMijvV+J3odlDJZSNUu8="
|
||||
crossorigin="anonymous"
|
||||
></script>
|
||||
|
||||
<script>
|
||||
var require = { paths: { vs: '../release/dev/vs' } };
|
||||
</script>
|
||||
<script src="../release/dev/vs/loader.js"></script>
|
||||
<script src="../release/dev/vs/editor/editor.main.nls.js"></script>
|
||||
<script src="../release/dev/vs/editor/editor.main.js"></script>
|
||||
<script data-inline="yes-please" src="./index/index.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,258 +0,0 @@
|
||||
.try .drops {
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.try .drops li {
|
||||
float: left;
|
||||
width: auto;
|
||||
height: auto;
|
||||
text-indent: 0;
|
||||
font-size: 26px;
|
||||
line-height: normal;
|
||||
margin: 0 12px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.try .drops li a:hover,
|
||||
.try .drops li a:focus {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.try .drops li h4 {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.try .drops li.active h4,
|
||||
.try .drops li.active:hover h4 {
|
||||
color: #0072c6;
|
||||
}
|
||||
|
||||
.try .drops li:hover h4 {
|
||||
color: rgba(0, 114, 198, 0.5);
|
||||
}
|
||||
|
||||
.try .editor.row {
|
||||
padding: 18px 0;
|
||||
}
|
||||
|
||||
.try .row h4 {
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
|
||||
.try .tile {
|
||||
position: relative;
|
||||
height: 72px;
|
||||
border: 1px solid #ddd;
|
||||
text-align: right;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
|
||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
|
||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
|
||||
|
||||
-webkit-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.try .tile:hover {
|
||||
-webkit-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
|
||||
-moz-box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
|
||||
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
|
||||
.try .tile h4 {
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
bottom: 12px;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.try .tile .glyph {
|
||||
position: absolute;
|
||||
left: 12px;
|
||||
bottom: -6px;
|
||||
background: url('../img/cloud.png') no-repeat;
|
||||
background-size: 80px 43px;
|
||||
height: 43px;
|
||||
width: 80px;
|
||||
|
||||
opacity: 0.5;
|
||||
transition: opacity 0.5s ease, bottom 0.5s ease;
|
||||
-webkit-transition: opacity 0.5s ease, bottom 0.5s ease;
|
||||
}
|
||||
|
||||
.try .tile:hover .glyph {
|
||||
opacity: 1;
|
||||
bottom: -2px;
|
||||
}
|
||||
|
||||
.try .editor.row h4 small {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
.try .editor.row .control-label {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
top: -4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.try .editor.row .monaco-editor .find-widget input[type='text'] {
|
||||
margin-bottom: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-webkit-transition: none;
|
||||
-moz-transition: none;
|
||||
-o-transition: none;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.try .editor.row .monaco-editor .find-widget .monaco-checkbox .label {
|
||||
min-height: 20px;
|
||||
min-width: 20px;
|
||||
}
|
||||
|
||||
.try .editor.row .monaco-editor .find-widget .close {
|
||||
float: none;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.try .editor .editor-frame {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.try .editor .editor-frame #editor,
|
||||
.try .editor .editor-frame #diff-editor {
|
||||
height: 400px;
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #eee;
|
||||
}
|
||||
|
||||
.try .editor .editor-frame .loading {
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(255, 255, 255, 0.5);
|
||||
margin: 0 auto;
|
||||
display: none;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.try .editor .editor-frame .progress {
|
||||
width: 50%;
|
||||
margin: 15% auto 0;
|
||||
}
|
||||
|
||||
.try .editor .editor-frame .progress .bar {
|
||||
width: 100%;
|
||||
background-color: #4bb1cf;
|
||||
}
|
||||
|
||||
.try .editor .editor-frame #editor .alert,
|
||||
.try .editor .editor-frame #diff-editor .alert {
|
||||
margin: 18% auto 0;
|
||||
width: 30%;
|
||||
text-align: center;
|
||||
color: #b94a48;
|
||||
background-color: #f2dede;
|
||||
border-color: #eed3d7;
|
||||
}
|
||||
|
||||
.try .editor #editor .monaco-editor .row,
|
||||
.try .editor #diff-editor .monaco-editor .row {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.try .editor .vs.monaco-editor .context-view.monaco-menu-container a {
|
||||
color: #646465;
|
||||
}
|
||||
|
||||
.try .editor .vs-dark.monaco-editor .context-view.monaco-menu-container a {
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
@media (min-width: 1200px) {
|
||||
.try .editor .row {
|
||||
margin-left: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.try .container {
|
||||
margin: 0 24px;
|
||||
}
|
||||
|
||||
.try .tile h4 {
|
||||
right: 6px;
|
||||
}
|
||||
|
||||
.try .editor > .span9 .row .span4 {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
.try .editor h4 {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.try .editor > .span3 p,
|
||||
.try .editor > .span3 h4 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 320px) {
|
||||
.try .editor > .span9 {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* ------- BEGIN bootstrap fixes for the editor ------- */
|
||||
|
||||
.monaco-editor .container:before,
|
||||
.monaco-editor .row:before {
|
||||
content: '';
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
.monaco-editor .container:after,
|
||||
.monaco-editor .row:after {
|
||||
clear: inherit;
|
||||
}
|
||||
|
||||
.monaco-editor .container {
|
||||
width: auto;
|
||||
margin: inherit;
|
||||
padding: inherit;
|
||||
}
|
||||
|
||||
.monaco-editor .close {
|
||||
float: none;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
line-height: inherit;
|
||||
color: inherit;
|
||||
text-shadow: inherit;
|
||||
opacity: inherit;
|
||||
filter: inherit;
|
||||
}
|
||||
|
||||
.monaco-editor .row {
|
||||
margin: inherit;
|
||||
}
|
||||
|
||||
.monaco-editor .invisible {
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
/* ------- END bootstrap fixes for the editor ------- */
|
@ -1,174 +0,0 @@
|
||||
/// <reference path="../../release/monaco.d.ts" />
|
||||
|
||||
'use strict';
|
||||
|
||||
var editor = null,
|
||||
diffEditor = null;
|
||||
|
||||
$(document).ready(function () {
|
||||
require(['vs/editor/editor.main'], function () {
|
||||
var MODES = (function () {
|
||||
var modesIds = monaco.languages.getLanguages().map(function (lang) {
|
||||
return lang.id;
|
||||
});
|
||||
modesIds.sort();
|
||||
|
||||
return modesIds.map(function (modeId) {
|
||||
return {
|
||||
modeId: modeId,
|
||||
sampleURL: 'index/samples/sample.' + modeId + '.txt'
|
||||
};
|
||||
});
|
||||
})();
|
||||
|
||||
var startModeIndex = 0;
|
||||
for (var i = 0; i < MODES.length; i++) {
|
||||
var o = document.createElement('option');
|
||||
o.textContent = MODES[i].modeId;
|
||||
if (MODES[i].modeId === 'typescript') {
|
||||
startModeIndex = i;
|
||||
}
|
||||
$('.language-picker').append(o);
|
||||
}
|
||||
$('.language-picker')[0].selectedIndex = startModeIndex;
|
||||
loadSample(MODES[startModeIndex]);
|
||||
$('.language-picker').change(function () {
|
||||
loadSample(MODES[this.selectedIndex]);
|
||||
});
|
||||
|
||||
$('.theme-picker').change(function () {
|
||||
changeTheme(this.selectedIndex);
|
||||
});
|
||||
|
||||
loadDiffSample();
|
||||
|
||||
$('#inline-diff-checkbox').change(function () {
|
||||
diffEditor.updateOptions({
|
||||
renderSideBySide: !$(this).is(':checked')
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
window.onresize = function () {
|
||||
if (editor) {
|
||||
editor.layout();
|
||||
}
|
||||
if (diffEditor) {
|
||||
diffEditor.layout();
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
var preloaded = {};
|
||||
(function () {
|
||||
var elements = Array.prototype.slice.call(document.querySelectorAll('pre[data-preload]'), 0);
|
||||
|
||||
elements.forEach(function (el) {
|
||||
var path = el.getAttribute('data-preload');
|
||||
preloaded[path] = el.innerText || el.textContent;
|
||||
el.parentNode.removeChild(el);
|
||||
});
|
||||
})();
|
||||
|
||||
function xhr(url, cb) {
|
||||
if (preloaded[url]) {
|
||||
return cb(null, preloaded[url]);
|
||||
}
|
||||
$.ajax({
|
||||
type: 'GET',
|
||||
url: url,
|
||||
dataType: 'text',
|
||||
error: function () {
|
||||
cb(this, null);
|
||||
}
|
||||
}).done(function (data) {
|
||||
cb(null, data);
|
||||
});
|
||||
}
|
||||
|
||||
function loadSample(mode) {
|
||||
$('.loading.editor').show();
|
||||
xhr(mode.sampleURL, function (err, data) {
|
||||
if (err) {
|
||||
if (editor) {
|
||||
if (editor.getModel()) {
|
||||
editor.getModel().dispose();
|
||||
}
|
||||
editor.dispose();
|
||||
editor = null;
|
||||
}
|
||||
$('.loading.editor').fadeOut({ duration: 200 });
|
||||
$('#editor').empty();
|
||||
$('#editor').append(
|
||||
'<p class="alert alert-error">Failed to load ' + mode.modeId + ' sample</p>'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!editor) {
|
||||
$('#editor').empty();
|
||||
editor = monaco.editor.create(document.getElementById('editor'), {
|
||||
model: null
|
||||
});
|
||||
}
|
||||
|
||||
var oldModel = editor.getModel();
|
||||
var newModel = monaco.editor.createModel(data, mode.modeId);
|
||||
editor.setModel(newModel);
|
||||
if (oldModel) {
|
||||
oldModel.dispose();
|
||||
}
|
||||
$('.loading.editor').fadeOut({ duration: 300 });
|
||||
});
|
||||
}
|
||||
|
||||
function loadDiffSample() {
|
||||
var onError = function () {
|
||||
$('.loading.diff-editor').fadeOut({ duration: 200 });
|
||||
$('#diff-editor').append('<p class="alert alert-error">Failed to load diff editor sample</p>');
|
||||
};
|
||||
|
||||
$('.loading.diff-editor').show();
|
||||
|
||||
var lhsData = null,
|
||||
rhsData = null,
|
||||
jsMode = null;
|
||||
|
||||
xhr('index/samples/diff.lhs.txt', function (err, data) {
|
||||
if (err) {
|
||||
return onError();
|
||||
}
|
||||
lhsData = data;
|
||||
onProgress();
|
||||
});
|
||||
xhr('index/samples/diff.rhs.txt', function (err, data) {
|
||||
if (err) {
|
||||
return onError();
|
||||
}
|
||||
rhsData = data;
|
||||
onProgress();
|
||||
});
|
||||
|
||||
function onProgress() {
|
||||
if (lhsData && rhsData) {
|
||||
diffEditor = monaco.editor.createDiffEditor(document.getElementById('diff-editor'), {
|
||||
enableSplitViewResizing: false
|
||||
});
|
||||
|
||||
var lhsModel = monaco.editor.createModel(lhsData, 'text/javascript');
|
||||
var rhsModel = monaco.editor.createModel(rhsData, 'text/javascript');
|
||||
|
||||
diffEditor.setModel({
|
||||
original: lhsModel,
|
||||
modified: rhsModel
|
||||
});
|
||||
|
||||
$('.loading.diff-editor').fadeOut({ duration: 300 });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function changeTheme(theme) {
|
||||
var newTheme = theme === 1 ? 'vs-dark' : theme === 0 ? 'vs' : 'hc-black';
|
||||
monaco.editor.setTheme(newTheme);
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue