bahmutov / manpm Goto Github PK
View Code? Open in Web Editor NEWShows the relevant part of NPM module's README file right in your terminal
Shows the relevant part of NPM module's README file right in your terminal
Problem running manpm
with Node v5.2.0 version, when using nvm for managing Node.js versions.
Originally installed with:
$ npm install -g manpm
/home/d2s/.nvm/versions/node/v5.2.0/bin/manpm -> /home/d2s/.nvm/versions/node/v5.2.0/lib/node_modules/manpm/bin/manpm.js
/home/d2s/.nvm/versions/node/v5.2.0/lib
When running the software, manpm
fails to find Node executable.
$ manpm bevacqua/es6 weaksets
/usr/bin/env: node --harmony: No such file or directory
Enviroment variables include path to Node.js binary folder.
$ /usr/bin/env | grep node
NVM_BIN=/home/d2s/.nvm/versions/node/v5.2.0/bin
NVM_PATH=/home/d2s/.nvm/versions/node/v5.2.0/lib/node
…
Directory has the node
binary file:
$ ll /home/d2s/.nvm/versions/node/v5.2.0/bin/node
-rwxrwxr-x 1 d2s d2s 24M joulu 9 06:06 /home/d2s/.nvm/versions/node/v5.2.0/bin/node
Not really sure how this should be fixed, but the problem is probably caused by the line in manpm.js
file:
#!/usr/bin/env node --harmony
(Ubuntu, with zsh
shell as the default console environment.)
ip-10-1-10-144:~ bfaviero$ manpm k2
module.js:338
throw err;
^
Error: Cannot find module 'github-url-to-object'
at Function.Module._resolveFilename (module.js:336:15)
at Module.reallyNeedRequire [as require] (/usr/local/lib/node_modules/manpm/node_modules/really-need/index.js:84:27)
at Object.<anonymous> (/usr/local/lib/node_modules/manpm/src/get-readme.js:11:1)
related to the passed search string. Probably should display only a section of markdown in this case
Hey there, I just wanted to give manpm
a try and it fails in several npm and node version in the installation process.
stefan @ stefan-mac: ~/Sites/electron-build-demo master (╯°□°)╯
> npm install -g manpm [14:25:07]
npm ERR! Darwin 15.0.0
npm ERR! argv "/Users/stefan/.nvm/v5.0.0/bin/node" "/Users/stefan/.nvm/v5.0.0/bin/npm" "install" "-g" "manpm"
npm ERR! node v5.0.0
npm ERR! npm v3.3.6
npm ERR! shasum check failed for /var/folders/03/cgg2bwfd6j92tfllylt5b91m0000gn/T/npm-81868-930781f3/registry.npmjs.org/manpm/-/manpm-1.3.0.tgz
npm ERR! Expected: 3f055d6e700df08338d821b9793d527b3f0641c7
npm ERR! Actual: afc36a15f9ffd57ef168823207494e4574ff4326
npm ERR! From: https://registry.npmjs.org/manpm/-/manpm-1.3.0.tgz
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
npm ERR! /Users/stefan/Sites/electron-build-demo/npm-debug.log
FAIL: 1
Installing other packages globally works fine.
Do you maybe have an idea what going on here?
Seems problem with bluebird Promisify
var Promise = require('bluebird');
var getReadmeFile = Promise.promisify(require('get-package-readme'));
TypeError: Promise.promisify is not a function
could also be related to using really-need?
manpm . [search text]
should load the README in the current folder
gives the following output
$ DEBUG=manpm manpm hr
manpm fetching README for package +0ms hr
{ [Error: hr: cannot parse repository url]
similar to npm-module-checklist alternate badge https://github.com/bahmutov/npm-module-checklist
Commented out describe-it block because it was conflicting with really-need
npm install -g manpm
npm ERR! unpack Could not read data for @bahmutov/[email protected]
npm ERR! Darwin 15.3.0
npm ERR! argv "/usr/local/bin/iojs" "/usr/local/bin/npm" "install" "-g" "manpm"
npm ERR! node v4.3.0
npm ERR! npm v2.14.12
npm ERR! Invalid name: "@bahmutov/parse-github-repo-url"
sometimes GitHub readme file has a different name. Try to fetch until found
README.md
readme.markdown
Make sure the npm run example-es6-docs
works
using my own patched fork of semantic-release-ci
Not just the first one.
Good example manpm heroin 'heroin('
- should return two API sections
Is it fetching wrong file? https://twitter.com/youyuxi/status/712468392205262849
If simple manpm <package name>
grab the markdown and display in the terminal
Something with checklist and a checkmark? list icon | check
Should be better than simple match http://lunrjs.com/
When trying to pipe manpm <package name> | less
it starts displaying the color / control characters. Should not. Can we add pagination?
And add a badge
Something like "could not find the text <...>, showing entire README file"
Tell user if the cli tool is out of date
For repos that are not published on NPM
target: https://github.com/bevacqua/es6
See if we can center the text using
https://github.com/bahmutov/center-code
$ manpm check-more-types defend
{ [Error: check-more-types: package.json has no readmeFilename]
cause: [Error: check-more-types: package.json has no readmeFilename],
isOperational: true }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.