11.2025: new version released, sample folder added
This commit is contained in:
@@ -5,7 +5,7 @@ Forked from this repository:
|
||||
|
||||
## Boilerplate:
|
||||
- ```*html```: Type in an HTML file and select the suggestion to create HTML boilerplate.
|
||||
- ```*element```: Type in a JS file and select the suggestion to create JS Custom Element boilerplate.
|
||||
- ```*shadow```: Type in a JS file and select the suggestion to create JS Custom Element boilerplate.
|
||||
|
||||
## Functions:
|
||||
Clone this repository into the top level of the project you are working on, so the HTML can find the "quill.js" functions.
|
||||
|
||||
15
VSCode/deploy-howto.md
Normal file
15
VSCode/deploy-howto.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# To Deploy Extension
|
||||
|
||||
```vsce package```
|
||||
|
||||
```vsce publish```
|
||||
|
||||
# To Get PAT
|
||||
|
||||
Login to Azure
|
||||
Search "Devops"
|
||||
Login to devops (samuel@sun.museum)
|
||||
Click "User Settings" in the top right > "Personal Access Tokens"
|
||||
Create one which has "Allow all Organizations" and "Marketplace" > "Manage" selected
|
||||
Put it in the .env file here
|
||||
set it in the terminal like `export VSCE_PAT="<token>"`
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "quill",
|
||||
"displayName": "Quill",
|
||||
"description": "HTML/CSS Syntax highlighting, best used with the Quill framework",
|
||||
"version": "1.0.4",
|
||||
"version": "1.0.6",
|
||||
"publisher": "capturedsun",
|
||||
"icon": "docs/Quill.png",
|
||||
"engines": {
|
||||
|
||||
BIN
VSCode/quill-1.0.5.vsix
Normal file
BIN
VSCode/quill-1.0.5.vsix
Normal file
Binary file not shown.
@@ -2,46 +2,17 @@
|
||||
"*page": {
|
||||
"prefix": "*html",
|
||||
"body": [
|
||||
"<!DOCTYPE html>",
|
||||
"<!DOCTYPE html>",
|
||||
"<html lang=\"en\">",
|
||||
" <head>",
|
||||
" <title>Quill</title>",
|
||||
" <link rel=\"icon\" href=\"\">",
|
||||
" <link rel=\"stylesheet\" href=\"\">",
|
||||
" <script type=\"module\">",
|
||||
" window.addStyle = function addStyle(cssString) {",
|
||||
" let container = document.querySelector(\"style#quillStyles\");",
|
||||
" if(!container) {",
|
||||
" container = document.createElement('style');",
|
||||
" container.id = \"quillStyles\";",
|
||||
" document.head.appendChild(container);",
|
||||
" }",
|
||||
"",
|
||||
" let primarySelector = cssString.substring(0, cssString.indexOf(\"{\"));",
|
||||
" primarySelector = primarySelector.replace(/\\*/g, \"all\");",
|
||||
" primarySelector = primarySelector.replace(/#/g, \"id-\");",
|
||||
" primarySelector = primarySelector.replace(/,/g, \"\");",
|
||||
" let stylesheet = container.querySelector(`:scope > style[id='${primarySelector}']`)",
|
||||
" if(!stylesheet) {",
|
||||
" stylesheet = document.createElement('style');",
|
||||
" stylesheet.id = primarySelector;",
|
||||
" stylesheet.appendChild(document.createTextNode(cssString));",
|
||||
" container.appendChild(stylesheet);",
|
||||
" } else {",
|
||||
" stylesheet.innerText = cssString",
|
||||
" }",
|
||||
" }",
|
||||
"",
|
||||
" window.html = function html(elementString) {",
|
||||
" let parser = new DOMParser();",
|
||||
" let doc = parser.parseFromString(elementString, 'text/html');",
|
||||
" return doc.body.firstChild;",
|
||||
" }",
|
||||
" </script>",
|
||||
" <script type=\"module\" src=\"\"></script>",
|
||||
" <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">",
|
||||
" <link rel=\"icon\" href=\"/_/icons/logo.svg\">",
|
||||
" <link rel=\"stylesheet\" href=\"/_/code/shared.css\">",
|
||||
" <script src=\"/_/code/quill.js\"></script>",
|
||||
" <script type=\"module\" src=\"75820185/index.js\"></script>",
|
||||
" </head>",
|
||||
" <body>",
|
||||
"",
|
||||
" <body style=\"margin: 0px\">",
|
||||
" </body>",
|
||||
"</html>"
|
||||
],
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"html": {
|
||||
"prefix": "html",
|
||||
"body": [
|
||||
"html(`$1`);"
|
||||
"html(`$`);"
|
||||
],
|
||||
"description": "Create a DOM node"
|
||||
},
|
||||
@@ -15,35 +15,17 @@
|
||||
"description": "Use the DOM collection of functions"
|
||||
},
|
||||
|
||||
"*element": {
|
||||
"prefix": "*element",
|
||||
"*shadow": {
|
||||
"prefix": "*shadow",
|
||||
"body": [
|
||||
"class Index extends HTMLElement {",
|
||||
"",
|
||||
" css = /*css*/ `",
|
||||
" index-el {",
|
||||
" ",
|
||||
" }",
|
||||
" `",
|
||||
"",
|
||||
" html = /*html*/ `",
|
||||
" `",
|
||||
"",
|
||||
" constructor() {",
|
||||
" super();",
|
||||
" addStyle(this.css);",
|
||||
" this.innerHTML = this.html;",
|
||||
" }",
|
||||
"",
|
||||
" connectedCallback() {",
|
||||
"class Index extends Shadow {",
|
||||
" render() {",
|
||||
" ",
|
||||
" }",
|
||||
"",
|
||||
"}",
|
||||
"",
|
||||
"customElements.define('index-el', Index);",
|
||||
"export default Index;"
|
||||
" ",
|
||||
"register(Index)"
|
||||
],
|
||||
"description": "Custom Element Template"
|
||||
"description": "Custom Shadow Template"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user