ember-cli-autoprefixer
Advanced tools
Comparing version 1.0.0 to 1.0.1
## master | ||
### 1.0.0 | ||
### 1.0.0-beta.0 | ||
@@ -4,0 +6,0 @@ |
13
index.js
'use strict'; | ||
const Autoprefixer = require('broccoli-autoprefixer'); | ||
const fs = require('fs'); | ||
@@ -18,2 +19,13 @@ const treesToProcess = ['css', 'less', 'styl', 'scss', 'sass']; | ||
var browserOptions = {}; | ||
var root = this.project.root; | ||
var hasRCFile = fs.existsSync(`${root}/.browserslistrc`); | ||
var hasPkgBrowserList = !!this.project.pkg.browserslist; | ||
if (!hasRCFile && !hasPkgBrowserList) { | ||
var appOptions = this.app.options || {}; | ||
browserOptions.overrideBrowsersList = appOptions['autoprefixer'] && appOptions['autoprefixer'].overrideBrowsersList; | ||
} | ||
this.options = Object.assign( | ||
@@ -23,2 +35,3 @@ { | ||
}, | ||
browserOptions, | ||
this.app.options.autoprefixer || {} | ||
@@ -25,0 +38,0 @@ ); |
{ | ||
"name": "ember-cli-autoprefixer", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Process styles in an ember-cli application using Autoprefixer", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -13,8 +13,10 @@ # Autoprefixer for Ember CLI [![Build Status](https://travis-ci.org/kimroen/ember-cli-autoprefixer.svg?branch=master)](https://travis-ci.org/kimroen/ember-cli-autoprefixer) | ||
## Options | ||
Add the target browsers to your package.json as per https://github.com/browserslist/browserslist#readme or use a `.browserslistrc` file. | ||
This addon first consumes your browser list config from `config/targets.js`. This is the browser list for Babel. | ||
You can manually configure what browsers to target and other options by | ||
specifying them in your `ember-cli-build.js` (or `Brocfile.js`). An example: | ||
You can manually configure what browsers to target for autoprefixer only. Add the target browsers to your package.json | ||
as per https://github.com/browserslist/browserslist#readme, add a `.browserslistrc` file, or configure `overrideBrowsersList` | ||
in `ember-cli-build.js`. | ||
```js | ||
// ember-cli-build.js | ||
var app = new EmberApp(defaults, { | ||
@@ -21,0 +23,0 @@ autoprefixer: { |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
9839
41
83
1