Skip to content

Commit

Permalink
Release 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
acid-chicken committed Apr 20, 2018
1 parent d7e4cdc commit 2d91247
Show file tree
Hide file tree
Showing 8 changed files with 191 additions and 1 deletion.
27 changes: 27 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "0.1.0",
"configurations": [
{
"name": "Launch Extension",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}" ],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/src/**/*.js" ],
"preLaunchTask": "npm"
},
{
"name": "Launch Tests",
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceRoot}", "--extensionTestsPath=${workspaceRoot}/out/test" ],
"stopOnEntry": false,
"sourceMaps": true,
"outFiles": [ "${workspaceRoot}/out/test/**/*.js" ],
"preLaunchTask": "npm"
}
]
}
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": {
"out": false
},
"search.exclude": {
"out": true
}
}
9 changes: 9 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "0.1.0",
"command": "npm",
"isShellCommand": true,
"showOutput": "silent",
"args": ["run", "compile", "--loglevel", "silent"],
"isBackground": true,
"problemMatcher": "$tsc-watch"
}
9 changes: 9 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.vscode/**
.vscode-test/**
out/test/**
test/**
src/**
**/*.map
.gitignore
tsconfig.json
vsc-extension-quickstart.md
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
# Change Log

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

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

## [Unreleased]
- Initial release

## [1.0.0]

### Added

- Beautiful spinning tanakh
44 changes: 44 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"name": "tanakh",
"displayName": "tanakh",
"description": "(´・_・`)",
"version": "1.0.0",
"publisher": "acid-chicken",
"license": "MIT",
"engines": {
"vscode": "^1.10.0"
},
"categories": [
"Other"
],
"keywords": [
"tanakh",
"たなこふ"
],
"activationEvents": [
"*"
],
"contributes": {
"commands": [
{
"command": "extension.updateTanakh",
"title": "たなこふ"
}
]
},
"main": "./out/src/extension",
"scripts": {
"vscode:prepublish": "tsc -p ./",
"compile": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install"
},
"devDependencies": {
"typescript": "^2.0.3",
"vscode": "^1.0.0",
"@types/node": "^6.0.106"
},
"repository": {
"type": "git",
"url": "https://github.com/acid-chicken/vscode-tanakh.git"
}
}
71 changes: 71 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
'use strict'

import * as vscode from 'vscode'

export function activate(context: vscode.ExtensionContext) {
let tanakh = new Tanakh()
let controller = new TanakhController(tanakh)
let disposable = vscode.commands.registerCommand('extension.updateTanakh', () => {
tanakh.update()
})
context.subscriptions.push(controller)
context.subscriptions.push(tanakh)
context.subscriptions.push(disposable)
}

export function deactivate() {
}

class Tanakh {
public constructor() {
this.status.command = 'extension.updateTanakh'
this.status.tooltip = 'たなこふ'
}

public update() {
this.counter++
this.status.text = this.faces[this.counter %= this.faces.length]
this.status.show()
}

public dispose() {
this.status.dispose()
}

private status = vscode.window.createStatusBarItem(vscode.StatusBarAlignment.Right)

private counter = 0

private faces = [
' (´・_・`)´・_・`) ',
' (´・_・`)_・`) ',
' (´・_・`)`) ',
' ((´・_・`) ',
' (´・(´・_・`) ',
' (´・_(´・_・`) ',
' (´・_・`)´・_・`) ',
' (´・_・`)_・`) ',
' (´・_・`)`) ',
' (´・_・`)) ',
' ((´・_・`) ',
' (´・(´・_・`) ',
' (´・_(´・_・`) '
]
}

class TanakhController {
private tanakh: Tanakh
private disposable: vscode.Disposable

public constructor(tanakh: Tanakh) {
this.tanakh = tanakh
let subscriptions: vscode.Disposable[] = []
vscode.window.onDidChangeTextEditorSelection(this.tanakh.update, this, subscriptions)
this.tanakh.update()
this.disposable = vscode.Disposable.from(...subscriptions)
}

public dispose() {
this.disposable.dispose()
}
}
16 changes: 16 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"compilerOptions": {
"module": "commonjs",
"target": "es6",
"outDir": "out",
"lib": [
"es6"
],
"sourceMap": true,
"rootDir": "."
},
"exclude": [
"node_modules",
".vscode-test"
]
}

0 comments on commit 2d91247

Please sign in to comment.