Bump deps

This commit is contained in:
Ben Zörb 2018-03-05 20:56:57 +01:00
parent 45486e7242
commit 1975ebd7ce
5 changed files with 3757 additions and 3711 deletions

71
cli.js
View File

@ -7,33 +7,54 @@ const indentString = require('indent-string');
const stdin = require('get-stdin');
const css = require('css');
const _ = require('lodash');
const inlineCritical = require('./');
const inlineCritical = require('.');
let ok;
const help = [
'Usage: inline-critical <input> [<option>]',
'',
'Options:',
' -c, --css Path to CSS file',
' -h, --html Path to HTML file',
' -i, --ignore Skip matching stylesheets',
' -m, --minify Minify the styles before inlining (default)',
' -e, --extract Remove the inlined styles from any stylesheets referenced in the HTML',
' -b, --base Is used when extracting styles to find the files references by `href` attributes',
' -s, --selector Optionally defines the element used by loadCSS as a reference for inlining'
];
const help = `
Usage: inline-critical <input> [<option>]
const cli = meow({
help
}, {
alias: {
c: 'css',
h: 'html',
i: 'ignore',
m: 'minify',
b: 'base',
e: 'extract',
s: 'selector'
Options:
-c, --css Path to CSS file
-h, --html Path to HTML file
-i, --ignore Skip matching stylesheets
-m, --minify Minify the styles before inlining (default)
-e, --extract Remove the inlined styles from any stylesheets referenced in the HTML
-b, --base Is used when extracting styles to find the files references by href attributes
-s, --selector Optionally defines the element used by loadCSS as a reference for inlining
`;
const cli = meow(help, {
autoHelp: true,
autoVersion: true,
flags: {
css: {
type: 'string',
alias: 'c'
},
html: {
type: 'string',
alias: 'h'
},
ignore: {
type: 'boolean',
alias: 'i'
},
minify: {
type: 'boolean',
alias: 'm'
},
extract: {
type: 'boolean',
alias: 'e'
},
base: {
type: 'string',
alias: 'b'
},
selector: {
type: 'string',
alias: 's'
}
}
});
@ -79,7 +100,7 @@ cli.flags = _.reduce(cli.flags, (res, val, key) => {
function error(err) {
process.stderr.write(indentString('Error: ' + (err.message || err), 4));
process.stderr.write(os.EOL);
process.stderr.write(indentString(help.join(os.EOL), 4));
process.stderr.write(indentString(help, 4));
process.exit(1);
}

5690
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -36,10 +36,10 @@
"detect-indent": "5.0.0",
"dom-serializer": "0.1.0",
"fg-loadcss": "^2.0.1",
"get-stdin": "5.0.1",
"get-stdin": "^6.0.0",
"indent-string": "^3.2.0",
"lodash": "4.17.4",
"meow": "3.7.0",
"lodash": "^4.17.5",
"meow": "^4.0.0",
"normalize-newline": "3.0.0",
"reaver": "2.0.0",
"resolve": "^1.5.0",
@ -48,14 +48,14 @@
},
"devDependencies": {
"chai": "^4.0.2",
"concat-stream": "1.6.0",
"concat-stream": "^1.6.1",
"coveralls": "^3.0.0",
"mocha": "^4.0.1",
"mocha": "^5.0.1",
"mockery": "^2.1.0",
"nsp": "^2.8.0",
"nsp": "^3.2.1",
"nyc": "^11.0.3",
"read-package-json": "^2.0.10",
"xo": "0.18.2"
"xo": "^0.20.3"
},
"xo": {
"space": 4,

View File

@ -340,7 +340,7 @@ describe('CLI', function () {
useCleanCache: true
});
mockery.registerMock('./', function (html, styles, options) {
mockery.registerMock('.', function (html, styles, options) {
this.mockOpts = options;
this.mockOpts.html = html;
this.mockOpts.css = styles;

1691
yarn.lock

File diff suppressed because it is too large Load Diff