# ember-cli-modernizr

> Parses your Ember CLI app for Modernizr references and creates the smallest possible Modernizr build

Latest version **0.1.0** (published 2015-07-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-modernizr
pnpm add ember-cli-modernizr
yarn add ember-cli-modernizr
bun add ember-cli-modernizr
```

## Health

**Score 5/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: insecure dependencies; abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2015-07-27 |
| First published | 2015-07-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 9 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | sir-dunxalot |
| Keywords | ember-addon, ember, ember-cli, modernizr, feature, detection, html5, css3 |

## Links

- npm: https://www.npmjs.com/package/ember-cli-modernizr
- Repository: https://github.com/sir-dunxalot/ember-cli-modernizr
- Issues: https://github.com/sir-dunxalot/ember-cli-modernizr/issues
- npm.io page: https://npm.io/package/ember-cli-modernizr

## Dependencies (9)

- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [deepmerge](https://npm.io/package/deepmerge.md) ^0.2.10
- [modernizr](https://npm.io/package/modernizr.md) git+https://github.com/modernizr/modernizr#master
- [walk-sync](https://npm.io/package/walk-sync.md) ^0.1.3
- [strip-comments](https://npm.io/package/strip-comments.md) ^0.3.2
- [broccoli-filter](https://npm.io/package/broccoli-filter.md) ^0.1.14
- [broccoli-merge-trees](https://npm.io/package/broccoli-merge-trees.md) ^0.2.2
- [broccoli-caching-writer](https://npm.io/package/broccoli-caching-writer.md) ^0.6.1
- [broccoli-sourcemap-concat](https://npm.io/package/broccoli-sourcemap-concat.md) ^1.0.1

## Recent versions

- 0.1.0 (latest) — 2015-07-27

## README

Ember CLI Modernizr [![Build Status](https://travis-ci.org/sir-dunxalot/ember-cli-modernizr.svg?branch=master)](https://travis-ci.org/sir-dunxalot/ember-cli-modernizr)
======

**Early stage addon - [looking for help](#todos)**

This Ember addon parses your app for Modernizr references and creates a small, custom [Modernizr 3.0](http://modernizr.com/) build.

You can learn more about Modernizr 3.0 by reading the following resources:

- [Modernizr 3 release notes](https://github.com/Modernizr/Modernizr/issues/805)
- [Modernizr 3 blog post](http://modernizr.com/news/modernizr-v3-stickers-diversity/)

## Installation

```
ember install ember-cli-modernizr
```

## Usage

Simply install the addon. It will run when you build your app in a production environment or set the `shouldParseFiles` option to `true`.

Options can be customized in your Brocfile. The **default** options are shown as examples below.

```js
var EmberApp = require('ember-cli/lib/broccoli/ember-app');

var app = new EmberApp({

  modernizr: {
    fileOptions: { encoding: 'utf8' },
    outputDir: 'assets',
    outputFileName: 'ember-cli-modernizr',
    shouldParseFiles: false,

    classPrefix: '',
    'feature-detects': [],

    options: {
      addTest: false,
      atRule: false,
      domPrefixes: false,
      hasEvent: false,
      html5shiv: false,
      html5printshiv: false,
      load: false,
      mq: false,
      prefixed: false,
      prefixes: false,
      prefixedCSS: false,
      setClasses: true,
      testAllProps: false,
      testProp: false,
      testStyles: false
    },
  }

});

module.exports = app.toTree();
```

## TODOs

I would love help with the following requirements:

- Automatically add `assets/ember-cli-modernizr.js` to `assets/vendor.js` instead of creating another HTTP request
- Minify the `assets/ember-cli-modernizr.js` output
- Retrieving configAll from the Modernizr namespace instead of a copy in the addon tree
- Testing the asset path in the `contentFor` hook
- Using some install hook to create the development build instead of a static file in the `vendor` directory

## Development

If you have an issue or feature request please [open an issue](https://github.com/sir-dunxalot/ember-cli-modernizr/issues/new) or submit a PR.

The test suite can be ran as follows:

```
npm test
```

---
_Source: https://npm.io/package/ember-cli-modernizr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
