![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
[![Build Status](https://www.bitrise.io/app/6dbd09bf795284e8/status.svg?token=cPPMxR4jerIruWOfSt-_6g&branch=master)](https://www.bitrise.io/app/6dbd09bf795284e8)
Dextrose cli integrates into developer workflow by providing visual snapshots of react native components described by storybook across all react native platforms.
Dextrose extends the fructose react native wrapper app by creating a new client. It's purpose is to iterate through all the bundled components loaded in the app and take a screenshot of each.
Dextrose generates a temporary stories file which reuses your existing components storybook stories. This results in maintainable and seamless integration to your existing workflow.
Dextrose supports the following commands:
run
generate-stories
upload
generate-html
clean-stories
The Dextrose generate-stories command can be used to work with react-native-storybook-loader to dynamically load in stories:
dextrose generate-stories path/to/your/components/directory
The Dextrose run command can be run with the following commands:
dextrose run --config, -c -path/to/config
--config, -c -path/to/config
--snapshotWait, -t
Ms to wait between loading a component and taking the snap
--loglevel, -l
default is set to info, able to set level to verbose
Example config for platforms
Native
module.exports = {
snapPath: path.join(__dirname, '../snaps'),
platformName: "iOS",
ignoredStories: ["IGNORE"]
}
Web
module.exports = {
snapPath: path.join(__dirname, '../snaps'),
platformName: "web",
breakpoints:[500, 1000],
ignoredStories: ["IGNORE"]
}
The Dextrose upload command can be run with the following commands to push component images to s3:
dextrose upload snapshotDir --bucket bucketname --key commit_hash
--bucket, -b
the name of the s3 bucket
--key, -k
the name of the key in the bucket
--region, -r
the aws region
The Dextrose generate-html command can be run with the following commands to generate component presentation:
dextrose generate-html --upload --bucket bucketname --key commit-hash
--upload, -u
using this will attempt to upload the html file to s3
--bucket, -b
the name of the s3 bucket
--key, -k
the name of the key in the bucket
--region, -r
the aws region
The Dextrose clean-stories command should be run in following way:
dextrose clean-stories path/to/your/components
To run the the example Pull the repo
yarn
in the Dextrose folderyarn
in the snapshots folder (the snapshots folder is an example of how you would consume dextrose)./run-(ios | android | web).sh
note: please make sure you have an (emulator | simulator), and a packager running.
FAQs
[![Build Status](https://app.bitrise.io/app/6dbd09bf795284e8/status.svg?token=cPPMxR4jerIruWOfSt-_6g)](https://app.bitrise.io/app/6dbd09bf795284e8)
The npm package dextrose receives a total of 28 weekly downloads. As such, dextrose popularity was classified as not popular.
We found that dextrose demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.