Giter VIP home page Giter VIP logo

roots-browserify's Introduction

Roots Browserify

npm tests coverage dependencies

Roots browserify is an alternate javascript pipeline that uses commonjs and browserify to build and concatenate scripts.

Note: This project is in early development, and versioning is a little different. Read this for more details.

Installation

  • make sure you are in your roots project directory

  • npm install roots-browserify --save

  • modify your app.coffee file to include the extension, as such

    browserify = require('roots-browserify')
    
    module.exports =
      extensions: [browserify(files: "assets/js/main.coffee", out: 'js/build.js')]

Usage

This extension very directly uses browserify's javascript API under the hood. For basic usage, pass either a string with a file path or an array of file path strings as entry points for browserify, and an output path where all the concatenated scripts should be written, as shown in the example above.

Options

files

String or array of strings pointing to one or more file paths which will serve as the base. See browserify docs for more info.

sourceMap

Generates an inline sourcemap, external if minify is true. Default is false.

minify

Minfifies the output. Default is false.

opts

Any additional options you'd like to be passed in to browserify. Again, documented here. Default is { extensions: ['.js', '.json', '.coffee'] }.

out

Where you want to output your built js file to in your public folder (or whatever you have set output to in the roots settings). Default is js/build.js

transforms

If you'd like to add additional custom transforms, you can do it through this option. Pass either a transform function or an array of functions and they will be included in the pipeline. Default is coffeeify (add that string to your array if you want to keep coffeeify as well, otherwise it will be overridden).

License & Contributing

roots-browserify's People

Contributors

hhsnopek avatar samccone avatar

Watchers

 avatar  avatar  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.