Skip to content

Commit

Permalink
fix: add bin
Browse files Browse the repository at this point in the history
  • Loading branch information
jinliang.wjl committed Sep 3, 2018
1 parent af7d361 commit b901089
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bin/dtsgen.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env node

const path = require('path');
const generate = require('../lib');

const schemaPath = path.join(process.cwd(), process.argv.slice(2)[0]);
const schema = require(schemaPath);

console.log(generate(schema, true).message);
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
"fusion",
"next"
],
"bin": {
"dtsgen": "./bin/dtsgen.js"
},
"homepage": "https://github.com/alibaba-fusion/dts-generator",
"bugs": "https://github.com/alibaba-fusion/dts-generator/issues",
"license": "MIT",
Expand Down

0 comments on commit b901089

Please sign in to comment.