mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 08:10:11 +01:00
Extract the JSON interpolation language as a standalone npm package that
works with the official Monaco Editor as a peer dependency.
Features:
- Zero dependencies on monaco-editor internals
- Simple registration API: register() and getDefaults()
- Variable context for custom completions and hover
- Monarch tokenizer with nextEmbedded for JavaScript
- TypeScript types included
- ESM and CommonJS builds via tsup
Usage:
```typescript
import { register, getDefaults } from 'monaco-json-interpolation';
register();
getDefaults().setVariableContext({
getVariables: () => [{ name: 'env', value: 'prod' }]
});
```
43 lines
976 B
JSON
43 lines
976 B
JSON
{
|
|
"name": "monaco-json-interpolation",
|
|
"version": "1.0.0",
|
|
"description": "Monaco Editor language support for JSON with ${...} variable interpolation",
|
|
"main": "dist/index.js",
|
|
"module": "dist/index.mjs",
|
|
"types": "dist/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.mjs",
|
|
"require": "./dist/index.js"
|
|
}
|
|
},
|
|
"files": [
|
|
"dist",
|
|
"src"
|
|
],
|
|
"scripts": {
|
|
"build": "tsup src/index.ts --format cjs,esm --dts --clean",
|
|
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
"typecheck": "tsc --noEmit",
|
|
"prepublishOnly": "npm run build"
|
|
},
|
|
"keywords": [
|
|
"monaco",
|
|
"monaco-editor",
|
|
"json",
|
|
"interpolation",
|
|
"template",
|
|
"variables"
|
|
],
|
|
"author": "",
|
|
"license": "MIT",
|
|
"peerDependencies": {
|
|
"monaco-editor": ">=0.30.0"
|
|
},
|
|
"devDependencies": {
|
|
"monaco-editor": "^0.52.0",
|
|
"tsup": "^8.0.0",
|
|
"typescript": "^5.0.0"
|
|
}
|
|
}
|