Skip to content

Design and apply a proper interface and structure #18

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 5 commits into from
Jun 4, 2019
Merged
Show file tree
Hide file tree
Changes from all 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
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
}
2 changes: 1 addition & 1 deletion bin/analyze.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@REM Usage:
@REM ./bin/analyze.bat two_fer ~/test/
@REM ./bin/analyze.bat two-fer ~/test/

node -r esm ./dist/analyze.js %*
2 changes: 1 addition & 1 deletion bin/analyze.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# Usage:
# ./bin/analyze.sh two_fer ~/test/
# ./bin/analyze.sh two-fer ~/folder/to/solution

node -r esm ./dist/analyze.js "$@"
166 changes: 0 additions & 166 deletions bin/batch-runner

This file was deleted.

4 changes: 4 additions & 0 deletions bin/batch.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@REM Usage:
@REM ./bin/batch.bat two-fer

node -r esm ./dist/batch.js %*
6 changes: 6 additions & 0 deletions bin/batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

# Usage:
# ./bin/batch.sh two-fer

node -r esm ./dist/batch.js "$@"
85 changes: 0 additions & 85 deletions bin/statistics

This file was deleted.

4 changes: 4 additions & 0 deletions bin/stats.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@REM Usage:
@REM ./bin/stats.bat two-fer

node -r esm ./dist/stats.js %*
6 changes: 6 additions & 0 deletions bin/stats.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

# Usage:
# ./bin/stats.sh two-fer

node -r esm ./dist/stats.js "$@"
Empty file added docs/.keep
Empty file.
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
{
"name": "exercism-javascript-analyzer",
"name": "@exercism/javascript-analyzer",
"version": "0.1.0",
"description": "Exercism analyzer for javascript",
"main": "index.js",
"repository": "https://github.com/exercism/javascript-analyzer",
"author": "Derk-Jan Karrenbeld <derk-jan+github@karrenbeld.info>",
"license": "MIT",
"bin": "./bin/analyze.sh",
"directories": {
"lib": "./dist",
"bin": "./bin",
"doc": "./docs",
"test": "./test"
},
"scripts": {
"analyze": "bin/analyze.sh",
"analyze:bat": "bin/analyze.bat",
"analyze": "./bin/analyze.sh",
"analyze:bat": "./bin/analyze.bat",
"analyze:help": "yarn analyze help",
"analyze:dev": "yarn build && yarn analyze",
"analyze:dev:bat": "yarn build && yarn analyze:bat",
"build": "yarn tsc",
"build": "yarn tsc --build src",
"prepublish": "yarn test",
"test": "yarn build && jest"
},
Expand All @@ -22,17 +26,17 @@
"@babel/preset-env": "^7.4.5",
"@babel/preset-typescript": "^7.3.3",
"@types/jest": "^24.0.13",
"@types/node": "^11.11.6",
"@types/yargs": "^12.0.10",
"@types/node": "^12.0.4",
"@types/yargs": "^13.0.0",
"babel-jest": "^24.8.0",
"eslint": "^5.15.3",
"eslint": "^5.16.0",
"jest": "^24.8.0",
"typescript": "^3.4.5"
"typescript": "^3.5.1"
},
"dependencies": {
"@typescript-eslint/parser": "^1.9.0",
"@typescript-eslint/typescript-estree": "^1.9.0",
"esm": "^3.2.20",
"yargs": "^13.2.2"
"esm": "^3.2.25",
"yargs": "^13.2.4"
}
}
2 changes: 1 addition & 1 deletion src/exercise.ts → src/ExerciseImpl.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export class Exercise {
export class ExerciseImpl implements Exercise {
constructor(public readonly slug: string) {
if (!slug) {
throw new Error(`Expected valid exercise slug, got '${slug}'`)
Expand Down
Loading