Skip to content

Commit

Permalink
Merge pull request #205 from aurelia/feat/extract-component
Browse files Browse the repository at this point in the history
Feat/extract component
  • Loading branch information
hiaux0 authored Dec 25, 2022
2 parents 94a34a9 + 41d60e1 commit 6ea041c
Show file tree
Hide file tree
Showing 31 changed files with 17,463 additions and 119 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ references:
run:
name: npm-update-and-install
command: |
sudo npm install -g npm@latest
sudo npm install -g npm@8.5.0
npm i
npm run postinstall
jobs:
build:
docker:
- image: circleci/node:latest
- image: circleci/node:gallium
steps:
- checkout
- *npm_install_update
Expand All @@ -21,7 +21,7 @@ jobs:
command: npm run vscode:prepublish
test:
docker:
- image: circleci/node:latest
- image: circleci/node:gallium
steps:
- checkout
- *npm_install_update
Expand All @@ -33,7 +33,7 @@ jobs:
command: npm run test:ci
publish:
docker:
- image: circleci/node:latest
- image: circleci/node:gallium
steps:
- checkout
- *npm_install_update
Expand All @@ -45,7 +45,7 @@ jobs:
command: npx vsce publish -p ${VSTOKEN}
prerelease:
docker:
- image: circleci/node:latest
- image: circleci/node:gallium
steps:
- checkout
- *npm_install_update
Expand Down
79 changes: 78 additions & 1 deletion client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 26 additions & 3 deletions client/src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'reflect-metadata';
import * as path from 'path';

import { commands, workspace, ExtensionContext } from 'vscode';
import { commands, window, workspace, ExtensionContext } from 'vscode';
import {
Disposable,
LanguageClient,
Expand All @@ -15,10 +15,11 @@ import {
} from 'vscode-languageclient';

import { RelatedFiles } from './feature/relatedFiles';
import { getUserInputCommand } from './feature/userInput/userInput';

let client: LanguageClient;

export function activate(context: ExtensionContext) {
export async function activate(context: ExtensionContext) {
// The server is implemented in node
const serverModule = context.asAbsolutePath(
path.join('server', 'out', 'server.js')
Expand Down Expand Up @@ -95,12 +96,34 @@ export function activate(context: ExtensionContext) {
client.start();

/** ISSUE-VaNcstW0 */
// await client.onReady();
await client.onReady();
// User Information
// client.onRequest('warning:no-tsconfig-found', () => {
// const message = '[Aurelia] No tsconfig.json found. Please visit the [Usage section](https://github.com/aurelia/vscode-extension#1-usage) for more information.';
// vscode.window.showWarningMessage(message, 'Close')
// })

client.onRequest('get-component-name', () => {
getUserInputCommand(context);

var editor = window.activeTextEditor;
/* prettier-ignore */ console.log('>>>> _ >>>> ~ file: extension.ts ~ line 115 ~ editor?.selections', editor?.selections)

// const message = '[Aurelia] No tsconfig.json found. Please visit the [Usage section](https://github.com/aurelia/vscode-extension#1-usage) for more information.';
// window.showWarningMessage(message, 'Close')
});

client.onRequest('get-editer-selections', () => {
var editor = window.activeTextEditor;
const documentText = editor?.document.getText();
/* prettier-ignore */ console.log('>>>> _ >>>> ~ file: extension.ts ~ line 120 ~ documentText', documentText)
return {
documentText,
documentUri: editor?.document.uri.toString(),
documentPath: editor?.document.fileName,
selections: editor?.selections,
};
});
}

export function deactivate(): Thenable<void> | undefined {
Expand Down
Loading

0 comments on commit 6ea041c

Please sign in to comment.