Skip to content

Commit f566f32

Browse files
committed
feat: syntax highlighting for CSS in ES6 template literals
1 parent 215f54d commit f566f32

13 files changed

Lines changed: 37 additions & 293 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
node_modules
1+
/node_modules/

.vscode/launch.json

Lines changed: 0 additions & 12 deletions
This file was deleted.

.vscodeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.vscode/**
22
.vscode-test/**
3+
.history/**
34
.gitignore

CHANGELOG.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
MIT License
22

3+
Copyright (c) 2018 Mikhail Bashkirov
4+
35
Copyright (c) 2018 Tobimori
46

57
Permission is hereby granted, free of charge, to any person obtaining a copy

README.md

Lines changed: 9 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,82 +1,27 @@
1-
# ES6 String HTML
2-
> [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=Tobermory.es6-string-html)
1+
# ES6 String CSS
2+
> [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=bashmish.es6-string-css)
33
4-
Adds syntax highlight support for code, placed in es6 multiline strings:
5-
- HTML
6-
- SQL
4+
Adds syntax highlight support for code, placed in ES6 template literals:
5+
- CSS
76

87
## Installation
98

10-
- Install `es6-string-html` from extensions (`ctrl + shift + x`)
9+
- Install `es6-string-css` from extensions (`ctrl + shift + x`)
1110

1211
## Example
1312

1413
![Example](docs/demo.png)
1514

1615
## Usage
1716

18-
Simply insert the comment /\*html\*/ or `html` (or sql instead of html) before the string
19-
(see Requirements "section" for possible values) or select
20-
`Insert es6-string-html comment/template` from the commands menu
21-
(`ctrl+shift+p` or `f1`)
17+
Simply insert `css` or the comment `/*css*/`, `/*inline-css*/` before a template literal.
2218

23-
> Tip: Comment in the beginning of es6 string is required
19+
> Tip: Comment in the beginning of untagged template literal is required.
2420
2521
## Requirements
2622

2723
- Visual Studio Code v1.19.0 recommended
28-
- Comment `/*html*/` before the string. Possible values:
29-
- - `/*html*/`
30-
- - `/*inline-html*/`
31-
- - `/*template*/`
32-
- - `/*inline-template*/`
33-
- Or
34-
- - `html` before the string
3524

36-
## Keybindings
37-
- `ctrl+shift+h` - Insert `/*html*/`
38-
- `ctrl+k h` - Insert `/*html*/` \`\`
25+
## Credits
3926

40-
## Donation
41-
42-
If this project help you reduce time to develop, you can give me a cup of coffee :)
43-
44-
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=68P8BFSZPG5H2)
45-
46-
## Release Notes
47-
48-
### [1.0.0] - 2018-02-02
49-
- Syntax highlighting for html in es6 multiline strings
50-
51-
### [1.1.0] - 2018-03-08
52-
- Compatibility with Prettier
53-
54-
### [1.2.0] - 2018-03-12
55-
- Commands and keybindings
56-
57-
### [1.3.0] - 2018-03-17
58-
- Syntax highlight without a comment
59-
- Follow semver
60-
61-
### [1.4.0] - 2018-03-22
62-
- JS Syntax highlight
63-
- Single-line comment support
64-
65-
### [1.5.0] - 2018-03-22
66-
- Compatibility with Prettier
67-
68-
### [1.6.0] - 2018-08-13
69-
- Add SQL support. Beta
70-
71-
### [1.6.0] - 2018-08-13
72-
- Improve support for html function
73-
74-
### [1.7.0] - 2018-08-14
75-
- Improve html function support
76-
77-
### [1.7.1] - 2018-08-15
78-
- Improve single-line comments support
79-
- Disable hotkeys
80-
-----------------------------------------------------------------------------------------------------------
81-
82-
**Enjoy!**
27+
This is a fork of the awesome extension [es6-string-html](https://github.com/mydesireiscoma/es6-string-html/).

docs/demo.png

-11.3 KB
Loading

docs/logo.png

-2.12 KB
Loading

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 15 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"name": "es6-string-html",
3-
"displayName": "es6-string-html",
4-
"description": "Highlight different languages in es6 multiline strings",
5-
"version": "1.7.1",
6-
"publisher": "Tobermory",
2+
"name": "es6-string-css",
3+
"displayName": "es6-string-css",
4+
"description": "Highlight CSS language in ES6 template literals",
5+
"version": "0.0.0",
6+
"publisher": "bashmish",
77
"icon": "docs/logo.png",
88
"engines": {
99
"vscode": "^1.19.0"
@@ -13,68 +13,34 @@
1313
"theme": "light"
1414
},
1515
"repository": {
16-
"url": "https://github.com/mydesireiscoma/es6-string-html"
16+
"url": "https://github.com/bashmish/es6-string-css"
1717
},
1818
"bugs": {
19-
"url": "https://github.com/mydesireiscoma/es6-string-html/issues"
19+
"url": "https://github.com/bashmish/es6-string-css/issues"
2020
},
21-
"main": "./scripts/main",
2221
"categories": [
23-
"Languages"
22+
"Programming Languages"
2423
],
2524
"keywords": [
2625
"javascript",
2726
"es6",
28-
"es6-string-html",
29-
"html",
30-
"template"
31-
],
32-
"activationEvents": [
33-
"onCommand:es6stringhtml.insertComment",
34-
"onCommand:es6stringhtml.insertTemplate"
27+
"css",
28+
"lit-css",
29+
"lit-html"
3530
],
3631
"contributes": {
37-
"commands": [
38-
{
39-
"command": "es6stringhtml.insertComment",
40-
"title": "Insert es6-string-html comment",
41-
"category": "HTML"
42-
},
43-
{
44-
"command": "es6stringhtml.insertTemplate",
45-
"title": "Insert es6-string-html template",
46-
"category": "HTML"
47-
}
48-
],
4932
"grammars": [
5033
{
5134
"injectTo": [
5235
"source.js",
53-
"source.js.jsx",
54-
"source.jsx",
5536
"source.ts",
56-
"source.tsx",
57-
"text.html.basic"
58-
],
59-
"scopeName": "inline.es6-html",
60-
"path": "./syntaxes/es6-inline-html.json",
61-
"embeddedLanguages": {
62-
"meta.embedded.block.html": "html"
63-
}
64-
},
65-
{
66-
"injectTo": [
67-
"source.js",
68-
"source.js.jsx",
6937
"source.jsx",
70-
"source.ts",
71-
"source.tsx",
72-
"source.sql"
38+
"source.tsx"
7339
],
74-
"scopeName": "inline.es6-sql",
75-
"path": "./syntaxes/es6-inline-sql.json",
40+
"scopeName": "inline.es6-css",
41+
"path": "./syntaxes/es6-inline-css.json",
7642
"embeddedLanguages": {
77-
"meta.embedded.sql": "sql"
43+
"meta.embedded.block.css": "css"
7844
}
7945
}
8046
]

0 commit comments

Comments
 (0)