-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexander Alemayhu <[email protected]>
- Loading branch information
0 parents
commit db72944
Showing
11 changed files
with
1,895 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
root = true | ||
|
||
[*] | ||
indent_style = space | ||
indent_size = 2 | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "oclif" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*-debug.log | ||
*-error.log | ||
/.nyc_output | ||
/dist | ||
/package-lock.json | ||
/tmp | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
@jamstack-oslo/last-tuesday-in | ||
============================== | ||
|
||
show the last tuesdays | ||
|
||
[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io) | ||
[![Version](https://img.shields.io/npm/v/@jamstack-oslo/last-tuesday-in.svg)](https://npmjs.org/package/@jamstack-oslo/last-tuesday-in) | ||
[![Downloads/week](https://img.shields.io/npm/dw/@jamstack-oslo/last-tuesday-in.svg)](https://npmjs.org/package/@jamstack-oslo/last-tuesday-in) | ||
[![License](https://img.shields.io/npm/l/@jamstack-oslo/last-tuesday-in.svg)](https://github.com/JAMstack-Oslo/last-tuesday-in/blob/master/package.json) | ||
|
||
<!-- toc --> | ||
# Usage | ||
<!-- usage --> | ||
# Commands | ||
<!-- commands --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/bin/env node | ||
|
||
require('..').run() | ||
.catch(require('@oclif/errors/handle')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
@echo off | ||
|
||
node "%~dp0\run" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "@jamstack-oslo/last-tuesday-in", | ||
"description": "show the last tuesdays", | ||
"version": "0.0.0", | ||
"author": "Alexander Alemayhu @scanf", | ||
"bin": { | ||
"last-tuesday-in": "./bin/run" | ||
}, | ||
"bugs": "https://github.com/JAMstack-Oslo/last-tuesday-in/issues", | ||
"dependencies": { | ||
"@oclif/command": "^1", | ||
"@oclif/config": "^1", | ||
"@oclif/plugin-help": "^2" | ||
}, | ||
"devDependencies": { | ||
"@oclif/test": "^1", | ||
"chai": "^4", | ||
"eslint": "^5.5", | ||
"eslint-config-oclif": "^3.1", | ||
"mocha": "^5", | ||
"nyc": "^13" | ||
}, | ||
"engines": { | ||
"node": ">=8.0.0" | ||
}, | ||
"files": [ | ||
"/bin", | ||
"/src" | ||
], | ||
"homepage": "https://github.com/JAMstack-Oslo/last-tuesday-in", | ||
"keywords": [ | ||
"oclif" | ||
], | ||
"license": "MIT", | ||
"main": "src/index.js", | ||
"oclif": { | ||
"bin": "last-tuesday-in" | ||
}, | ||
"repository": "JAMstack-Oslo/last-tuesday-in", | ||
"scripts": { | ||
"posttest": "eslint .", | ||
"test": "nyc mocha --forbid-only \"test/**/*.test.js\"" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
const {Command, flags} = require('@oclif/command') | ||
|
||
class JamstackOsloLastTuesdayInCommand extends Command { | ||
async run() { | ||
const {flags} = this.parse(JamstackOsloLastTuesdayInCommand) | ||
const name = flags.name || 'world' | ||
this.log(`hello ${name} from ./src/index.js`) | ||
} | ||
} | ||
|
||
JamstackOsloLastTuesdayInCommand.description = `Describe the command here | ||
... | ||
Extra documentation goes here | ||
` | ||
|
||
JamstackOsloLastTuesdayInCommand.flags = { | ||
// add --version flag to show CLI version | ||
version: flags.version({char: 'v'}), | ||
// add --help flag to show CLI version | ||
help: flags.help({char: 'h'}), | ||
name: flags.string({char: 'n', description: 'name to print'}), | ||
} | ||
|
||
module.exports = JamstackOsloLastTuesdayInCommand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
const {expect, test} = require('@oclif/test') | ||
const cmd = require('..') | ||
|
||
describe('@jamstack-oslo/last-tuesday-in', () => { | ||
test | ||
.stdout() | ||
.do(() => cmd.run([])) | ||
.it('runs hello', ctx => { | ||
expect(ctx.stdout).to.contain('hello world') | ||
}) | ||
|
||
test | ||
.stdout() | ||
.do(() => cmd.run(['--name', 'jeff'])) | ||
.it('runs hello --name jeff', ctx => { | ||
expect(ctx.stdout).to.contain('hello jeff') | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--recursive | ||
--reporter spec | ||
--timeout 5000 |
Oops, something went wrong.