Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Move minified version into its own section, making usage instructions…

… more concise.
  • Loading branch information...
commit 6ae59eb5a02e1850b0891b8a2305cdfdcdac2ca2 1 parent f65c637
Benjamin Atkin authored

Showing 1 changed file with 18 additions and 13 deletions. Show diff stats Hide diff stats

  1. +18 13 README.md
31 README.md
Source Rendered
@@ -16,22 +16,10 @@ var js = require('browserify')({require: {jquery: 'br-jquery'}}).bundle();
16 16 ```
17 17
18 18 This module follows the browserify convention of using `require()`, and
19   -uses [jQuery.noConflict()](http://api.jquery.com/jQuery.noConflict/)
  19 +uses [jQuery.noConflict()](http://api.jquery.com/jQuery.noConflict/).
20 20 To use the jQuery module from the browser, use something like
21 21 `var $ = require('jquery');`
22 22
23   -To include the minified version, use a middleware:
24   -
25   -``` javascript
26   -var browserify = require('browserify'),
27   - jq = require('br-jquery');
28   -
29   -var bundle = browserify();
30   -bundle.use(jq.min); // or jq to bundle the non-minified version
31   -
32   -var js = bundle.bundle();
33   -```
34   -
35 23 ## Example
36 24
37 25 To run the example:
@@ -48,6 +36,23 @@ To verify that this contains the original jQuery source with a simple
48 36 wrapper around it, read and run `node build.js`, and check that the
49 37 files haven't changed.
50 38
  39 +## Minifed Version
  40 +
  41 +To include the minified version, use a middleware:
  42 +
  43 +``` javascript
  44 +var browserify = require('browserify'),
  45 + jq = require('br-jquery');
  46 +
  47 +var bundle = browserify();
  48 +bundle.use(jq.min); // or jq to bundle the non-minified version
  49 +
  50 +var js = bundle.bundle();
  51 +```
  52 +
  53 +Note that browserify can minify files for you, so you may not want to use
  54 +the minified version supplied here, even if the end result will be minified.
  55 +
51 56 ## Author
52 57
53 58 * Ben Atkin <ben@benatkin.com>

0 comments on commit 6ae59eb

Please sign in to comment.
Something went wrong with that request. Please try again.