Skip to content

Commit

Permalink
Setup workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
orta committed Aug 20, 2016
1 parent 7c62c2f commit df579a2
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"presets": [
"es2015"
],
"plugins": ["transform-flow-strip-types"]
}
8 changes: 8 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "standard",
"plugins": [
"standard",
"promise"
],
"presets": ["es2015"]
}
8 changes: 8 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[ignore]
distribution

[include]

[libs]

[options]
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ jspm_packages

# Optional REPL history
.node_repl_history

distribution
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
source
17 changes: 17 additions & 0 deletions jsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=759670
// for the documentation about the jsconfig.json format
"compilerOptions": {
"target": "es2015",
"module": "commonjs",
"allowSyntheticDefaultImports": true
},
"exclude": [
"node_modules",
"bower_components",
"jspm_packages",
"tmp",
"temp",
"distribution"
]
}
22 changes: 18 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,35 @@
"name": "danger",
"version": "0.0.1",
"description": "Automate your culture",
"main": "index.js",
"main": "distribution/danger.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"flow": "flow; test $? -eq 0 -o $? -eq 2",
"build": "babel source --out-dir distribution",
"prepublish": "npm run build"
},
"repository": {
"type": "git",
"url": "git+https://github.com/danger/danger-js.git"
},
"keywords": [
"danger"
"danger",
"ci"
],
"author": "Orta Therox",
"license": "MIT",
"bugs": {
"url": "https://github.com/danger/danger-js/issues"
},
"homepage": "https://github.com/danger/danger-js#readme"
"homepage": "https://github.com/danger/danger-js#readme",
"devDependencies": {
"babel-plugin-transform-flow-strip-types": "^6.8.0",
"babel-polyfill": "^6.13.0",
"babel-preset-es2016": "^6.11.3",
"eslint": "^3.3.1",
"eslint-config-standard": "^6.0.0-beta.3",
"eslint-plugin-promise": "^2.0.1",
"eslint-plugin-standard": "^2.0.0",
"flow-bin": "^0.30.0"
}
}
4 changes: 4 additions & 0 deletions source/danger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = function ({percent = 100, amount}) {
const percentOff = (percent / 100) * amount
return percentOff
}

0 comments on commit df579a2

Please sign in to comment.