Commit 605800d9 by Michael Mifsud

Merge pull request #1421 from xzyfer/feat/better-help

Add more detailed usage examples to cli --help
parents 2e858b12 6db732ac
...@@ -20,14 +20,18 @@ var cli = meow({ ...@@ -20,14 +20,18 @@ var cli = meow({
pkg: '../package.json', pkg: '../package.json',
version: process.sass.versionInfo, version: process.sass.versionInfo,
help: [ help: [
'Usage', 'Usage:',
' node-sass [options] <input.scss> [output.css]', ' node-sass [options] <input.scss>',
' cat <input.scss> | node-sass [options] > output.css', ' cat <input.scss> | node-sass [options] > output.css',
'', '',
'Example', 'Example: Compile foobar.scss to foobar.css',
' node-sass --output-style compressed foobar.scss foobar.css', ' node-sass --output-style compressed foobar.scss > foobar.css',
' cat foobar.scss | node-sass --output-style compressed > foobar.css', ' cat foobar.scss | node-sass --output-style compressed > foobar.css',
'', '',
'Example: Watch the sass directory for changes, compile with sourcemaps to the css directory',
' node-sass --watch --recursive --output css',
' --source-map true --source-map-contents sass',
'',
'Options', 'Options',
' -w, --watch Watch a directory or file', ' -w, --watch Watch a directory or file',
' -r, --recursive Recursively watch directories or files', ' -r, --recursive Recursively watch directories or files',
...@@ -366,9 +370,13 @@ if (!options.src && process.stdin.isTTY) { ...@@ -366,9 +370,13 @@ if (!options.src && process.stdin.isTTY) {
emitter.emit('error', [ emitter.emit('error', [
'Provide a Sass file to render', 'Provide a Sass file to render',
'', '',
' Example', 'Example: Compile foobar.scss to foobar.css',
' node-sass --output-style compressed foobar.scss foobar.css', ' node-sass --output-style compressed foobar.scss > foobar.css',
' cat foobar.scss | node-sass --output-style compressed > foobar.css' ' cat foobar.scss | node-sass --output-style compressed > foobar.css',
'',
'Example: Watch the sass directory for changes, compile with sourcemaps to the css directory',
' node-sass --watch --recursive --output css',
' --source-map true --source-map-contents sass',
].join('\n')); ].join('\n'));
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment