Last active
October 28, 2021 09:24
-
-
Save anangkur/3162095f00a299f00b6b47e40aadfe61 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { generateStories } = require("@storybook/native"); | |
const { pascalCase } = require("change-case"); | |
const components = [ | |
{ | |
name: "button", | |
}, | |
]; | |
const promises = components.map(async (component) => { | |
return generateStories({ | |
category: pascalCase(component.name), | |
filePath: `./stories/${component.name}.stories.jsx`, | |
apiKey: "your-appetize-api-key", | |
platform: "android", | |
stories: [ | |
{ | |
name: "Example", | |
appParams: { | |
component: component.name | |
}, | |
} | |
], | |
controls: component.control ? Object.entries(component.control) : undefined, | |
deepLinkUrl: "your-deeplink" | |
}); | |
}); | |
Promise.all(promises).catch((err) => { | |
console.error(err); | |
process.exit(1); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment