-
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.
- Loading branch information
Showing
41 changed files
with
3,854 additions
and
990 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
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,27 @@ | ||
name: Run unit tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Use specified Node.js version | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: .nvmrc | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Compile | ||
run: yarn compile | ||
|
||
- name: Run linter | ||
run: yarn lint | ||
|
||
- name: Run unit tests | ||
run: yarn 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,3 @@ | ||
/extension/build/ | ||
/extension/dist/ | ||
/extension/types/ | ||
/extension/work/ | ||
/.pnp.* | ||
/.yarn/* | ||
!/.yarn/patches/ | ||
|
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 +1 @@ | ||
lts/gallium | ||
lts/hydrogen |
60 changes: 60 additions & 0 deletions
60
.redport/cookiecutter_replay/cookiecutter-vscode-extension.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,60 @@ | ||
{ | ||
"cookiecutter": { | ||
"extension_display_name": "Packaging", | ||
"extension_slug": "packaging", | ||
"project_slug": "vscode-packaging2", | ||
"extension_description": "", | ||
"extension_license": "Apache-2.0", | ||
"vscode_engine_min_version_tuple": "1.92", | ||
"contribute_language": "y", | ||
"first_language_display_name": "PKGBUILD (AUR)", | ||
"first_language_slug": "aur-pkgbuild", | ||
"first_language_filename_pattern": "PKGBUILD", | ||
"first_language_scope_group": "source", | ||
"dedicated_library_workspace": "y", | ||
"author_full_name": "Claudia Pellegrino", | ||
"copyright_holder_full_name": "Claudia Pellegrino", | ||
"publish_on_visual_studio_marketplace": "y", | ||
"marketplace_publisher_id": "claui", | ||
"github_username": "claui", | ||
"install_dependencies_now": "y", | ||
"_copy_without_render": [ | ||
".redport/patches/*.patch" | ||
], | ||
"_extensions": [ | ||
"local_extensions.CustomFunctionsExtension", | ||
"local_extensions.CustomGlobalsExtension" | ||
], | ||
"_license_filename": "", | ||
"_template": "vscode", | ||
"_output_dir": "REDACTED", | ||
"_repo_dir": "REDACTED", | ||
"_checkout": null | ||
}, | ||
"_cookiecutter": { | ||
"extension_display_name": "", | ||
"extension_slug": "{{ cookiecutter.extension_display_name.lower().replace(' ', '-').replace('_', '-') }}", | ||
"project_slug": "vscode-{{ cookiecutter.extension_slug }}", | ||
"extension_description": "", | ||
"extension_license": [ | ||
"Apache-2.0", | ||
"Proprietary" | ||
], | ||
"vscode_engine_min_version_tuple": "1.92", | ||
"contribute_language": "y", | ||
"first_language_display_name": "{{ cookiecutter.extension_display_name }}", | ||
"first_language_slug": "{{ cookiecutter.first_language_display_name.lower().replace(' ', '-').replace('_', '-') }}", | ||
"first_language_filename_pattern": "*.{{ cookiecutter.first_language_slug }}", | ||
"first_language_scope_group": [ | ||
"source", | ||
"text" | ||
], | ||
"dedicated_library_workspace": "y", | ||
"author_full_name": "Claudia Pellegrino", | ||
"copyright_holder_full_name": "{{ cookiecutter.author_full_name }}", | ||
"publish_on_visual_studio_marketplace": "y", | ||
"marketplace_publisher_id": "", | ||
"github_username": "claui", | ||
"install_dependencies_now": "y" | ||
} | ||
} |
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,14 @@ | ||
{ | ||
"upstream": { | ||
"type": "cookiecutter-template", | ||
"source": "https://github.com/claui/cookiecutter-vscode-extension.git", | ||
"commit": "783ab0e6758909b9c511edf59d0fec89fcf0093e", | ||
"replay": "cookiecutter_replay/cookiecutter-vscode-extension.json", | ||
"patches": [ | ||
"patches/disable-install-step.patch" | ||
], | ||
"nextPatches": [ | ||
"patches/disable-install-step.patch" | ||
] | ||
} | ||
} |
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,90 @@ | ||
diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py | ||
index cd50f86..50c8cb4 100644 | ||
--- a/hooks/post_gen_project.py | ||
+++ b/hooks/post_gen_project.py | ||
@@ -1,85 +1,3 @@ | ||
-import logging | ||
-import os | ||
import shutil | ||
-import subprocess | ||
-import sys | ||
- | ||
-from cookiecutter.config import get_user_config | ||
- | ||
-logger = logging.getLogger(__name__) | ||
- | ||
-logger.info('Saving replay file for redport') | ||
-config_dict = get_user_config() | ||
-template_name = '{{ cookiecutter._repo_dir.split('/')[-1] }}' | ||
-target_replay_path = Path('.redport') / 'cookiecutter_replay' | ||
-target_replay_path.mkdir(exist_ok=True) | ||
-shutil.copy( | ||
- (PurePath(config_dict['replay_dir']) / template_name).with_suffix('.json'), | ||
- target_replay_path, | ||
-) | ||
|
||
shutil.rmtree('licenses') | ||
- | ||
-{%- if cookiecutter.contribute_language == "n" %} | ||
-shutil.rmtree('extension/examples') | ||
-os.remove('extension/share/language/{{ cookiecutter.first_language_slug }}.tmLanguage.json') | ||
-os.remove('extension/share/language/language-configuration.json') | ||
-{%- endif %} | ||
- | ||
-{%- if cookiecutter.dedicated_library_workspace == "n" %} | ||
-shutil.rmtree('./{{ cookiecutter.extension_slug }}') | ||
-{%- endif %} | ||
- | ||
-git_commands = [ | ||
- 'git init -q', | ||
- 'git add .', | ||
- {%- if cookiecutter.contribute_language == "y" %} | ||
- 'git reset -q extension/examples extension/share/language', | ||
- 'git add -N extension/examples extension/share/language', | ||
- {%- endif %} | ||
- 'git reset -q extension/README.md', | ||
- 'git add -N extension/README.md', | ||
- {%- if cookiecutter.dedicated_library_workspace == "y" %} | ||
- 'git reset -q {{ cookiecutter.extension_slug }}/src {{ cookiecutter.extension_slug }}/test', | ||
- 'git add -N {{ cookiecutter.extension_slug }}/src {{ cookiecutter.extension_slug }}/test', | ||
- {%- endif %} | ||
-] | ||
- | ||
-for git_command in git_commands: | ||
- subprocess.run( | ||
- git_command, check=True, shell=True, stdout=sys.stderr, | ||
- ) | ||
- | ||
-{%- if cookiecutter.install_dependencies_now == "y" %} | ||
-def sysexit_formatted(message: str) -> None: | ||
- width = max((len(line) for line in message)) | ||
- print('', width * '-', *message, width * '-', | ||
- file=sys.stderr, sep='\n') | ||
- sys.exit() | ||
- | ||
-install_commands = [ | ||
- 'yarn init -2', | ||
- 'git checkout package.json', | ||
- 'yarn set version 4', | ||
- 'yarn plugin import https://go.mskelton.dev/yarn-outdated/v4', | ||
- 'yarn install', | ||
- 'yarn clean-install', | ||
- 'git add .yarn .yarnrc.yml package.json yarn.lock', | ||
-] | ||
- | ||
-try: | ||
- for install_command in install_commands: | ||
- subprocess.run( | ||
- install_command, check=True, shell=True, stdout=sys.stderr, | ||
- ) | ||
-except subprocess.CalledProcessError as e: | ||
- sysexit_formatted([ | ||
- f'Shell command failed with exit code {e.returncode}.', | ||
- 'Go to the {{ cookiecutter.project_slug }}' | ||
- ' directory and re-run:', | ||
- *[ | ||
- f' {command}' | ||
- for command in ['nvm use'] + install_commands | ||
- ], | ||
- ]) | ||
-{%- endif %} |
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
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.