Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
prantlf committed Dec 14, 2020
0 parents commit 1aa2556
Show file tree
Hide file tree
Showing 14 changed files with 298 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Set default behavior to automatically normalize line endings.
* text=auto

69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release

on:
push:
tags:
- 'v[0-9]+.*'

jobs:
create_release:
name: Create Release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
version: ${{ steps.get_version.outputs.version }}
steps:
- name: Version
id: get_version
run: echo "::set-output name=version::$(echo "${{ github.ref }}" | sed 's/[^.0-9]\+//')"
- name: Checkout
uses: actions/checkout@v2
- name: Describe
run: |
CHANGELOG=$(awk -v ver=${{ steps.get_version.outputs.version }} '/## / { if (p) { exit }; if ($2 == ver) { p=1; next } } p' CHANGELOG.md)
echo "CHANGELOG<<EOF" >> $GITHUB_ENV
echo "$CHANGELOG" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
- name: Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
body: ${{ env.CHANGELOG }}

publish_assets:
name: Upload Package
runs-on: ubuntu-latest
needs: create_release
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install and Build
run: npm ci
- name: Package
run: |
npx vsce package
echo "$(npx hasha-cli -a sha256 < javascript-oldies-${{ needs.create_release.outputs.version }}.vsix) javascript-oldies-${{ needs.create_release.outputs.version }}.vsix" > javascript-oldies-${{ needs.create_release.outputs.version }}.vsix.sha256
- name: Upload Archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: javascript-oldies-${{ needs.create_release.outputs.version }}.vsix
asset_path: javascript-oldies-${{ needs.create_release.outputs.version }}.vsix
asset_content_type: application/octet-stream
- name: Upload Checksum
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: javascript-oldies-${{ needs.create_release.outputs.version }}.vsix.sha256
asset_path: javascript-oldies-${{ needs.create_release.outputs.version }}.vsix.sha256
asset_content_type: text/plain
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Test

on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize

jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install and Build
run: npm ci
- name: Test
run: npx vsce package
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
.eslintcache
.nyc_output
coverage
node_modules
17 changes: 17 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// A launch configuration that launches the extension inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
}
]
}
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true,
"**/node_modules": true,
"**/package-lock.json": true
}
}
7 changes: 7 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.DS_Store
.editorconfig
.git
.gitattributes
.gitignore
.github
.vscode
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Changelog

## 1.0.0

Initial release.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Ferdinand Prantl

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# JavaScript Oldies for Visual Studio Code

