Skip to content

Commit 2cbf0b3

Browse files
committed
feat(starter): initial commit - add starter files
1 parent c5dc73f commit 2cbf0b3

File tree

13 files changed

+12468
-1
lines changed

13 files changed

+12468
-1
lines changed

.prettierrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "none",
3+
"tabWidth": 4,
4+
"semi": true,
5+
"singleQuote": true,
6+
"arrowParens": "avoid"
7+
}

.releaserc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
"@semantic-release/release-notes-generator",
5+
"@semantic-release/changelog",
6+
"@semantic-release/npm",
7+
["@semantic-release/git", {
8+
"assets": ["package.json", "CHANGELOG.md"],
9+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
10+
}],
11+
"@semantic-release/github"
12+
]
13+
}

.travis.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
dist: trusty
2+
sudo: required
3+
language: node_js
4+
node_js:
5+
- "8"
6+
7+
os:
8+
- linux
9+
10+
jobs:
11+
include:
12+
- stage: install
13+
script: npm install
14+
skip_cleanup: true
15+
- stage: test
16+
script: npm run report:coverage
17+
skip_cleanup: true
18+
- stage: release
19+
node_js: lts/*
20+
deploy:
21+
provider: script
22+
skip_cleanup: true
23+
script:
24+
- npx semantic-release
25+
if: branch = master

CHANGELOG.md

Whitespace-only changes.

CODE_OF_CONDUCT.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Contributor Covenant Code of Conduct
2+
Our Pledge
3+
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
4+
5+
Our Standards
6+
Examples of behavior that contributes to creating a positive environment include:
7+
8+
Using welcoming and inclusive language
9+
Being respectful of differing viewpoints and experiences
10+
Gracefully accepting constructive criticism
11+
Focusing on what is best for the community
12+
Showing empathy towards other community members
13+
Examples of unacceptable behavior by participants include:
14+
15+
The use of sexualized language or imagery and unwelcome sexual attention or advances
16+
Trolling, insulting/derogatory comments, and personal or political attacks
17+
Public or private harassment
18+
Publishing others' private information, such as a physical or electronic address, without explicit permission
19+
Other conduct which could reasonably be considered inappropriate in a professional setting
20+
Our Responsibilities
21+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
22+
23+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
24+
25+
Scope
26+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
27+
28+
Enforcement
29+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
30+
31+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
32+
33+
Attribution
34+
This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019
3+
Copyright (c) 2018
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Whitespace-only changes.

__mocks__/jsonfile.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
'use strict';
2+
const jsonfile = jest.genMockFromModule('jsonfile');
3+
4+
let mockedReadFileResponse;
5+
let throwError = false;
6+
7+
const setup = (responseMock, errorResponse) => {
8+
if (errorResponse) {
9+
throwError = true;
10+
}
11+
mockedReadFileResponse = responseMock;
12+
};
13+
const readFileSync = jest.fn(() => {
14+
if (throwError) {
15+
throw 'Something went wrong';
16+
}
17+
return mockedReadFileResponse;
18+
});
19+
const writeFileSync = jest.fn((path, file) => {});
20+
21+
jsonfile.setup = setup;
22+
jsonfile.readFileSync = readFileSync;
23+
jsonfile.writeFileSync = writeFileSync;
24+
25+
module.exports = jsonfile;

bin/order.bin.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/usr/bin/env node
2+
const commander = require('commander');
3+
const version = require('../package').version;
4+
const greet = require('../src/greet');
5+
6+
commander
7+
.version(version)
8+
.arguments('<food> <drink>')
9+
.option(
10+
'-w --wine-card [string]',
11+
'Additional to the food and drink you want to order the wine card'
12+
)
13+
.action(function(food, drink) {
14+
const includeWineCard = commander.wineCard;
15+
greet.restaurant();
16+
})
17+
.parse(process.argv);

0 commit comments

Comments
 (0)