diff --git a/bin/mark b/bin/mark new file mode 100755 index 0000000..d5827a1 --- /dev/null +++ b/bin/mark @@ -0,0 +1,12 @@ +#!/usr/bin/node + +const mark = require('../index'); +const { argv } = require('process'); + +const input = { + process: argv[0], + cwd: argv[1], + args: argv.slice(2) +}; + +mark(input); diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..1ae26f7 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "mark", + "version": "0.0.1", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@codefeathers/fuse": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@codefeathers/fuse/-/fuse-0.11.0.tgz", + "integrity": "sha512-DxX+1S0FBON6M3Lyrgd0C00bYMScsk991vJfCHPKUCH2FtYFR9JKXRs3BmSlO838ZrwAhkva04309QR8CDprgQ==" + }, + "readline-promise": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/readline-promise/-/readline-promise-1.0.3.tgz", + "integrity": "sha512-sseBRVVaTSQ2x7nYs66xi7HbmarvsNBVj0Tcac4tOfn+XBeqJI0D5Ymcw/c2tb3myJ3DZmcHEwJ4fpUvtfIxJg==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..157fa15 --- /dev/null +++ b/package.json @@ -0,0 +1,31 @@ +{ + "name": "@codefeathers/mark", + "version": "0.0.1", + "description": "Mark your work progress", + "main": "bin/mark", + "scripts": { + "test": "jasmine" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/codefeathers/mark.git" + }, + "keywords": [ + "time-tracker", + "worksheet", + "productivity", + "bash", + "mark" + ], + "author": "Muthu Kumar <@MKRhere> (https://mkr.pw)", + "license": "MIT", + "bugs": { + "url": "https://github.com/codefeathers/mark/issues" + }, + "homepage": "https://github.com/codefeathers/mark#readme", + "dependencies": { + "@codefeathers/cmd-js": "^0.2.0", + "@codefeathers/fuse": "^0.11.0", + "readline-promise": "^1.0.3" + } +} \ No newline at end of file diff --git a/utils/index.js b/utils/index.js new file mode 100644 index 0000000..c353bbf --- /dev/null +++ b/utils/index.js @@ -0,0 +1,7 @@ +const notNull = x => !!x ? x : ''; +const commandIs = y => x => notNull(x[0]).startsWith(y); +const join = arr => arr.join(" "); + +module.exports = { + commandIs +} \ No newline at end of file