This repository has been archived by the owner on Jun 15, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added vscode extension with highlighting and snippets (#15)
- Loading branch information
1 parent
92b78d2
commit 8112d1d
Showing
15 changed files
with
781 additions
and
124 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
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
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,14 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"label": "create-extension-package", | ||
"type": "shell", | ||
"command": "yarn", | ||
"group": "build", | ||
"args": ["gulp", "create-extension-package"] | ||
} | ||
] | ||
} |
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
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
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 |
---|---|---|
|
@@ -2,11 +2,60 @@ | |
"name": "github-actions-js", | ||
"version": "0.0.6", | ||
"description": "A VSCode extension and a parser/linter for GitHub workflow/action files.", | ||
"repository": "https://github.com/OmarTawfik/github-actions-js", | ||
"publisher": "OmarTawfik", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/OmarTawfik/github-actions-js" | ||
}, | ||
"author": "Omar Tawfik <[email protected]>", | ||
"bugs": { | ||
"url": "https://github.com/OmarTawfik/github-actions-js/issues", | ||
"email": "[email protected]" | ||
}, | ||
"license": "MIT", | ||
"icon": "./resources/logo.png", | ||
"categories": [ | ||
"Programming Languages", | ||
"Snippets", | ||
"Linters", | ||
"Formatters" | ||
], | ||
"activationEvents": [ | ||
"onLanguage:github-actions" | ||
], | ||
"contributes": { | ||
"languages": [ | ||
{ | ||
"id": "github-actions", | ||
"extensions": [ | ||
".workflow" | ||
], | ||
"aliases": [ | ||
"GitHub Actions", | ||
"GitHub Workflows" | ||
] | ||
} | ||
], | ||
"grammars": [ | ||
{ | ||
"language": "github-actions", | ||
"scopeName": "source.workflow", | ||
"path": "./resources/grammar.json" | ||
} | ||
], | ||
"snippets": [ | ||
{ | ||
"language": "github-actions", | ||
"path": "./resources/snippets.json" | ||
} | ||
] | ||
}, | ||
"scripts": { | ||
"gulp": "./node_modules/.bin/gulp" | ||
"gulp": "./node_modules/.bin/gulp", | ||
"postinstall": "node ./node_modules/vscode/bin/install" | ||
}, | ||
"engines": { | ||
"vscode": "^1.23.0" | ||
}, | ||
"jest": { | ||
"preset": "ts-jest", | ||
|
@@ -16,7 +65,11 @@ | |
"keywords": [ | ||
"github", | ||
"actions", | ||
"parser" | ||
"workflows", | ||
"parser", | ||
"linter", | ||
"vscode", | ||
"extension" | ||
], | ||
"devDependencies": { | ||
"@types/del": "3.0.1", | ||
|
@@ -40,7 +93,8 @@ | |
"tslint": "5.12.1", | ||
"tslint-config-airbnb": "5.11.1", | ||
"tslint-config-prettier": "1.18.0", | ||
"typescript": "3.3.3" | ||
"typescript": "3.3.3", | ||
"vscode": "1.1.23" | ||
}, | ||
"dependencies": { | ||
"chalk": "2.4.2" | ||
|
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,36 @@ | ||
/*! | ||
* Copyright 2019 Omar Tawfik. Please see LICENSE file at the root of this repository. | ||
*/ | ||
|
||
import * as path from "path"; | ||
import * as gulp from "gulp"; | ||
import * as merge from "gulp-merge-json"; | ||
import { outPath, rootPath } from "./gulp-utils"; | ||
|
||
const extensionPath = path.join(outPath, "extension"); | ||
|
||
export module ExtensionTasks { | ||
export const copyFiles = "extension:copy-files"; | ||
export const generatePackageJson = "extension:generate-package-json"; | ||
} | ||
|
||
gulp.task(ExtensionTasks.copyFiles, () => { | ||
return gulp | ||
.src([ | ||
path.join(outPath, "src", "**"), | ||
path.join(rootPath, "src", "resources*", "**"), | ||
path.join(rootPath, "README.md"), | ||
]) | ||
.pipe(gulp.dest(extensionPath)); | ||
}); | ||
|
||
gulp.task(ExtensionTasks.generatePackageJson, () => { | ||
return gulp | ||
.src([path.join(rootPath, "package.json"), path.join(rootPath, "scripts", "package-extension.json")]) | ||
.pipe( | ||
merge({ | ||
fileName: "package.json", | ||
}), | ||
) | ||
.pipe(gulp.dest(extensionPath)); | ||
}); |
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
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 @@ | ||
{ | ||
"name": "github-actions-vscode", | ||
"description": "A VSCode extension for editing/linting GitHub actions/workflow files.", | ||
"main": "extension.js" | ||
} |
File renamed without changes.
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,9 @@ | ||
/*! | ||
* Copyright 2019 Omar Tawfik. Please see LICENSE file at the root of this repository. | ||
*/ | ||
|
||
import * as vscode from "vscode"; | ||
|
||
export function activate(_: vscode.ExtensionContext): void {} | ||
|
||
export function deactivate(): void {} |
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,60 @@ | ||
{ | ||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", | ||
"name": "github-actions", | ||
"scopeName": "source.workflow", | ||
"patterns": [ | ||
{ | ||
"include": "#comments" | ||
}, | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#integers" | ||
} | ||
], | ||
"repository": { | ||
"comments": { | ||
"patterns": [ | ||
{ | ||
"name": "comment", | ||
"match": "(#|//).*" | ||
} | ||
] | ||
}, | ||
"keywords": { | ||
"patterns": [ | ||
{ | ||
"name": "support.class", | ||
"match": "\\b(version|workflow|action)\\b" | ||
}, | ||
{ | ||
"name": "support.variable", | ||
"match": "\\b(on|resolves|needs|uses|runs|args|env|secrets)\\b" | ||
} | ||
] | ||
}, | ||
"strings": { | ||
"name": "string", | ||
"begin": "\"", | ||
"end": "\"", | ||
"patterns": [ | ||
{ | ||
"name": "contents", | ||
"match": "\\\\." | ||
} | ||
] | ||
}, | ||
"integers": { | ||
"patterns": [ | ||
{ | ||
"name": "constant.numeric", | ||
"match": "[0-9]+" | ||
} | ||
] | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.