Git Product home page Git Product logo

mdn's Introduction

mdn

Man pages for web APIs using MDN

screenshot

Install

$ npm i @rafaelrinaldi/mdn -g

Usage

$ mdn array.of
$ mdn background-image --language=css
$ # Will open the MDN page on user's default browser
$ mdn function.bind --open

License

MIT ยฉ Rafael Rinaldi


Buy me a โ˜•

mdn's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

mdn's Issues

Support new version of MDN

MDN is releasing a new version of their website, which uses React. It looks super cool and we should add support for it.

Ran a quick test locally and things seem to just work.

Separate data fetching from console output

I was at a Slack event the other day and was thinking that the general idea behind this package could be used for a great Slack bot. But to actually use it as such, there needs to be a way to require and execute the script so that it doesn't log to the console, but instead returns the information.

That got me thinking, maybe it makes sense to separate the data fetch entirely from the console output.

ie: we scrape the page for all the relevant, unformatted information and build an object, and then we return that (promise of an) object directly for people to do as they please, or we pass it to a function that then constructs the output for the console. The default behavior when installed globally would remain logging to the console, but as a locally installed module it could be useful in other projects, such as a Slack bot.

It would of course require a good deal of refactoring, but do you think this is worth doing? Either way, I'm free this evening so unless I get tempted by bourbon, I'll see if I can make a quick prototype ;-)

Publish v1.2.0

We should publish v1.2.0 to npm. I would just look through the diff, make sure that linting is ๐Ÿ‘ and publish it.

Drop `language` flag

Since we only support JavaScript (the default) and CSS, I think we can do:

$ mdn background-image --css

Instead of

$ mdn background-image --language=css

We can of course introduce this change with backwards compat.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.