Skip to content

Commit 8fdc599

Browse files
author
Nicolas Carlo
committed
Init project with POC
0 parents  commit 8fdc599

21 files changed

+6420
-0
lines changed

.adr-dir

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
adrs

.gitignore

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
out
2+
node_modules
3+
.vscode-test/
4+
*.vsix
5+
6+
# Created by https://www.gitignore.io/api/node,visualstudiocode
7+
# Edit at https://www.gitignore.io/?templates=node,visualstudiocode
8+
9+
### Node ###
10+
# Logs
11+
logs
12+
*.log
13+
npm-debug.log*
14+
yarn-debug.log*
15+
yarn-error.log*
16+
lerna-debug.log*
17+
18+
# Diagnostic reports (https://nodejs.org/api/report.html)
19+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
20+
21+
# Runtime data
22+
pids
23+
*.pid
24+
*.seed
25+
*.pid.lock
26+
27+
# Directory for instrumented libs generated by jscoverage/JSCover
28+
lib-cov
29+
30+
# Coverage directory used by tools like istanbul
31+
coverage
32+
33+
# nyc test coverage
34+
.nyc_output
35+
36+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
37+
.grunt
38+
39+
# Bower dependency directory (https://bower.io/)
40+
bower_components
41+
42+
# node-waf configuration
43+
.lock-wscript
44+
45+
# Compiled binary addons (https://nodejs.org/api/addons.html)
46+
build/Release
47+
48+
# Dependency directories
49+
node_modules/
50+
jspm_packages/
51+
52+
# TypeScript v1 declaration files
53+
typings/
54+
55+
# Optional npm cache directory
56+
.npm
57+
58+
# Optional eslint cache
59+
.eslintcache
60+
61+
# Optional REPL history
62+
.node_repl_history
63+
64+
# Output of 'npm pack'
65+
*.tgz
66+
67+
# Yarn Integrity file
68+
.yarn-integrity
69+
70+
# dotenv environment variables file
71+
.env
72+
.env.test
73+
74+
# parcel-bundler cache (https://parceljs.org/)
75+
.cache
76+
77+
# next.js build output
78+
.next
79+
80+
# nuxt.js build output
81+
.nuxt
82+
83+
# vuepress build output
84+
.vuepress/dist
85+
86+
# Serverless directories
87+
.serverless/
88+
89+
# FuseBox cache
90+
.fusebox/
91+
92+
# DynamoDB Local files
93+
.dynamodb/
94+
95+
### VisualStudioCode ###
96+
.vscode/*
97+
!.vscode/settings.json
98+
!.vscode/tasks.json
99+
!.vscode/launch.json
100+
!.vscode/extensions.json
101+
102+
### VisualStudioCode Patch ###
103+
# Ignore all local history of files
104+
.history
105+
106+
# End of https://www.gitignore.io/api/node,visualstudiocode

.vscode/extensions.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": ["ms-vscode.vscode-typescript-tslint-plugin"]
5+
}

.vscode/launch.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// A launch configuration that compiles the extension and then opens it inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Run Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"runtimeExecutable": "${execPath}",
13+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
14+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
15+
"preLaunchTask": "npm: watch"
16+
}
17+
]
18+
}

.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Place your settings in this file to overwrite default and user settings.
2+
{
3+
"files.exclude": {
4+
"out": false // set this to true to hide the "out" folder with the compiled JS files
5+
},
6+
"search.exclude": {
7+
"out": true // set this to false to include "out" folder in search results
8+
},
9+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10+
"typescript.tsc.autoDetect": "off"
11+
}

.vscode/tasks.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
20+
}

.vscodeignore

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.github/**
2+
.vscode/**
3+
.vscode-test/**
4+
adrs/**
5+
dist/**
6+
node_modules/**
7+
src/**
8+
.adr-dir
9+
.gitignore
10+
**/tsconfig.json
11+
**/tslint.json
12+
**/*.map
13+
**/*.ts
14+
wallaby.js
15+
jest.config.js
16+
yarn-error.log

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Changelog
2+
3+
All notable changes to the **Slides** extension will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
[unreleased]: https://github.com/nicoespeon/abracadabra/compare/TBD...HEAD

