Skip to content

Setup #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
Jun 8, 2019
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
"source.fixAll": true,
},
"tslint.enable": true,
"tslint.jsEnable": true,
"[javascript]": {
"editor.formatOnSave": true
},
Expand Down
6 changes: 6 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Todos
- add to scripts when url fixed

```
"postinstall": "node ./node_modules/vscode/bin/install",
```
51 changes: 29 additions & 22 deletions package-lock.json

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

56 changes: 12 additions & 44 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,68 +11,36 @@
],
"publisher": "Shawn McKay <[email protected]>",
"activationEvents": [
"onCommand:coderoad.tutorial_load"
"onCommand:coderoad.start"
],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "coderoad.tutorial_setup",
"title": "Tutorial Setup",
"category": "CodeRoad"
},
{
"command": "coderoad.tutorial_load",
"title": "Load Tutorial",
"category": "CodeRoad"
},
{
"command": "coderoad.test_run",
"title": "Run Test",
"category": "CodeRoad"
},
{
"command": "coderoad.solution_load",
"title": "Load Solution",
"command": "coderoad.start",
"title": "Start",
"category": "CodeRoad"
}
],
"viewsContainers": {
"activitybar": [
{
"id": "coderoad-tutorial",
"title": "CodeRoad Tutorial",
"icon": "resources/icons/icon.svg"
}
]
},
"views": {
"coderoad-tutorial": [
{
"id": "tutorial-summary",
"name": "Summary"
},
{
"id": "tutorial-steps",
"name": "Instructions"
}
]
}
]
},
"scripts": {
"vscode:prepublish": "npm run compile",
"machine": "node ./out/state/index.js",
"compile": "tsc -p ./",
"watch": "tsc -watch -p ./",
"postinstall": "node ./node_modules/vscode/bin/install",
"test": "npm run compile && node ./node_modules/vscode/bin/test"
},
"devDependencies": {
"@types/mocha": "^2.2.42",
"@types/node": "^10.12.21",
"@types/mocha": "^5.2.7",
"@types/node": "^12.0.4",
"prettier": "^1.17.1",
"tslint": "^5.12.1",
"tslint": "^5.17.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.3.1",
"typescript": "^3.5.1",
"vscode": "^1.1.28"
},
"dependencies": {
"xstate": "^4.6.0"
}
}
30 changes: 0 additions & 30 deletions src/commands/index.ts

This file was deleted.

130 changes: 0 additions & 130 deletions src/commands/tutorialLoad.ts

This file was deleted.

File renamed without changes.
31 changes: 31 additions & 0 deletions src/editor/commands/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import * as vscode from 'vscode'
import start from './start'

// import runTest from './runTest'
// import loadSolution from './loadSolution'
// import quit from './quit'

const COMMANDS = {
// TUTORIAL_SETUP: 'coderoad.tutorial_setup',
START: 'coderoad.start',
// RUN_TEST: 'coderoad.test_run',
// LOAD_SOLUTION: 'coderoad.solution_load',
// QUIT: 'coderoad.quit',
}


export default (context: vscode.ExtensionContext): void => {
const commands = {
[COMMANDS.START]: async function startCommand(): Promise<void> {
return start(context)
},
// [COMMANDS.RUN_TEST]: runTest,
// [COMMANDS.LOAD_SOLUTION]: loadSolution,
// [COMMANDS.QUIT]: () => quit(context.subscriptions),
}

for (const cmd in commands) {
const command: vscode.Disposable = vscode.commands.registerCommand(cmd, commands[cmd])
context.subscriptions.push(command)
}
}
Loading