Skip to content

Commit

Permalink
feat: add working extension
Browse files Browse the repository at this point in the history
  • Loading branch information
bradzacher committed Oct 5, 2020
1 parent ad3bfa3 commit 4df93b4
Show file tree
Hide file tree
Showing 20 changed files with 5,605 additions and 1 deletion.
48 changes: 48 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"version": "0.1",
"language": "en",
"ignorePaths": [
"**/coverage/**",
"**/node_modules/**",
"**/dist/**",
"**/fixtures/**",
"**/**/CHANGELOG.md",
"**/**/CONTRIBUTORS.md",
"**/**/ROADMAP.md",
"**/*.{json,snap}",
".cspell.json",
"yarn.lock",
".github/workflows/**",
".vscode/*.json"
],
"dictionaries": [
"typescript",
"softwareTerms",
"node",
"en_US",
"npm",
"misc",
"filetypes"
],
"ignoreRegExpList": [
"/```[\\w\\W]*?```/",
"/~~~[\\w\\W]*?~~~/",
"/``[\\w\\W]*?``/",
"/`[^`]*`/",
"/\\.\\/docs\\/rules\\/[^.]*.md/",
"/@typescript-eslint\\/[a-z-]+/",
"/\\.all-contributorsrc/",
"/TS[^\\s]+/",
"\\(#.+?\\)"
],
"overrides": [
{
"filename": "**/*.{ts,js}",
"ignoreRegExpList": ["/@[a-z]+/", "/#(end)?region/"],
"includeRegExpList": [
"/\\/\\*[\\s\\S]*?\\*\\/|([^\\\\:]|^)\\/\\/.*$/",
"/(\\/\\/[^\\n\\r]*[\\n\\r]+)/"
]
}
]
}
24 changes: 24 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# top-most EditorConfig file
root = true

# space indentation
[*]
# cleanup trailing spaces on save
trim_trailing_whitespace = true
# Unix-style newlines with a newline ending every file
end_of_line = lf
insert_final_newline = true
# spaces for all
indent_style = space
indent_size = 2
tab_width = 2

# yaml files need spaces
[*.yml]
indent_size = 2
indent_style = space

# makefiles need tabs
[Makefile]
indent_size = 2
indent_style = tab
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.eslintrc.js
58 changes: 58 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/**@type {import('eslint').Linter.Config} */
module.exports = {
extends: ['brad'],
parserOptions: {
project: './tsconfig.json',
tsconfigRootDir: __dirname,
},
rules: {
'no-void': 'off',
'import/extensions': 'off',
'@typescript-eslint/naming-convention': [
'error',
// basic camel case style
{
selector: 'default',
format: ['camelCase'],
},
{
selector: 'variable',
format: ['camelCase', 'UPPER_CASE'],
},
{
selector: 'parameter',
format: ['camelCase'],
// to allow unused parameters
leadingUnderscore: 'allow',
},

{
selector: [
'class',
'interface',
'typeAlias',
'enum',
'typeParameter',
'enumMember',
],
format: ['PascalCase'],
},

// enforce interfaces _don't_ start with an I
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: false,
},
},
// enforce that generics start with a T
{
selector: 'typeParameter',
format: ['PascalCase'],
prefix: ['T'],
},
],
},
};
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next

dist
tsconfig.build.tsbuildinfo
1 change: 1 addition & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"eslint-config-brad/prettier"
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint"
]
}
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// A launch configuration that launches the extension inside a new window
{
"version": "0.1.0",
"configurations": [
{
"name": "Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/test" ],
"stopOnEntry": false
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place your settings in this file to overwrite default and user settings.
{
}
15 changes: 15 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.vscode/**
.vscode-test/**
out/test/**
src/**
.gitignore
vsc-extension-quickstart.md
**/tsconfig.json
**/tslint.json
**/*.map
**/*.ts
.cspell.json
.eslintignore
.prettierrc.json
tsconfig.build.json
tsconfig.build.tsbuildinfo
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 Brad Zacher

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.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# vscode-copy-filename
Simple VS Code plugin that allows you to copy file name or folder name to clipboard from sidebar or opened file label.

[![version](https://vsmarketplacebadge.apphb.com/version-short/bradzacher.copy-filename.svg)](https://marketplace.visualstudio.com/items?itemName=bradzacher.copy-filename)
[![installs](https://vsmarketplacebadge.apphb.com/installs-short/bradzacher.copy-filename.svg)](https://marketplace.visualstudio.com/items?itemName=bradzacher.copy-filename)
[![rating](https://vsmarketplacebadge.apphb.com/rating-short/bradzacher.copy-filename.svg)](https://marketplace.visualstudio.com/items?itemName=bradzacher.copy-filename)

This extension adds the following:

1. File Explorer right click menu items which allow you to copy one (or more) filenames with (or without) the extension:

![copy from explorer](https://raw.githubusercontent.com/bradzacher/vscode-copy-filename/main/copy-from-explorer.gif)

1. Editor title right click menu items which allow you to copy the filename with (or without) the extension:

![copy from tab](https://raw.githubusercontent.com/bradzacher/vscode-copy-filename/main/copy-from-tab.gif)

1. Command pallette commands so you can access single-file commands quickly, or assign keyboard shortcuts to them:

![copy command](https://raw.githubusercontent.com/bradzacher/vscode-copy-filename/main/copy-command.gif)
Binary file added copy-command.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added copy-from-explorer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added copy-from-tab.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4df93b4

Please sign in to comment.