-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add Extension Code * Add Screenshots * Add github workflows
- Loading branch information
1 parent
4180bfc
commit bd7d1cd
Showing
40 changed files
with
8,840 additions
and
88 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,30 @@ | ||
# Editor configuration, see https://editorconfig.org | ||
|
||
# top-most EditorConfig file | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
# Unix-style newlines with a newline ending every file | ||
end_of_line = lf | ||
|
||
# Typescript | ||
[*.ts] | ||
max_line_length = 80 | ||
quote_type = single | ||
|
||
# HTML | ||
[*.html] | ||
max_line_length = 140 | ||
|
||
[*.md] | ||
max_line_length = off | ||
trim_trailing_whitespace = false | ||
|
||
# JS related | ||
# [*.{js,ts,json,yml}] |
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,19 @@ | ||
{ | ||
"root": true, | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"ecmaVersion": 6, | ||
"sourceType": "module" | ||
}, | ||
"plugins": ["@typescript-eslint"], | ||
"rules": { | ||
"@typescript-eslint/naming-convention": "warn", | ||
"@typescript-eslint/semi": "warn", | ||
"curly": "warn", | ||
"eqeqeq": "warn", | ||
"no-throw-literal": "warn", | ||
"semi": "off" | ||
}, | ||
"ignorePatterns": ["out", "dist", ".vscode-test", "**/*.d.ts"], | ||
"extends": ["prettier"] | ||
} |
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,4 @@ | ||
Ref: | ||
|
||
- https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions | ||
- https://docs.github.com/en/actions/security-guides/encrypted-secrets |
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,97 @@ | ||
# CI/CD for Github Actions | ||
# @author Denis Zholob (deniszholob.com) | ||
# ====================================== # | ||
name: Build/Publish | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+" | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
cache: "npm" | ||
|
||
- name: Install NPM Dependencies | ||
run: npm ci | ||
|
||
- name: Package | ||
run: npm run package | ||
|
||
- name: Save artifact for next step | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: packaged-extension | ||
path: "*.vsix" | ||
|
||
# - run: xvfb-run -a npm test | ||
# if: runner.os == 'Linux' | ||
# - run: npm test | ||
# if: runner.os != 'Linux' | ||
|
||
publish: | ||
runs-on: ubuntu-latest | ||
needs: build | ||
if: success() && startsWith( github.ref, 'refs/tags/') | ||
steps: | ||
- name: Set env | ||
run: echo "RELEASE_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV | ||
|
||
- name: Download Artifact from last step | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: packaged-extension | ||
path: ./ | ||
|
||
- name: Display structure of downloaded files | ||
run: ls -R | ||
working-directory: ./ | ||
|
||
- name: Create GH Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
body: | | ||
# Downloads | ||
- [Github](https://github.com/deniszholob/angular-files-generator/releases) | ||
- [VSCode Marketplace](https://marketplace.visualstudio.com/items?itemName=deniszholob.angular-files-generator) | ||
# Support Me by | ||
- Donating on Ko-fi: https://ko-fi.com/deniszholob | ||
- Donating on Patreon: https://www.patreon.com/deniszholob | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Upload release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./angular-files-generator-${{ env.RELEASE_VERSION }}.vsix | ||
asset_name: angular-files-generator-${{ env.RELEASE_VERSION }}.vsix | ||
asset_content_type: application/zip | ||
|
||
- name: Publish artifact | ||
run: npx vsce publish --packagePath $(find . -iname *.vsix) | ||
env: | ||
VSCE_PAT: ${{ secrets.VSCE_PAT }} |
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
npm run pre-commit |
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,2 @@ | ||
legacy-peer-deps=true | ||
save-exact=true |
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 @@ | ||
# Ignore artifacts: | ||
out | ||
/.vscode-test | ||
|
||
# Markdown | ||
#*.md | ||
|
||
#Misc | ||
/node_modules | ||
package-lock.json |
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 @@ | ||
{} |
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 @@ | ||
{ | ||
// See http://go.microsoft.com/fwlink/?LinkId=827846 | ||
// for the documentation about the extensions.json format | ||
"recommendations": ["dbaeumer.vscode-eslint"] | ||
} |
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,28 @@ | ||
// A launch configuration that compiles the extension and then opens it inside a new window | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "Run Extension", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": ["--extensionDevelopmentPath=${workspaceFolder}"], | ||
"outFiles": ["${workspaceFolder}/out/**/*.js"], | ||
"preLaunchTask": "${defaultBuildTask}" | ||
}, | ||
{ | ||
"name": "Extension Tests", | ||
"type": "extensionHost", | ||
"request": "launch", | ||
"args": [ | ||
"--extensionDevelopmentPath=${workspaceFolder}", | ||
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index" | ||
], | ||
"outFiles": ["${workspaceFolder}/out/test/**/*.js"], | ||
"preLaunchTask": "${defaultBuildTask}" | ||
} | ||
] | ||
} |
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,35 @@ | ||
// Place your settings in this file to overwrite default and user settings. | ||
{ | ||
"editor.renderWhitespace": "all", | ||
"editor.rulers": [80, 140], | ||
"editor.defaultFormatter": "esbenp.prettier-vscode", | ||
"explorer.sortOrderLexicographicOptions": "lower", // Case sensitive file ordering in tree | ||
"workbench.iconTheme": "material-icon-theme", | ||
"explorer.autoRevealExclude": { | ||
"**/node_modules": true | ||
}, | ||
"files.exclude": { | ||
"node_modules": false, | ||
"public/": false, | ||
"screenshots/": false, | ||
".editorconfig": false, | ||
".eslint*": false, | ||
".gitignore": false, | ||
".npmrc": false, | ||
".prettierignore": false, | ||
".prettierrc": false, | ||
".vscodeignore": false, | ||
"debug.log": false, | ||
"package-lock.json": false, | ||
"**/tsconfig*": false, | ||
"**/tslint.json": false, | ||
"FUNDING.yml": false, | ||
"LICENSE": false, | ||
"out": false | ||
}, | ||
"search.exclude": { | ||
"out": true // set this to false to include "out" folder in search results | ||
}, | ||
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts | ||
"typescript.tsc.autoDetect": "off" | ||
} |
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,20 @@ | ||
// See https://go.microsoft.com/fwlink/?LinkId=733558 | ||
// for the documentation about the tasks.json format | ||
{ | ||
"version": "2.0.0", | ||
"tasks": [ | ||
{ | ||
"type": "npm", | ||
"script": "watch", | ||
"problemMatcher": "$tsc-watch", | ||
"isBackground": true, | ||
"presentation": { | ||
"reveal": "never" | ||
}, | ||
"group": { | ||
"kind": "build", | ||
"isDefault": true | ||
} | ||
} | ||
] | ||
} |
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,23 @@ | ||
.github/** | ||
.vscode/** | ||
.vscode-test/** | ||
node_modules | ||
out/test/** | ||
screenshots | ||
src/** | ||
.editorconfig | ||
.eslintrc | ||
.gitignore | ||
.npmrc | ||
.yarnrc | ||
.prettierignore | ||
.prettierrc | ||
package-lock.json | ||
vsc-extension-quickstart.md | ||
**/tsconfig.json | ||
**/.eslintrc.json | ||
**/*.map | ||
**/*.ts | ||
**/*.svg | ||
FUNDING.yml | ||
LICENCE |
Oops, something went wrong.