polyfiller-catalog

0.0.31 • Public • Published

polyfiller-catalog

npm version Build Status Dependency Status License

A database for polyfill combinators

For more details see the Polyfiller documentation

Getting Started

This package requires Node ~0.10.0

If you haven't used npm before, be sure to check out the Getting Started guide, as it explains how to install npm and use a package.json file. Once you're familiar with that process, you may install this package with this command:

npm install polyfiller-catalog --save-dev

Once the package has been installed, it may be used inside your files with this line of JavaScript:

var catalog = require('polyfiller-catalog');

Usage Example

catalog.SOURCES; // ['./files/']
catalog.MODULES; // ['./node_modules', './bower_components']

Tests

grunt test

File structure

Required file structure for each new package:

catalog
    Promise
        index.json
        index.js

index.json

{
    "name": "Promise"
}

There are dependencies?

"dependencies": ["window.setImmediate"]

index.js

module.exports = [
    {
        type: 'npm',
        name: 'es6-promises'
    }
];

type:

Type: string [npm | bower | file]
Default: None

name:

Type: string
Default: None

package.json

Use dependencies and bundleDependencies for new features located in npm

{
    "dependencies": {
        "es6-promises": "^1.0.10"
    },
 
    "bundleDependencies": [
        "es6-promises"
    ]
}

bower.json

Use dependencies for new features located in bower

{
    "dependencies": {
        "es6-promises": "1.0.10"
    }
}

The files are located locally?

catalog
    Promise
        files
            index.js — your polyfill

        index.json
        index.js
// index.js
 
var path = require('path');
 
module.exports = [
    {
        type: 'file',
        name: path.join(__dirname, './files/index.js')
    }
];

Contributing

  1. Fork the one
  2. Create a topic branch
  3. Read about file structure above
  4. Make your commits
  5. Write the tests (for new functionality)
  6. Run npm test
  7. Submit Pull Request once Tests are Passing

License

MIT

Task submitted by Alexander Abashkin

/polyfiller-catalog/

    Package Sidebar

    Install

    npm i polyfiller-catalog

    Weekly Downloads

    9

    Version

    0.0.31

    License

    MIT

    Last publish

    Collaborators

    • monolithed