Skip to content

Commit

Permalink
remove sugarss as default parser
Browse files Browse the repository at this point in the history
  • Loading branch information
jescalan committed Jul 24, 2017
1 parent abb632d commit 7190417
Show file tree
Hide file tree
Showing 4 changed files with 223 additions and 210 deletions.
8 changes: 4 additions & 4 deletions lib/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
let sugarss = require('sugarss')
let postcssImport = require('postcss-import')
let customProperties = require('postcss-custom-properties')
let calc = require('postcss-calc')
Expand Down Expand Up @@ -39,8 +38,6 @@ let autoprefixer = require('autoprefixer')
*/
module.exports = (options = {}) => {
// sugarss by default unless false or custom parser
let parser = options.parser || sugarss
if (options.parser === false) parser = undefined
options.path = options.path ? Array.prototype.concat(options.path) : []

// standard options merge
Expand Down Expand Up @@ -85,7 +82,10 @@ module.exports = (options = {}) => {
// add cssnano if minify config present
if (options.minify) plugins.push(require('cssnano')(options.cssnano))

return {parser, plugins}
return {
parser: options.parser,
plugins
}
}

/**
Expand Down
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"bugs": "https://github.com/static-dev/spike-css-standards/issues",
"dependencies": {
"autoprefixer": "^7.1.1",
"autoprefixer": "^7.1.2",
"cssnano": "^3.7.4",
"postcss-attribute-case-insensitive": "^2.0.0",
"postcss-calc": "^6.0.0",
Expand All @@ -20,7 +20,7 @@
"postcss-color-rebeccapurple": "^3.0.0",
"postcss-color-rgb": "^2.0.0",
"postcss-custom-media": "^6.0.0",
"postcss-custom-properties": "^6.0.1",
"postcss-custom-properties": "^6.1.0",
"postcss-custom-selectors": "^4.0.1",
"postcss-font-family-system-ui": "^2.0.1",
"postcss-font-variant": "^3.0.0",
Expand All @@ -31,13 +31,12 @@
"postcss-pseudo-class-any-link": "^4.0.0",
"postcss-selector-matches": "^3.0.1",
"postcss-selector-not": "^3.0.1",
"rucksack-css": "^0.9.1",
"sugarss": "^1.0.0"
"rucksack-css": "^0.9.1"
},
"devDependencies": {
"ava": "^0.21.0",
"coveralls": "^2.13.1",
"nyc": "^11.0.2",
"nyc": "^11.0.3",
"rewire": "^2.5.2",
"snazzy": "^7.0.0",
"standard": "^10.0.2"
Expand Down
2 changes: 0 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ const test = require('ava')

test('passes parser opt correctly', (t) => {
const out = cssStandards({ parser: 'test' })
const out2 = cssStandards({ parser: false })
t.is(out.parser, 'test')
t.is(out2.parser, undefined)
})

test('passes import opts correctly', (t) => {
Expand Down
Loading

0 comments on commit 7190417

Please sign in to comment.