Skip to content

Commit

Permalink
Configured prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist committed Aug 2, 2017
1 parent 9b6ebc0 commit 4f98869
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 22 deletions.
6 changes: 6 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"*.js": [
"prettier --trailing-comma es5 --write",
"git add"
]
}
21 changes: 0 additions & 21 deletions bin/regenerator

This file was deleted.

17 changes: 17 additions & 0 deletions bin/regenerator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env node

var compile = require("../main").compile;

require("commoner")
.version(require("../package.json").version)
.resolve(function(id) {
return this.readModuleP(id);
})
.option("-r, --include-runtime", "Prepend the runtime to the output.")
.option("--disable-async", "Disable transformation of async functions.")
.process(function(id, source) {
return compile(source, {
includeRuntime: this.options.includeRuntime,
disableAsync: this.options.disableAsync,
}).code;
});
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@
"url": "git://github.com/facebook/regenerator.git"
},
"main": "main.js",
"bin": "bin/regenerator",
"bin": "bin/regenerator.js",
"scripts": {
"bootstrap": "lerna bootstrap",
"precommit": "lint-staged",
"test": "node test/run.js"
},
"dependencies": {
Expand Down Expand Up @@ -53,8 +54,11 @@
"babel-plugin-transform-runtime": "^6.9.0",
"babel-preset-env": "^1.2.2",
"babylon": "^6.14.1",
"husky": "^0.14.3",
"lerna": "^2.0.0",
"lint-staged": "^4.0.2",
"mocha": "^2.3.4",
"prettier": "^1.5.3",
"promise": "^7.0.4",
"semver": "^5.0.3"
},
Expand Down

0 comments on commit 4f98869

Please sign in to comment.