Giter VIP home page Giter VIP logo

ember-cli-modernizr's Introduction

Ember CLI Modernizr Build Status

Early stage addon - looking for help

This Ember addon parses your app for Modernizr references and creates a small, custom Modernizr 3.0 build.

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

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.

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,

    /* If you use a class prefix (e.g. .mod-csstransitions
    instead of .csstransitions) */

    classPrefix: '',

    /* Add feature AMD paths (see lib/config-all.json)
    if you want a feature regardless of file parsing */

    'feature-detects': [],

    /* Set options for Modernizr extensions here */

    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, // Adds classes to <html>
      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 or submit a PR.

The test suite can be ran as follows:

npm test

ember-cli-modernizr's People

Contributors

conorao avatar ember-tomster avatar

Watchers

 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.