-
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.
Merge pull request #4 from DanielHuey/dev
Various Improvements to the extension
- Loading branch information
Showing
17 changed files
with
1,682 additions
and
16,951 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,48 @@ | ||
name: Extension Builder Action | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build Extension | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js Version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' | ||
|
||
- name: Check and setup caches | ||
uses: actions/cache@v3 | ||
id: npm-cache | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }} | ||
|
||
- name: Install dependencies | ||
if: steps.npm-cache.outputs.cache-hit != true | ||
run: npm install | ||
|
||
- name: Run build script | ||
run: npm run avr-utils | ||
|
||
- name: Rename application entry file | ||
run: sed -i "s#./extension.js#out/main.js#" package.json | ||
|
||
- name: Package Extension | ||
run: vsce pack | ||
|
||
- name: Save artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: extension-latest.vsix | ||
path: "*.vsix" |
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
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 @@ | ||
// The module 'vscode' contains the VS Code extensibility API | ||
// Import the module and reference it with the alias vscode in your code below | ||
// eslint-disable-next-line no-unused-vars | ||
const vscode = require("vscode"); | ||
const { init } = require("./src/init"); | ||
const registerCommands = require("./src/registerCommands"); | ||
const registerProviders = require("./src/registerProviders"); | ||
const { dataObject } = require("./src/utils"); | ||
|
||
// This method is called when your extension is activated | ||
// Your extension is activated the very first time the command is executed | ||
|
||
/** | ||
* @param {vscode.ExtensionContext} context | ||
*/ | ||
async function activate(context) { | ||
dataObject(); // To initialize the data.json file | ||
registerCommands(); | ||
// DO NOT MOVE THESE LINES ABOVE. THESE 2 LINES MUST BE FIRST | ||
await init(context); | ||
|
||
registerProviders(context); | ||
|
||
console.log('"avr-utils" is now active!'); | ||
} | ||
|
||
// This method is called when your extension is deactivated | ||
function deactivate() { | ||
vscode.commands.executeCommand('setContext', 'avr-utils.isAvrC', false); | ||
} | ||
|
||
module.exports = { | ||
activate, | ||
deactivate, | ||
}; |
Oops, something went wrong.