-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Divide the monolithic extension into modular extensions
The below Extensions are created with this commit: * qt-core * qt-official * qt-ui qt-core This extension is the core extension for the Qt extensions. It provides the basic functionalities for the other extensions to work. * It handles the communication between the other extensions. * It provides the basic functionalities and common features for the other extensions. * The all other extensions depend on this extension. qt-ui This extension provides the UI functionalities. * It communicates with the `qt-core` extension to get information about the Qt Widget Designer. * It provides syntax highlighting for `.ui` files. qt-official This extension has the rest of the previous monolithic extension functionalities. It should be divided into more extensions in the future. This commit implements: * Common functionalities are moved from `qt-official` to `qt-core`. * `qt-lib` is implemented as a npm module to gather the common code. * Static analysis tools for every extension are added. * Updated all `package.json` files to reflect the changes. * `ci-scripts` is implemented to run the static analysis tools and tests. * The `common` is created to gather the common code for tools. * Extension packs are updated. * The `ThirdPartyNotices.txt` files are generated for every extension. * The `README.md` files are updated to reflect the changes. * `.vscode/launch.json`, `.vscode/extensions.json`, and `.vscode/tasks.json` are updated. Change-Id: Iac9b7e071275e92cdfbb3a47fba24d3ba8e41c89 Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: Leena Miettinen <[email protected]>
- Loading branch information
1 parent
0324410
commit c45fc76
Showing
157 changed files
with
21,709 additions
and
1,128 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/out/ | ||
**/out/ | ||
dist | ||
node_modules | ||
/.vscode-test/ | ||
|
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"recommendations": ["dbaeumer.vscode-eslint", "ms-vscode.cmake-tools"] | ||
"recommendations": ["dbaeumer.vscode-eslint", "ms-vscode.vscode-typescript-next"] | ||
} |
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 |
---|---|---|
@@ -1,60 +1,30 @@ | ||
# Development Guide | ||
|
||
## Build on the command line | ||
## Note | ||
|
||
- To install dependencies, run `npm ci` | ||
- To compile, run `npm run compile` | ||
All of the commands mentioned below should be run from the `ci-scripts` directory of the project. | ||
|
||
## Running the extension from VS Code | ||
## Build on the command line | ||
|
||
* Press `F5` to open a new window with your extension loaded. | ||
* You can relaunch the extension from the debug toolbar after changing code. | ||
* You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load | ||
your changes. | ||
- Since the extension are dependent on `qt-lib`, it should be built first. | ||
- To build `qt-lib`, run `npm run ci:qt-lib && npm run compile:qt-lib` | ||
- To build other extensions, run `npm run ci:all && npm run compile:all` | ||
- To build a specific extension, run `npm run ci:<extension_name> && npm run compile:<extension_name>` | ||
|
||
## Pre-Commit | ||
|
||
Before every commit, the following commands should be run: | ||
|
||
- To trigger [Prettier](https://prettier.io/), run `npm run prettier` | ||
- To trigger [ESLint](https://eslint.org/), run `npx eslint .` or to fix | ||
automatically, run `npx eslint . --fix` | ||
|
||
or | ||
|
||
- To trigger [Prettier](https://prettier.io/), [ESLint](https://eslint.org/) and | ||
build together, run `npm run pretest` | ||
Before every commit, `npm run ci-lint:all` should be run. | ||
|
||
## Package | ||
|
||
- To generate installable package, run `npm run package`. This will generate a | ||
`.vsix` file in the `out` folder. | ||
- To generate installable packages, run `npm run package:all`. This will generate | ||
`.vsix` files in the each extension's `out` directory. | ||
- Also `npm run package:<extension_name>` can be used to generate the package for a specific extension. | ||
|
||
## Install | ||
|
||
- To install the package to vscode, run `code --install-extension <vsix file generated in the previous step>` | ||
|
||
## Run tests on the command line | ||
|
||
- To run unit tests, run `npm run unitTests` | ||
- To run integration tests, run `npm run integrationTests -- --qt_path="<qt_installation>"` | ||
- To run all tests, run `npm run allTests -- --qt_path="<qt_installation>"` | ||
|
||
## Run tests from Visual Studio Code | ||
|
||
* Open the debug viewlet (`Ctrl+Shift+D` or `Cmd+Shift+D` on Mac) and from the launch configuration | ||
dropdown pick `Extension Tests`. | ||
* Press `F5` to run the tests in a new window with your extension loaded. | ||
* See the output of the test result in the debug console. | ||
|
||
## Further reading | ||
|
||
* Explore the VS Code API by inspecting the file`node_modules/@types/vscode/index.d.ts`. | ||
* [Follow UX guidelines](https://code.visualstudio.com/api/ux-guidelines/overview) to create | ||
extensions that seamlessly integrate with VS Code's native interface and patterns. | ||
- To install all the extensions, run `npm run install:all` or `npm run install:<extension_name>` to install a specific extension. | ||
|
||
## Dependencies | ||
|
||
- [npm](https://www.npmjs.com/) | ||
- [Prettier](https://prettier.io/) | ||
- [ESLint](https://eslint.org/) |
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 @@ | ||
.eslintrc.cjs |
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,11 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
extends: ['../common/.eslintrc.cjs'], | ||
plugins: ['@typescript-eslint'], | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: true, | ||
project: 'tsconfig.json', | ||
tsconfigRootDir: __dirname | ||
} | ||
}; |
Oops, something went wrong.