Skip to content

Commit

Permalink
Merge pull request #37 from zgreen/tweak/processOptions
Browse files Browse the repository at this point in the history
only set `from: undefined`
  • Loading branch information
zgreen authored Sep 24, 2018
2 parents 655a06e + e79e092 commit 33bed8b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion example/example.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const basePath = `${process.cwd()}/example`
function cb (files) {
function useFileData (data, file) {
postcss([postcssCriticalCSS({ outputPath: basePath })])
.process(data, { from: undefined, to: undefined })
.process(data, { from: undefined })
.then(result => {
fs.writeFile(
`${basePath}/${file.split('.')[0]}.non-critical.css`,
Expand Down
3 changes: 1 addition & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,7 @@ function buildCritical() {
return (0, _postcss2.default)(minify ? [_cssnano2.default] : [])
// @TODO Use from/to correctly.
.process(criticalCSS, {
from: undefined,
to: undefined
from: undefined
}).then(dryRunOrWriteFile.bind(null, dryRun, filePath)).then(clean.bind(null, css, preserve));
}, {});
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postcss-critical-css",
"version": "3.0.2",
"version": "3.0.3",
"description": "Generate critical CSS using PostCSS",
"main": "index.js",
"repository": {
Expand Down
3 changes: 1 addition & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ function buildCritical (options: Object = {}): Function {
postcss(minify ? [cssnano] : [])
// @TODO Use from/to correctly.
.process(criticalCSS, {
from: undefined,
to: undefined
from: undefined
})
.then(dryRunOrWriteFile.bind(null, dryRun, filePath))
.then(clean.bind(null, css, preserve))
Expand Down

0 comments on commit 33bed8b

Please sign in to comment.