Skip to content

Commit

Permalink
Move cli.js to examples/node-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
buzz committed Jun 13, 2020
1 parent e9cd9c9 commit df7e0a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ require('mediainfo.js')().then((mediainfo) => {
- [Simple](https://github.com/buzz/mediainfo.js/tree/master/examples/browser-simple)
- [CDN (CodePen)](https://codepen.io/buzzone/pen/eYNjJrx)
- [Webpack](https://github.com/buzz/mediainfo.js/tree/gh-pages-src)
- [Node.js](https://github.com/buzz/mediainfo.js/tree/master/examples/cli.js)
- [Node.js](https://github.com/buzz/mediainfo.js/tree/master/examples/node-cli/cli.js)

### API

Expand Down
8 changes: 8 additions & 0 deletions examples/node-cli/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
module.exports = {
env: {
node: true,
},
rules: {
'@typescript-eslint/no-var-requires': 'off',
},
}
2 changes: 1 addition & 1 deletion examples/cli.js → examples/node-cli/cli.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

const { open } = require('fs').promises
const MediaInfo = require('../dist/mediainfo.js')
const MediaInfo = require('../../dist/mediainfo.js')

const main = async (filePath) => {
let fileHandle
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"LICENSE.txt",
"README.md",
"dist/",
"examples/cli.js"
"examples/node-cli/cli.js"
],
"scripts": {
"build:declaration": "tsc --emitDeclarationOnly --declarationDir . --declaration true src/mediainfo.ts",
Expand All @@ -36,7 +36,7 @@
"test": "jest"
},
"bin": {
"mediainfo.js": "./examples/cli.js"
"mediainfo.js": "./examples/node-cli/cli.js"
},
"dependencies": {
"@types/emscripten": "^1.39.4"
Expand Down

0 comments on commit df7e0a6

Please sign in to comment.