firefly-compiler 0.5.73 → 0.5.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -53,27 +53,6 @@ extend self: BuildSystem {
53
53
 
54
54
  }
55
55
 
56
- // TODO: Remove
57
- internalCallEsBuild(
58
- self: NodeSystem
59
- mainJsFile: String
60
- outputPath: String
61
- minify: Bool
62
- sourceMap: Bool
63
- ): Unit {
64
- let esbuild = Js.import("esbuild")
65
- esbuild->build(Js->(
66
- stdin = Js->(contents = "import {$run$} from './" + mainJsFile + "';", resolveDir = ".")
67
- bundle = True
68
- minify = minify
69
- sourcemap = sourceMap
70
- platform = "browser"
71
- target = "es2017"
72
- external = ["../../../node_modules/*"] // TODO
73
- outfile = outputPath
74
- ))
75
- }
76
-
77
56
  internalBrowserCallEsBuild(
78
57
  self: BuildSystem
79
58
  mainJsFiles: List[String]
@@ -101,11 +101,6 @@ import * as ff_core_Unit from "../../ff/core/Unit.mjs"
101
101
 
102
102
 
103
103
 
104
- export function internalCallEsBuild_(self_, mainJsFile_, outputPath_, minify_, sourceMap_) {
105
- const esbuild_ = import$0;
106
- esbuild_.build({stdin: {contents: (("import {$run$} from './" + mainJsFile_) + "';"), resolveDir: "."}, bundle: true, minify: minify_, sourcemap: sourceMap_, platform: "browser", target: "es2017", external: ["../../../node_modules/*"], outfile: outputPath_})
107
- }
108
-
109
104
  export function internalBrowserCallEsBuild_(self_, mainJsFiles_, outputPath_, minify_, sourceMap_) {
110
105
  const esbuild_ = import$0;
111
106
  esbuild_.build({entryPoints: mainJsFiles_, bundle: true, minify: minify_, sourcemap: sourceMap_, platform: "browser", target: "es2017", outdir: outputPath_, outExtension: {[".js"]: ".bundle.js"}})
@@ -156,11 +151,6 @@ export function internalMainPackagePair_(buildSystem_) {
156
151
  return ff_core_Pair.Pair(buildSystem_["mainPackagePair_"]["group_"], buildSystem_["mainPackagePair_"]["name_"])
157
152
  }
158
153
 
159
- export async function internalCallEsBuild_$(self_, mainJsFile_, outputPath_, minify_, sourceMap_, $task) {
160
- const esbuild_ = import$0;
161
- esbuild_.build({stdin: {contents: (("import {$run$} from './" + mainJsFile_) + "';"), resolveDir: "."}, bundle: true, minify: minify_, sourcemap: sourceMap_, platform: "browser", target: "es2017", external: ["../../../node_modules/*"], outfile: outputPath_})
162
- }
163
-
164
154
  export async function internalBrowserCallEsBuild_$(self_, mainJsFiles_, outputPath_, minify_, sourceMap_, $task) {
165
155
  const esbuild_ = import$0;
166
156
  (await esbuild_.build({entryPoints: mainJsFiles_, bundle: true, minify: minify_, sourcemap: sourceMap_, platform: "browser", target: "es2017", outdir: outputPath_, outExtension: {[".js"]: ".bundle.js"}}))
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly compiler",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.73",
7
+ "version": "0.5.75",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -94,6 +94,36 @@ export function activate(context: vscode.ExtensionContext) {
94
94
  });
95
95
  }
96
96
  }));
97
+
98
+ class FireflyDecorationProvider implements vscode.FileDecorationProvider {
99
+ private _onDidChangeFileDecorations = new vscode.EventEmitter<vscode.Uri | vscode.Uri[]>();
100
+ readonly onDidChangeFileDecorations = this._onDidChangeFileDecorations.event;
101
+
102
+ provideFileDecoration(uri: vscode.Uri): vscode.FileDecoration | undefined {
103
+ if(fs.existsSync(path.join(uri.fsPath, '.firefly/package.ff'))) {
104
+ const config = vscode.workspace.getConfiguration('firefly');
105
+ const decorationColor = config.get<string>('packageFolderColor', 'charts.blue'); // Default to 'charts.blue'
106
+ return {
107
+ tooltip: 'Contains .firefly folder',
108
+ color: new vscode.ThemeColor(decorationColor),
109
+ };
110
+ }
111
+ return undefined;
112
+ }
113
+
114
+ refresh(uri: vscode.Uri): void {
115
+ this._onDidChangeFileDecorations.fire(uri);
116
+ }
117
+ }
118
+
119
+ const decorationProvider = new FireflyDecorationProvider();
120
+ context.subscriptions.push(vscode.window.registerFileDecorationProvider(decorationProvider));
121
+
122
+ const watcher = vscode.workspace.createFileSystemWatcher('**/.firefly/package.ff');
123
+ watcher.onDidCreate(uri => decorationProvider.refresh(vscode.Uri.file(path.dirname(path.dirname(uri.fsPath)))));
124
+ watcher.onDidDelete(uri => decorationProvider.refresh(vscode.Uri.file(path.dirname(path.dirname(uri.fsPath)))));
125
+ watcher.onDidChange(uri => decorationProvider.refresh(vscode.Uri.file(path.dirname(path.dirname(uri.fsPath)))));
126
+ context.subscriptions.push(watcher);
97
127
  }
98
128
 
99
129
  export function deactivate(): Thenable<void> | undefined {
@@ -4,7 +4,7 @@
4
4
  "description": "Firefly language support",
5
5
  "author": "Firefly team",
6
6
  "license": "MIT",
7
- "version": "0.5.73",
7
+ "version": "0.5.75",
8
8
  "repository": {
9
9
  "type": "git",
10
10
  "url": "https://github.com/Ahnfelt/firefly-boot"
@@ -128,6 +128,11 @@
128
128
  ],
129
129
  "default": "verbose",
130
130
  "description": "Traces the communication between VS Code and the language server."
131
+ },
132
+ "firefly.packageFolderColor": {
133
+ "type": "string",
134
+ "default": "charts.blue",
135
+ "description": "The color used for Firefly folder decorations."
131
136
  }
132
137
  }
133
138
  },
@@ -31,7 +31,7 @@
31
31
  ]},
32
32
  "keyword": {
33
33
  "name": "keyword.declaration.firefly",
34
- "match": "\\b(data|class|capability|import|from|dependency|package|include|extend|tailcall|function|let|mutable|firefly|trait|instance|newtype|private|safe|unsafe|trust|target)\\b(?=[ ]*[A-Za-z0-9\"'])"
34
+ "match": "\\b(data|class|capability|import|from|dependency|package|include|extend|tailcall|function|let|mutable|firefly|trait|instance|newtype|safe|unsafe|trust|target|private|protected|public|export|local|internal|opaque)\\b(?=[ ]*[A-Za-z0-9\"'])"
35
35
  },
36
36
  "spread": {
37
37
  "name": "punctuation.spread.firefly",
@@ -1,3 +0,0 @@
1
- browserMain(system: BrowserSystem) {
2
- system.js()->document->title = "Hello!"
3
- }