Giter Club home page Giter Club logo

homebrew-npm-noob's Introduction

homebrew-npm-noob

PyPI License Build Status

homebrew-npm-noob generates a Homebrew formula for an npm package. It is inspired by homebrew-pypi-poet.

Installation

Either

pip install homebrew-npm-noob

or

brew install zmwangx/npm-noob/noob

Usage

$ noob --help
usage: noob [-h] [-w] [-t TAP] [-v] [--debug] package

Generate a Homebrew formula for an npm package. By default the generated
formula is printed to stdout. If -w, --write is specified, the formula is
directly written to the specified tap, or homebrew/core if no tap is
specified.

positional arguments:
  package            name of the package on npm

optional arguments:
  -h, --help         show this help message and exit
  -w, --write        write to filesystem instead of stdout
  -t TAP, --tap TAP  if writing to filesystem, write to this tap instead of
                     homebrew/core
  -v, --version      show program's version number and exit
  --debug

Example

$ noob babel-cli
require "language/node"

class BabelCli < Formula
  desc "Babel command line"
  homepage "https://babeljs.io/"
  url "https://registry.npmjs.org/babel-cli/-/babel-cli-6.24.1.tgz"
  version "6.24.1"
  sha256 "d69a00bdb4f35184cda1f5bfe8075cd4d569600b8e61d864d1f08e360367933b"

  devel do
    url "https://registry.npmjs.org/babel-cli/-/babel-cli-7.0.0-alpha.15.tgz"
    version "7.0.0-alpha.15"
    sha256 "e825b9fe8e578aa392a8b398950070d3816c4c75e99953adb07ccfe858aea454"
  end

  depends_on "node"

  def install
    system "npm", "install", *Language::Node.std_npm_install_args(libexec)
    bin.install_symlink Dir["#{libexec}/bin/*"]
  end

  test do
    raise "Test not implemented."
  end
end

See Also

Node for Formula Authors in Homebrew's docs.

License

homebrew-npm-noob is released under the MIT license. See COPYING for details.

homebrew-npm-noob's People

Contributors

jorgegonzalez avatar zmwangx avatar

Watchers

 avatar

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.