elderfo / react-native-storybook-loader

An automatic story loader for react-native-storybooks
https://github.com/elderfo/react-native-storybook-loader
MIT License
299 stars 27 forks source link

cli parameters are not being used #31

Closed rjanjua closed 6 years ago

rjanjua commented 7 years ago

I am using version 1.3.2 of this package. When I type in the following command:

node ./node_modules/.bin/rnstl --searchDir ./src ./packages --pattern **/*.custom.pattern.js --outputFile ./custom-file.js

I get the following logs for output and patterns:

Generating Dynamic Storybook File List

Output file:       /path/to/my/module/storybook/storyLoader.js
Patterns:          ["/path/to/my/module/storybook/stories/index.js"]

The output file and pattern being used are the default.

I tried it with node versions 6.9.1 and 8.1.2

elderfo commented 6 years ago

I have confirmed this issue and am looking into it. Thanks for the report!

elderfo commented 6 years ago

Fixed in 1.4.0

Note: this fix introduces breaking changes.

CLI can now be accessed from a terminal

./node_modules/.bin/rnstl <options>

or in package.json

{
  "scripts": {
    "prestorybook": "rnstl <options>"
  }
}

Note: When using a glob with **/* it is required to be wrapped in quotes

There is no longer a need to use `node ./node_modules/.bin/rnstl

`.