monaco-sql-languages
Advanced tools
Comparing version 0.9.0 to 0.9.1
{ | ||
"name": "monaco-sql-languages", | ||
"version": "0.9.0", | ||
"version": "0.9.1", | ||
"description": "SQL languages for the Monaco Editor, based on monaco-languages.", | ||
@@ -13,4 +13,4 @@ "scripts": { | ||
"dev": "webpack serve --config ./scripts/webpack.dev.js", | ||
"prod": "mrmdir ./public && node --max_old_space_size=4092 & webpack --config ./scripts/webpack.prod.js", | ||
"gh-pages": "npm run prod && git subtree push --prefix public origin gh-pages" | ||
"prod": "mrmdir ./docs && node --max_old_space_size=4092 & webpack --config ./scripts/webpack.prod.js", | ||
"gh-pages": "npm run prod && git subtree push --prefix docs origin gh-pages" | ||
}, | ||
@@ -26,2 +26,5 @@ "author": "DTStack Corporation", | ||
}, | ||
"publishConfig": { | ||
"registry": "https://registry.npmjs.org/" | ||
}, | ||
"devDependencies": { | ||
@@ -78,4 +81,4 @@ "@babel/core": "^7.12.16", | ||
"dependencies": { | ||
"dt-sql-parser": "^4.0.0-beta.2" | ||
"dt-sql-parser": "^4.0.0-beta.2.1" | ||
} | ||
} |
102
README.md
@@ -1,5 +0,11 @@ | ||
# Monaco SQL Languages [![Build Status](https://dev.azure.com/ms/monaco-languages/_apis/build/status/microsoft.monaco-languages?branchName=master)](https://dev.azure.com/ms/monaco-languages/_build/latest?definitionId=140&branchName=master) | ||
# Monaco SQL Languages [![NPM version][npm-image]][npm-url] [![NPM downloads][download-img]][download-url] | ||
[npm-image]: https://img.shields.io/npm/v/monaco-sql-languages.svg?style=flat-square | ||
[npm-url]: https://www.npmjs.com/package/monaco-sql-languages | ||
[download-img]: https://img.shields.io/npm/dm/monaco-sql-languages.svg?style=flat | ||
[download-url]: https://www.npmjs.com/package/monaco-sql-languages | ||
This is a SQL Languages project for Monaco Editor forked it from [monaco-languages](https://github.com/microsoft/monaco-languages). The differences are we integrated with | ||
many kinds of SQL Languages for BigData domain, like FLinkSQL, SParkSQL, HiveSQL and so on. We provided the basic **SQL syntax** validation feature by [dt-sql-parser](https://github.com/DTStack/dt-sql-parser), and we are going to provide **Autocomplete** feature in future. | ||
many kinds of SQL Languages for BigData domain, like FLinkSQL, SParkSQL, HiveSQL, and so on. We provided the basic **SQL syntax** validation feature by [dt-sql-parser](https://github.com/DTStack/dt-sql-parser), and we are going to provide **Autocomplete** feature in future. | ||
@@ -10,8 +16,8 @@ Online preview: <https://dtstack.github.io/monaco-sql-languages/> | ||
- Generic SQL (MySQL) | ||
- FLinkSQL | ||
- SparkSQL | ||
- HiveSQL | ||
- PGSQL | ||
- PLSQL | ||
- Generic SQL (MySQL) | ||
- FLinkSQL | ||
- SparkSQL | ||
- HiveSQL | ||
- PGSQL | ||
- PLSQL | ||
@@ -37,8 +43,8 @@ ## Installation | ||
entry: { | ||
'sparksql.worker': 'monaco-sql-languages/out/esm/sparksql/sparksql.worker.ts', | ||
'flinksql.worker': 'monaco-sql-languages/out/esm/flinksql/flinksql.worker.ts'), | ||
'hivesql.worker': 'monaco-sql-languages/out/esm/hivesql/hivesql.worker.ts'), | ||
'mysql.worker': 'monaco-sql-languages/out/esm/mysql/mysql.worker.ts'), | ||
'plsql.worker': 'monaco-sql-languages/out/esm/plsql/plsql.worker.ts'), | ||
'sql.worker': 'monaco-sql-languages/out/esm/sql/sql.worker.ts') | ||
'sparksql.worker': 'monaco-sql-languages/out/esm/sparksql/sparksql.worker.js', | ||
'flinksql.worker': 'monaco-sql-languages/out/esm/flinksql/flinksql.worker.js'), | ||
'hivesql.worker': 'monaco-sql-languages/out/esm/hivesql/hivesql.worker.js'), | ||
'mysql.worker': 'monaco-sql-languages/out/esm/mysql/mysql.worker.js'), | ||
'plsql.worker': 'monaco-sql-languages/out/esm/plsql/plsql.worker.js'), | ||
'sql.worker': 'monaco-sql-languages/out/esm/sql/sql.worker.js') | ||
}, | ||
@@ -51,27 +57,27 @@ ``` | ||
window.MonacoEnvironment = { | ||
getWorkerUrl: function (moduleId, label) { | ||
switch (label) { | ||
case 'sparksql': { | ||
return './sparksql.worker.js'; | ||
} | ||
case 'flinksql': { | ||
return './flinksql.worker.js'; | ||
} | ||
case 'hivesql': { | ||
return './hivesql.worker.js'; | ||
} | ||
case 'mysql': { | ||
return './mysql.worker.js'; | ||
} | ||
case 'plsql': { | ||
return './plsql.worker.js'; | ||
} | ||
case 'sql': { | ||
return './sql.worker.js'; | ||
} | ||
default: { | ||
return './editor.worker.js'; | ||
} | ||
} | ||
} | ||
getWorkerUrl: function (moduleId, label) { | ||
switch (label) { | ||
case 'sparksql': { | ||
return './sparksql.worker.js'; | ||
} | ||
case 'flinksql': { | ||
return './flinksql.worker.js'; | ||
} | ||
case 'hivesql': { | ||
return './hivesql.worker.js'; | ||
} | ||
case 'mysql': { | ||
return './mysql.worker.js'; | ||
} | ||
case 'plsql': { | ||
return './plsql.worker.js'; | ||
} | ||
case 'sql': { | ||
return './sql.worker.js'; | ||
} | ||
default: { | ||
return './editor.worker.js'; | ||
} | ||
} | ||
} | ||
}; | ||
@@ -109,14 +115,14 @@ ``` | ||
- initial setup with `npm install .` | ||
- open the dev web with `npm run dev` | ||
- compile with `npm run watch` | ||
- test with `npm run test` | ||
- bundle with `npm run prepublishOnly` | ||
- initial setup with `npm install .` | ||
- open the dev web with `npm run dev` | ||
- compile with `npm run watch` | ||
- test with `npm run test` | ||
- bundle with `npm run prepublishOnly` | ||
## Dev: Adding a new language | ||
- create `$/src/myLang/myLang.contribution.ts` | ||
- create `$/src/myLang/myLang.ts` | ||
- create `$/src/myLang/myLang.test.ts` | ||
- edit `$/src/monaco.contribution.ts` and register your new language | ||
- create `$/src/myLang/myLang.contribution.ts` | ||
- create `$/src/myLang/myLang.ts` | ||
- create `$/src/myLang/myLang.test.ts` | ||
- edit `$/src/monaco.contribution.ts` and register your new language | ||
@@ -123,0 +129,0 @@ ```js |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
689108
136