Skip to content

Commit

Permalink
remove autoprefixer and let cssnano handle it for me
Browse files Browse the repository at this point in the history
  • Loading branch information
filaraujo committed Aug 31, 2016
1 parent e32dc07 commit da479a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"browser-sync": "^2.10.1",
"del": "^2.2.0",
"eslint-config-google": "^0.3.0",
"gulp-autoprefixer": "^3.1.0",
"gulp-babel": "^6.1.1",
"gulp-cssnano": "^2.0.0",
"gulp-eslint": "^1.1.1",
Expand Down
31 changes: 16 additions & 15 deletions src/registries/style.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,26 @@
import util from 'util';
import autoprefixer from 'gulp-autoprefixer';
import nano from 'gulp-cssnano';
import Registry from 'undertaker-registry';
import size from 'gulp-size';
import sourcemaps from 'gulp-sourcemaps';
import through from 'through2';

const autoprefixerConfig = [
'ie >= 10',
'ie_mob >= 10',
'ff >= 30',
'chrome >= 34',
'safari >= 7',
'opera >= 23',
'ios >= 7',
'android >= 4.4',
'bb >= 10'
];
const nanoConfig = {};
const nanoConfig = {
autoprefixer: {
add: true,
browsers: [
'ie >= 10',
'ie_mob >= 10',
'ff >= 30',
'chrome >= 34',
'safari >= 7',
'opera >= 23',
'ios >= 7',
'android >= 4.4',
'bb >= 10'
]
}
};
const sourcemapsConfig = ['.', {}];

/**
Expand Down Expand Up @@ -55,10 +58,8 @@ function StyleRegistry(config = {}) {

return taker.src(paths.styles, {base: paths.app})
.pipe(preprocess())
.pipe(autoprefixer(autoprefixerConfig))
.pipe(sourcemaps.init())
.pipe(nano(nanoConfig))
.pipe(sourcemaps.init())
.pipe(sourcemaps.write(...sourcemapsConfig))
.pipe(postprocess())
.pipe(size({title: 'styles'}))
Expand Down

0 comments on commit da479a5

Please sign in to comment.