Skip to content

Commit

Permalink
Add package.json for cmd-line-parse example
Browse files Browse the repository at this point in the history
  • Loading branch information
biril committed Mar 28, 2016
1 parent 8eab249 commit 84ae730
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/cmd-line-parse/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ mp3Parser example: Cmd line parse

Parses given mp3 file, invoking `mp3Parser.readTags` / `mp3Parser.readLastFrame` to output
information about ID3v2 or Xing/Lame tags as well as the last mp3 frame found. Run with
`node parse.js <mp3-file>`.
`node parse.js <mp3-file>` after `npm install`ing.

In this example, mp3Parser is loaded as a CommonJS module.
19 changes: 19 additions & 0 deletions examples/cmd-line-parse/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "mp3-parser-example-cmd-line-parse",
"version": "0.0.1",
"description": "Parse given mp3 file to output ID3v2 or Xing/Lame and last frame found.",
"keywords": [
"mp3",
"id3"
],
"bugs": "https://github.com/biril/mp3-parser/issues",
"license": "MIT",
"author": "biril <[email protected]>",
"private": true,
"dependencies": {
"mp3-parser": "^0.2.6"
},
"engines": {
"node": ">=4.0.0"
}
}
3 changes: 2 additions & 1 deletion examples/cmd-line-parse/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

const fs = require("fs");
const util = require("util");
const mp3Parser = require(__dirname + "/../../main");
const mp3Parser = require("mp3-parser");

const pathToMp3 = process.argv[2];
const toArrayBuffer = buffer => {
const bufferLength = buffer.length;
Expand Down

0 comments on commit 84ae730

Please sign in to comment.