diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..b95e530 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,16 @@ +on: + push: + branches: + - master +name: Deploy Extension +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: npm install + - uses: lannonbr/vsce-action@master + with: + args: 'publish -p $VSCE_TOKEN' + env: + VSCE_TOKEN: ${{ secrets.VSCE_TOKEN }} diff --git a/README.md b/README.md index 2e25343..1e49220 100644 --- a/README.md +++ b/README.md @@ -1,20 +1,26 @@ -# alias-resolver README +# alias-resolver -This is the README for your extension "alias-resolver". After writing up a brief description, we recommend including the following sections. +The main idea of this extension is to automatically pick your alias configuration, and resolve all these aliases throughout the code. VSCode has a way to do this by defining a `jsconfig.json` file, but this means that you have to make the file and in case you change the aliases you need to modify them in at least two places. + +This extension is heavily inspired on webstorm's behavior, it reads the webpack configuration, and resolve the aliases based on this. + +What if you don't use webpack? Well, this extension lets you define which file you want it to read. So you could use rollup for instance. ## Features -Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file. +Imagine this webpack configuration + +![Route resolving](images/webpack-config.png) -For example if there is an image subfolder under your extension project workspace: +and look at this React component example -\!\[feature X\]\(images/feature-x.png\) +![Route resolving](images/some-js-example.png) -> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow. +Most probably you would like your editor to know where that route to that file is. So you can autocomplete, or even navigate to the different folders or the file. This extension will resolve that route for you. -## Requirements +It is also a must that vscode autocompletes this kind of routes when we are typing an import. This extension will do that too! -If you have any requirements or dependencies, add a section describing those and how to install and configure them. +![Autocomplete](images/autocomplete.png) ## Extension Settings @@ -24,42 +30,4 @@ For example: This extension contributes the following settings: -* `myExtension.enable`: enable/disable this extension -* `myExtension.thing`: set to `blah` to do something - -## Known Issues - -Calling out known issues can help limit users opening duplicate issues against your extension. - -## Release Notes - -Users appreciate release notes as you update your extension. - -### 1.0.0 - -Initial release of ... - -### 1.0.1 - -Fixed issue #. - -### 1.1.0 - -Added features X, Y, and Z. - ------------------------------------------------------------------------------------------------------------ - -## Working with Markdown - -**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts: - -* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux) -* Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux) -* Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets - -### For more information - -* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown) -* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/) - -**Enjoy!** +- `alias-resolver.file`: File where your alias definition is. diff --git a/images/autocomplete.png b/images/autocomplete.png new file mode 100644 index 0000000..e70f9b8 Binary files /dev/null and b/images/autocomplete.png differ diff --git a/images/some-js-example.png b/images/some-js-example.png new file mode 100644 index 0000000..16c9fcd Binary files /dev/null and b/images/some-js-example.png differ diff --git a/images/webpack-config.png b/images/webpack-config.png new file mode 100644 index 0000000..51ec6aa Binary files /dev/null and b/images/webpack-config.png differ diff --git a/package.json b/package.json index 3f7b26f..2bcca2b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "alias-resolver", "displayName": "alias-resolver", "description": "Automatically resolve webpack aliases", - "publisher": "mario-cadenas", + "publisher": "mariocadenas", "version": "0.0.1", "engines": { "vscode": "^1.44.0" @@ -13,6 +13,10 @@ "activationEvents": [ "*" ], + "repository": { + "type": "git", + "url": "https://github.com/MarioCadenas/vscode-alias-resolver" + }, "main": "./extension.js", "contributes": { "configuration": {