LICENSE.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 Nicolas Carlo
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# VS Code Slides
2+
3+
This is the README for your extension "slides". After writing up a brief description, we recommend including the following sections.
4+
5+
## Features
6+
7+
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
8+
9+
For example if there is an image subfolder under your extension project workspace:
10+
11+
\!\[feature X\]\(images/feature-x.png\)
12+
13+
> 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.
14+
15+
## Requirements
16+
17+
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
18+
19+
## Extension Settings
20+
21+
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
22+
23+
For example:
24+
25+
This extension contributes the following settings:
26+
27+
- `myExtension.enable`: enable/disable this extension
28+
- `myExtension.thing`: set to `blah` to do something
29+
30+
## Known Issues
31+
32+
Calling out known issues can help limit users opening duplicate issues against your extension.
33+
34+
## Release Notes
35+
36+
Users appreciate release notes as you update your extension.
37+
38+
### 1.0.0
39+
40+
Initial release of ...
41+
42+
### 1.0.1
43+
44+
Fixed issue #.
45+
46+
### 1.1.0
47+
48+
Added features X, Y, and Z.
49+
50+
---
51+
52+
## Working with Markdown
53+
54+
**Note:** You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
55+
56+
- Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux)
57+
- Toggle preview (`Shift+CMD+V` on macOS or `Shift+Ctrl+V` on Windows and Linux)
58+
- Press `Ctrl+Space` (Windows, Linux) or `Cmd+Space` (macOS) to see a list of Markdown snippets
59+
60+
### For more information
61+
62+
- [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
63+
- [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
64+
65+
**Enjoy!**
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# 1. Record architecture decisions
2+
3+
Date: 2019-10-20
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
We need to record the architectural decisions made on this project.
12+
13+
## Decision
14+
15+
We will use Architecture Decision Records, as [described by Michael Nygard](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions).
16+
17+
## Consequences
18+
19+
See Michael Nygard's article, linked above. For a lightweight ADR toolset, see Nat Pryce's [adr-tools](https://github.com/npryce/adr-tools).

adrs/0002-no-integration-test.md

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# 2. No integration test
2+
3+
Date: 2019-10-20
4+
5+
## Status
6+
7+
Accepted
8+
9+
## Context
10+
11+
VS Code has documented [how to test an extension][testing-extension] in integration with VS Code API.
12+
13+
> These tests will run inside a special instance of VS Code named the `Extension Development Host`, and have full access to the VS Code API.
14+
15+
But VS Code test runner is adapted to be used with [mocha][mocha] or [Jasmine][jasmine].
16+
17+
For unit tests, we want to use [Jest][jest]. But Jest and mocha have conflicting types, preventing TS to build. A solution would have been to create a custom test runner for VS Code API, that would run integration tests with Jest. But we didn't managed to create one that works.
18+
19+
That's partly because Jest doesn't have an official way to run tests programatically. We weren't able to make VS Code test runner work with Jest `runCLI()` (async) method.
20+
21+
Also, integration tests were flacky when I tried to make them work. I don't want to waste time hacking my way around the current solution which doesn't seem mature enough to me.
22+
23+
## Decision
24+
25+
We won't do integration tests. We'll rely on unit tests (e.g. state-based tests, collaboration tests and contract tests).
26+
27+
## Consequences
28+
29+
We can use [Jest][jest] to write (unit) tests.
30+
31+
Tests will run fast. They will be easy to write and maintain.
32+
33+
We won't be able to automatically test the extension with the actual VS Code API.
34+
35+
[testing-extension]: https://code.visualstudio.com/api/working-with-extensions/testing-extension
36+
[mocha]: https://mochajs.org/
37+
[jasmine]: https://jasmine.github.io/
38+
[jest]: https://jestjs.io/

assets/logo.png

4.72 KB
Loading

jest.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = {
2+
preset: "ts-jest",
3+
testEnvironment: "node",
4+
testPathIgnorePatterns: ["/node_modules/", "/out/"]
5+
};

0 commit comments

Comments
 (0)