Skip to content

Commit

Permalink
Merge pull request #37 from snipsnapdev/vscode-extension
Browse files Browse the repository at this point in the history
feat: add vscode extension to monorepo
  • Loading branch information
lnikell authored May 16, 2021
2 parents 47b9a62 + da56d58 commit 68a59c0
Show file tree
Hide file tree
Showing 20 changed files with 2,529 additions and 0 deletions.
25 changes: 25 additions & 0 deletions templates/vscode-extension/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"env": {
"browser": false,
"commonjs": true,
"es6": true,
"node": true,
"mocha": true
},
"parserOptions": {
"ecmaVersion": 2018,
"ecmaFeatures": {
"jsx": true
},
"sourceType": "module"
},
"rules": {
"no-const-assign": "warn",
"no-this-before-super": "warn",
"no-undef": "warn",
"no-unreachable": "warn",
"no-unused-vars": "warn",
"constructor-super": "warn",
"valid-typeof": "warn"
}
}
5 changes: 5 additions & 0 deletions templates/vscode-extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
node_modules
.vscode-test/
*.vsix
.DS_Store
.vscode/snipsnap.code-snippets
7 changes: 7 additions & 0 deletions templates/vscode-extension/.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"
]
}
26 changes: 26 additions & 0 deletions templates/vscode-extension/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// 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": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
]
},
{
"name": "Extension Tests",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/test/suite/index"
]
}
]
}
9 changes: 9 additions & 0 deletions templates/vscode-extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vscode/**
.vscode-test/**
test/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/jsconfig.json
**/*.map
**/.eslintrc.json
74 changes: 74 additions & 0 deletions templates/vscode-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Change Log

All notable changes to the "Snipsnap Templates" extension will be documented in this file.

Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.

## [Unreleased]

## [0.3.6] - 03-03-21, Backendy

- integrate with the backend

## [0.3.5] - 02-03-21, Goodbye Mustache, Welcome Handlebars

- migrate from Mustache to Handlebars

## [0.3.4] - 02-03-21, Ignore machine

- add .DS_Store to ignore files

## [0.3.3] - 02-03-21, Mustache power 2.0

- add string functions for template system: `toCamelCase`, `toSnakeCase`, `toKebabCase`, `toUpperCase`, `toLowerCase`, `toPascalCase`

## [0.3.2] - 01-03-21, Skipping picking

- add skipping picking template if there is only one
- add an error message if there are no templates found

## [0.3.1] - 01-03-21, The Renamer

BREAKING CHANGES:

- renamed `snipsnap-templator` folder to `templates`
- renamed `.snipsnap-templator.config.json` to `.snipsnap.json`
- renamed `Run Templator` to `Create from Template`
- renamed extension to `Snipsnap Templates`
- renamed `variableName` in `prompts` to `variable`

## [0.3.0] - 26-02-21, Monk

BREAKING CHANGES:

- templates folder changes from .vscode/snipsnap/templates to .vscode/snipsnap-templator
- files now should lay right in the root of template folder, no need to create one more "template" folder inside template folder :smile:

## [0.2.0] - 16-02-21, One Patch Man

- added support for deeply nested template structures

Basic local flow is on track! :tada:

## [0.1.3] - 16-02-21, Beggar

- added user-defined prompts

## [0.1.2] - 16-02-21, Mustache power

- added Mustache lib for handling prompts
- reorganized extensions structure
- some @TODO notes

## [0.1.1] - 12-02-21, Take care

- added basic error handlers
- improved user prompts UX

## [0.1.0] - 12-02-21, Aquadisco

- Added core functionality

## [0.0.1] - 12-02-21, So it begins

- Boilerplate
29 changes: 29 additions & 0 deletions templates/vscode-extension/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Snipsnap Templates

## To Do

- [ ] Features
- [ ] Backend integration
- [ ] Make `message` in `prompts` optional with fallback message?
- [ ] Default value for `variable` in prompts?
- [ ] Refactoring
- [ ] move `getDirStructure` and `buildDirStructure` from `utils` since these functions are not utils, they are core functions
- [ ] remove passing `onNameCopy` and `onContentCopy` to `getDirStructure` since they are the same now
- [ ] move registration of helpers to separate file
- [ ] handle all possible errors so extension wouldn't crash silently
- [ ] move extension to TypeScript?
- [ ] add test cases for all possible scenarios
- [ ] move all possible values to constants, e.g. `prompts`, `prompts.message` and `prompts.variable`
- [ ] Flow
- [ ] set up ESLint config
- [ ] set up Prettier?
- [ ] set up MarkdownLint?
- [ ] set up Husky in order to run checks before creating a commit
- [ ] set up Conventional Commits
- [ ] set up Conventional Changelog
- [ ] set up repository in order to:
- [ ] get at least one approve in order to merge Pull Request
- [ ] run checks (ESLint, Prettier, Jest, Coverage) for every Pull Request in order to merge Pull Request
- [ ] prevent ability to push to master branch
- [ ] show difference in bundle size in Pull Request?
- [ ] Update dependencies to latest versions?
14 changes: 14 additions & 0 deletions templates/vscode-extension/jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"checkJs": true, /* Typecheck .js files. */
"lib": [
"es6"
],
"baseUrl": "src",
},
"exclude": [
"node_modules"
]
}
Loading

0 comments on commit 68a59c0

Please sign in to comment.