Skip to content

Commit 9313316

Browse files
CompuIvesSaraVieira
authored andcommitted
Add toml vscode extension (codesandbox#1788)
1 parent 5fd07eb commit 9313316

File tree

119 files changed

+17384
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+17384
-9
lines changed

standalone-packages/codesandbox-browserfs/src/core/file_watcher.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,15 @@ const EventEmitter = require('events');
66

77
interface IWatchEntry {
88
filename: string;
9-
watcher: any,
10-
curr?: Stats,
9+
watcher: any;
10+
curr?: Stats;
1111
recursive?: boolean;
1212
persistent?: boolean;
1313
callback?: ((event: string, filename: string) => any) | undefined;
1414
fileCallback?: (curr: Stats, prev: Stats) => void;
1515
}
1616

1717
export class FileWatcher {
18-
private watchEntries: IWatchEntry[] = [];
19-
20-
private removeEntry(watchEntry: IWatchEntry) {
21-
this.watchEntries = this.watchEntries.filter(en => en !== watchEntry);
22-
}
23-
2418
public triggerWatch(filename: string, event: 'change' | 'rename', newStats?: Stats) {
2519
const validEntries = this.watchEntries.filter(entry => {
2620
if (entry.filename === filename) {
@@ -111,4 +105,10 @@ export class FileWatcher {
111105
unwatchFile(filename: string, listener: (curr: Stats, prev: Stats) => void): any {
112106
this.watchEntries = this.watchEntries.filter(entry => entry.filename !== filename && entry.fileCallback !== listener);
113107
}
108+
109+
private watchEntries: IWatchEntry[] = [];
110+
111+
private removeEntry(watchEntry: IWatchEntry) {
112+
this.watchEntries = this.watchEntries.filter(en => en !== watchEntry);
113+
}
114114
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
3+
<Metadata>
4+
<Identity Language="en-US" Id="better-toml" Version="0.3.2" Publisher="bungcip"/>
5+
<DisplayName>Better TOML</DisplayName>
6+
<Description xml:space="preserve">Better TOML Language support</Description>
7+
<Tags>toml,TOML,__ext_toml</Tags>
8+
<Categories>Languages</Categories>
9+
<GalleryFlags>Public</GalleryFlags>
10+
<Badges></Badges>
11+
<Properties>
12+
<Property Id="Microsoft.VisualStudio.Code.Engine" Value="^1.18.0" />
13+
<Property Id="Microsoft.VisualStudio.Code.ExtensionDependencies" Value="" />
14+
15+
<Property Id="Microsoft.VisualStudio.Services.Links.Source" Value="https://github.com/bungcip/better-toml.git" />
16+
<Property Id="Microsoft.VisualStudio.Services.Links.Getstarted" Value="https://github.com/bungcip/better-toml.git" />
17+
18+
<Property Id="Microsoft.VisualStudio.Services.Links.GitHub" Value="https://github.com/bungcip/better-toml.git" />
19+
20+
21+
<Property Id="Microsoft.VisualStudio.Services.Links.Support" Value="https://github.com/bungcip/better-toml/issues" />
22+
<Property Id="Microsoft.VisualStudio.Services.Links.Learn" Value="https://github.com/bungcip/better-toml/blob/master/README.md" />
23+
24+
25+
<Property Id="Microsoft.VisualStudio.Services.GitHubFlavoredMarkdown" Value="true" />
26+
27+
28+
</Properties>
29+
<License>extension/LICENSE.txt</License>
30+
<Icon>extension/icon.png</Icon>
31+
</Metadata>
32+
<Installation>
33+
<InstallationTarget Id="Microsoft.VisualStudio.Code"/>
34+
</Installation>
35+
<Dependencies/>
36+
<Assets>
37+
<Asset Type="Microsoft.VisualStudio.Code.Manifest" Path="extension/package.json" Addressable="true" />
38+
<Asset Type="Microsoft.VisualStudio.Services.Content.Details" Path="extension/README.md" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Content.Changelog" Path="extension/CHANGELOG.md" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Content.License" Path="extension/LICENSE.txt" Addressable="true" /><Asset Type="Microsoft.VisualStudio.Services.Icons.Default" Path="extension/icon.png" Addressable="true" />
39+
</Assets>
40+
</PackageManifest>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Changelog
2+
3+
## 0.3.2 | 2018-02-18
4+
5+
* TOML frontmatter in markdown. Thanks to @marcobeltempo's contribution. #10
6+
* Added logo in extension. It use official logo from https://github.com/toml-lang/toml. #1
7+
8+
## 0.3.1 | 2017-09-25
9+
10+
### Bug fixes
11+
* fix regression caused by new `toml.tmLanguage`
12+
13+
## 0.3.0 | 2017-09-22
14+
15+
### Bug fixes
16+
* fix wrong color for homogeneous array
17+
* allow keys to be single-quoted strings
18+
19+
## 0.2.0 | 2016-11-01
20+
21+
### Bug fixes
22+
23+
* Add Syntax validation for invalid `.toml` files
24+
25+
## 0.1.0 | 2016-10-30
26+
27+
### Bug fixes
28+
29+
* Initial release of `better toml`
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Gigih Aji Ibrahim
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# better-toml README
2+
3+
Better TOML is vs code extension to support TOML file.
4+
5+
## Features
6+
7+
- Syntax Hightlighting for `.toml` files
8+
9+
![Syntax Hightlighting](https://github.com/bungcip/better-toml/raw/master/images/feature_syntax_highlight.png)
10+
11+
- Syntax Validation for invalid input
12+
13+
![Syntax Validation](https://github.com/bungcip/better-toml/raw/master/images/feature_syntax_validation.gif)
14+
15+
- Syntax Hightligting for markdown frontmatter
16+
17+
![Frontmatter](https://github.com/bungcip/better-toml/raw/master/images/feature_frontmatter.gif)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
This project incorporates components from the projects listed below.
2+
The original copyright notices and the licenses are reproduced verbatim.
3+
4+
5+
1. https://github.com/microsoft/vscode
6+
7+
===
8+
9+
MIT License
10+
11+
Copyright (c) 2015 - present Microsoft Corporation
12+
13+
All rights reserved.
14+
15+
Permission is hereby granted, free of charge, to any person obtaining a copy
16+
of this software and associated documentation files (the "Software"), to deal
17+
in the Software without restriction, including without limitation the rights
18+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19+
copies of the Software, and to permit persons to whom the Software is
20+
furnished to do so, subject to the following conditions:
21+
22+
The above copyright notice and this permission notice shall be included in all
23+
copies or substantial portions of the Software.
24+
25+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31+
SOFTWARE.
32+
33+
===
691 Bytes
Loading
34.8 KB
Loading
65.9 KB
Loading
36.1 KB
Loading

0 commit comments

Comments
 (0)