Update parcel sample to use parcel v2

This commit is contained in:
Alex Dima 2021-11-16 22:21:12 +01:00
parent 091f871e65
commit 32f9897bf2
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
5 changed files with 2684 additions and 3837 deletions

View file

@ -6,7 +6,7 @@
/monaco-editor/typedoc/theme/ /monaco-editor/typedoc/theme/
/monaco-editor/typedoc/monaco.d.ts /monaco-editor/typedoc/monaco.d.ts
/monaco-editor/website/lib/ /monaco-editor/website/lib/
/samples/browser-esm-parcel/.cache/ /samples/browser-esm-parcel/.parcel-cache/
/samples/browser-esm-parcel/dist/ /samples/browser-esm-parcel/dist/
/samples/browser-esm-vite-react/dist/**/*.js /samples/browser-esm-vite-react/dist/**/*.js
/samples/browser-esm-webpack/dist/*.js /samples/browser-esm-webpack/dist/*.js

View file

@ -1,2 +1,2 @@
dist/ dist/
.cache .parcel-cache

File diff suppressed because it is too large Load diff

View file

@ -1,17 +1,17 @@
{ {
"name": "helloworld", "name": "helloworld",
"dependencies": {},
"scripts": { "scripts": {
"simpleserver": "node ../node_modules/yaserver/bin/yaserver --root ./dist --port 9999", "simpleserver": "node ../node_modules/yaserver/bin/yaserver --root ./dist --port 9999",
"build": "npm run build-index && npm run build-json && npm run build-css && npm run build-html && npm run build-ts && npm run build-worker", "build": "npm run build-index && npm run build-json && npm run build-css && npm run build-html && npm run build-ts && npm run build-worker",
"build-index": "parcel build src/index.html", "build-index": "parcel build src/index.html --no-optimize",
"build-json": "parcel build ../node_modules/monaco-editor/esm/vs/language/json/json.worker.js --no-source-maps", "build-json": "parcel build node_modules/monaco-editor/esm/vs/language/json/json.worker.js --no-source-maps --no-optimize",
"build-css": "parcel build ../node_modules/monaco-editor/esm/vs/language/css/css.worker.js --no-source-maps", "build-css": "parcel build node_modules/monaco-editor/esm/vs/language/css/css.worker.js --no-source-maps --no-optimize",
"build-html": "parcel build ../node_modules/monaco-editor/esm/vs/language/html/html.worker.js --no-source-maps", "build-html": "parcel build node_modules/monaco-editor/esm/vs/language/html/html.worker.js --no-source-maps --no-optimize",
"build-ts": "parcel build ../node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js --no-source-maps", "build-ts": "parcel build node_modules/monaco-editor/esm/vs/language/typescript/ts.worker.js --no-source-maps --no-optimize",
"build-worker": "parcel build ../node_modules/monaco-editor/esm/vs/editor/editor.worker.js --no-source-maps" "build-worker": "parcel build node_modules/monaco-editor/esm/vs/editor/editor.worker.js --no-source-maps --no-optimize"
}, },
"devDependencies": { "devDependencies": {
"parcel": "^1.12.4" "monaco-editor": "^0.30.1",
"parcel": "^2.0.1"
} }
} }

View file

@ -6,6 +6,6 @@
<body> <body>
<div id="container" style="width: 800px; height: 600px; border: 1px solid #ccc"></div> <div id="container" style="width: 800px; height: 600px; border: 1px solid #ccc"></div>
<script src="index.js"></script> <script type="module" src="index.js"></script>
</body> </body>
</html> </html>