[<img src=https://raw.githubusercontent.com/prantlf/vscode-javascript-oldies/master/logo.png height=20 alt=Logo>][from the marketplace]
[![license](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)
[![Build Status](https://github.com/prantlf/vscode-javascript-oldies/workflows/Test/badge.svg)](https://github.com/prantlf/vscode-javascript-oldies/actions)

> Collects extensions for [Visual Studio Code] to help maintaining JavaScript projects written with old frameworks and tools.
Do you have to code with old technologies like AMD, Grunt, JSHint or Karma? Do you have to document with JSDoc? Don't despair, you will still be able to use the modern VS Code efficiently :-) Check out the great extensions below:

* [Debugger for Chrome](#debugger-for-chrome)
* [Document This](#document-this)
* [Fold on Open](#fold-on-open)
* [JSDoc Live Preview](#jsdoc-live-preview)
* [JSHint](#jshint)
* [Karma Problem Matchers](#karma-problem-matchers)
* [Require Module Support](#require-module-support)
* [Task Explorer](#task-explorer)
* [TODO Tree](#todo-tree)

## Installation

Install this extension to your Visual Studio Code [from the marketplace], or download a specific version of a [released package] and install it from the file.

## Debugger for Chrome

Debug an application or [Karma tests](https://github.com/prantlf/vscode-karma-problem-matchers#debug) that run in the browser. Just add a launcher, place breakpoints and hit F5. It will not work right away - you will need to reload the debugging session by clicking on the green circling arrow once the test finish, so that the breakpoints get hit. Enable just the tests that you want to debug (by using `fdescribe`, for example) to be more efficient.

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome).

## Document This

Place the cursor on the name of a class or function and hit `Ctrl+Alt+D` twice. (Yes, hit the `D` twice.) Continue writing the documentation comment. If you want describe an object member, place the cursor on the right side of the colon in the member declaration.

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=oouo-diogo-perdigao.docthis).

## Fold on Open

Be rid of the endless scrolling over the "green lines", when you want to inspect the code. [Collapse all block comments automatically](https://github.com/prantlf/vscode-fold-on-open#fold-on-open), when you open a source file.

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=prantlf.fold-on-open).

## JSDoc Live Preview

If you bind the keys `Shift+Alt+V` the command "JSDoc: Show Preview" command, you will be able to open the preview panel quickly like with `Shift+Cmd+V` for Markdown.

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=Perkovec.jsdoc-live-preview).

## JSHint

Make sure that you install `jshint` to `node_modules` in your project and configure it in the `.jshintrc` file.

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=dbaeumer.jshint).

## Karma Problem Matchers

Observe the failed tests in the Problems window. [Select the problem matcher](https://github.com/prantlf/vscode-karma-problem-matchers#configuration) for your test framework, reporter and browser in your [task running Karma](https://github.com/prantlf/vscode-karma-problem-matchers#run).

Also, if breakpoints do not get hit during debugging, make sure that you selected the proper problem matcher. If you see an animation waiting for the pre-launch task to finish, the expected text pattern in the terminal was not detected.

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=prantlf.karma-problem-matchers).

## Require Module Support

Jump to the module where the selected class or function is declared. [Configure](https://github.com/anacierdem/vscode-requirejs#settings) the `baseURL` path to your module sources and optionally the RequireJS config file. Then enjoy the jump by hitting F12 and F4. (The "Go To Declaration" command will offer you the place where the imported argument is declared too.)

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=lici.require-js).

## TODO Tree

If you still hope that the management will care about fixing the lots of `TODO` and `FIXME` comments... At least you can inspect them in a list or tree in a sidebar opened from the action toolbar.

See also the [marketplace page](https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree).

## License

Copyright (c) 2020 Ferdinand Prantl

Licensed under the MIT license.

The logo was based on an [original icon](https://www.iconfinder.com/icons/998217/announcement_audio_loud_mic_microphone_radio_studio_icon) published by [Chamestudio Pvt Ltd](https://www.iconfinder.com/chamedesign) under the [Creative Commons Attribution 3.0 Unported (CC BY 3.0)](https://creativecommons.org/licenses/by/3.0/) license. Thank you!

[Visual Studio Code]: https://code.visualstudio.com/
[from the marketplace]: https://marketplace.visualstudio.com/items?itemName=prantlf.javascript-oldies
[released package]: https://github.com/prantlf/vscode-javascript-oldies/releases
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions package-lock.json

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

40 changes: 40 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"name": "javascript-oldies",
"displayName": "JavaScript Oldies",
"description": "Collects extensions to help maintaining JavaScript projects written with old frameworks and tools.",
"version": "1.0.0",
"icon": "logo.png",
"author": "Ferdinand Prantl <prantlf@gmail.com> (http://prantl.tk/)",
"repository": {
"type": "git",
"url": "https://github.com/prantlf/vscode-javascript-oldies.git"
},
"homepage": "https://github.com/prantlf/vscode-javascript-oldies#readme",
"bugs": "https://github.com/prantlf/vscode-javascript-oldies/issues",
"license": "MIT",
"keywords": [
"vscode-extension",
"vscode-extensionpack",
"javascript",
"old-javascript",
"old",
"vscode"
],
"publisher": "prantlf",
"engines": {
"vscode": "^1.52.0"
},
"categories": [
"Extension Packs"
],
"extensionPack": [
"dbaeumer.jshint",
"gruntfuggly.todo-tree",
"lici.require-js",
"msjsdiag.debugger-for-chrome",
"oouo-diogo-perdigao.docthis",
"perkovec.jsdoc-live-preview",
"prantlf.fold-on-open",
"prantlf.karma-problem-matchers"
]
}

0 comments on commit 1aa2556

Please sign in to comment.