-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 393a1c8
Showing
8 changed files
with
137 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
*.vsix | ||
|
||
.vscode/ | ||
|
||
bin/ | ||
|
||
.DS_Store | ||
Thumbs.db |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## v1.0.0 | ||
|
||
- Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2020 Bowler Hat LLC | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Feathers UI for Visual Studio Code | ||
|
||
Provides useful commands for [Feathers UI](https://feathersui.com/) projects created with [Haxe](https://haxe.org/) and [OpenFL](https://openfl.org/) in [Visual Studio Code](https://code.visualstudio.com/). | ||
|
||
## Create a new Feathers UI project | ||
|
||
1. Open an empty workspace folder in Visual Studio Code. | ||
1. Go to the **View** menu and choose **Command Palette…**. | ||
> Alternatively, use the <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> keyboard shortcut (<kbd>Command</kbd>+<kbd>Shift</kbd>+<kbd>P</kbd> on macOS). | ||
1. Run the **Feathers UI: Create new project** command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-lib vscode | ||
-cp src | ||
-D js-es=6 | ||
-js bin/extension.js | ||
Extension |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ | ||
"name": "vscode-feathersui", | ||
"displayName": "Feathers UI", | ||
"description": "Manage Feathers UI projects in VSCode", | ||
"version": "1.0.0", | ||
"private": true, | ||
"publisher": "bowlerhatllc", | ||
"author": { | ||
"name": "Josh Tynjala" | ||
}, | ||
"homepage": "https://feathersui.com/", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/BowlerHatLLC/vscode-feathersui.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/BowlerHatLLC/vscode-feathersui/issues" | ||
}, | ||
"main": "bin/extension.js", | ||
"icon": "feathersui.png", | ||
"scripts": { | ||
"vscode:prepublish": "haxe build.hxml" | ||
}, | ||
"keywords": [ | ||
"Feathers UI", | ||
"Haxe", | ||
"OpenFL" | ||
], | ||
"license": "MIT", | ||
"engines": { | ||
"vscode": "^1.36.0" | ||
}, | ||
"activationEvents": [ | ||
"onCommand:feathersui.newProject" | ||
], | ||
"contributes": { | ||
"commands": [ | ||
{ | ||
"command": "feathersui.newProject", | ||
"title": "Create new project", | ||
"category": "Feathers UI" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import vscode.WorkspaceFolder; | ||
import vscode.ExtensionContext; | ||
|
||
class Extension { | ||
private static final COMMAND_OPEN_FOLDER = "Open Folder"; | ||
|
||
@:expose("activate") | ||
public static function main(context:ExtensionContext):Void { | ||
Vscode.commands.registerCommand("feathersui.newProject", createNewProject); | ||
} | ||
|
||
private static function createNewProject():Void { | ||
var workspaceFolders = Vscode.workspace.workspaceFolders; | ||
if (workspaceFolders == null) { | ||
Vscode.window.showErrorMessage("Failed to create new Feathers UI project. Open an empty folder before running this command.", null, | ||
COMMAND_OPEN_FOLDER) | ||
.then(function(result) { | ||
switch (result) { | ||
case COMMAND_OPEN_FOLDER: | ||
Vscode.commands.executeCommand("workbench.action.files.openFolder"); | ||
} | ||
}); | ||
return; | ||
} | ||
if (workspaceFolders.length == 1) { | ||
var workspaceFolder = workspaceFolders[0]; | ||
createNewProjectInWorkspaceFolder(workspaceFolder); | ||
} else { | ||
Vscode.window.showWorkspaceFolderPick().then((workspaceFolder) -> { | ||
if (workspaceFolder == null) { | ||
return; | ||
} | ||
createNewProjectInWorkspaceFolder(workspaceFolder); | ||
}, (reason) -> { | ||
// do nothing | ||
}); | ||
} | ||
} | ||
|
||
private static function createNewProjectInWorkspaceFolder(workspaceFolder:WorkspaceFolder):Void { | ||
var terminal = Vscode.window.createTerminal(); | ||
terminal.sendText("haxelib run feathersui new-project \"" + workspaceFolder.uri.fsPath + "\" --vscode"); | ||
terminal.show(); | ||
} | ||
} |