<commit_before># Cosmos Browserify [![Build Status](https://travis-ci.org/elidoran/cosmos-browserify.svg?branch=master)](https://travis-ci.org/elidoran/cosmos-browserify)

#### [Browserify](http://browserify.org) [npm](http://npmjs.org) dependencies in [Meteor](http://meteor.com) packages for **client side** use.

### Simple Example

Look at [cosmos-browserify-example](http://github.com/elidoran/cosmos-browserify-example)
for a complete working Meteor app example. Look at a [package in the app](http://github.com/elidoran/cosmos-browserify-example/tree/master/packages/browserify-example)
to see how to make one.

### Easy as 1 2 3

Three steps to using `cosmos:browserify` with the `upper-case` npm module.

1. Add to `package.js`:

    ```javascript
    // have Meteor get the npm module for you
    Npm.depends({'upper-case':'1.1.2'});

    Package.onUse(function(api) {
      // use this package
      api.use(['cosmos:browserify'], 'client');

      // add file in Step #2, and the package's client script
      api.addFiles(['browserify.js', 'example.js'], 'client');

      // OPTIONAL: make available to the entire client by exporting it:
      api.export('uppercase', 'client');
    });
    ```

2. Add to `browserify.js` in the root of your package:

    ```javascript
    // w/out `var` it will be package scoped so package code may use it
    uppercase = require('upper-case');
    ```

3. Add to Meteor package's client script:

    If you exported the variable then you may use it in an app script.

    ```javascript
    console.log("example use: ", uppercase('some text'));
    ```

Your browser's console will print: `example use: SOME TEXT`

<commit_msg>use specific version to avoid Meteor grabbing an older buggy version<commit_after># Cosmos Browserify [![Build Status](https://travis-ci.org/elidoran/cosmos-browserify.svg?branch=master)](https://travis-ci.org/elidoran/cosmos-browserify)

#### [Browserify](http://browserify.org) [npm](http://npmjs.org) dependencies in [Meteor](http://meteor.com) packages for **client side** use.

### Simple Example

Look at [cosmos-browserify-example](http://github.com/elidoran/cosmos-browserify-example)
for a complete working Meteor app example. Look at a [package in the app](http://github.com/elidoran/cosmos-browserify-example/tree/master/packages/browserify-example)
to see how to make one.

### Easy as 1 2 3

Three steps to using `cosmos:browserify` with the `upper-case` npm module.

1. Add to `package.js`:

    ```javascript
    // have Meteor get the npm module for you
    Npm.depends({'upper-case':'1.1.2'});

    Package.onUse(function(api) {
      // use this package
      api.use(['cosmos:browserify@0.1.3'], 'client');

      // add file in Step #2, and the package's client script
      api.addFiles(['browserify.js', 'example.js'], 'client');

      // OPTIONAL: make available to the entire client by exporting it:
      api.export('uppercase', 'client');
    });
    ```

2. Add to `browserify.js` in the root of your package:

    ```javascript
    // w/out `var` it will be package scoped so package code may use it
    uppercase = require('upper-case');
    ```

3. Add to Meteor package's client script:

    If you exported the variable then you may use it in an app script.

    ```javascript
    console.log("example use: ", uppercase('some text'));
    ```

Your browser's console will print: `example use: SOME TEXT`


{'fraction_non_alphanumeric': 0.14377745241581258, 'fraction_numerical': 0.006734992679355783, 'mean_word_length': 3.609986504723347, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3241403', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1041, 'n_words': 332}