@returnx-sa/svelte-daterange-selector
v1.0.27
Published
this project is for building a component library for Returnx SA using [Storybook](https://storybook.js.org/)
Downloads
235
Readme
Project
this project is for building a component library for Returnx SA using Storybook
Developing
Run the following cmds to start up the storybook server:
#install node modules
npm install # once off command to install dependency packages
# start storybook
npm run storybook # port specified in package.json script
Building
To create a production version of your app:
npm run build
You can preview the production build with npm run preview
.
To deploy your app, you may need to install an adapter for your target environment.
Usage
To use the daterange component in another project make sure to install:
npm install @returnx-sa/[email protected]
once the component is installed, make sure to import both the component and the css file to allow for the css to work on the component:
import DateRangeSelector from "@returnx-sa/svelte-daterange-selector";
import "@returnx-sa/svelte-daterange-selector/returnxstyles.css";
Releasing to NPM:
In order to release the package to npm (after doing an npm login via the CLI to your domain):
Make sure the package is in line with the name you want to give your package name in the repo, i.e
"name": "@returnx-sa/svelte-daterange-selector"
in the package.json file will allow you to download it asnpm i @returnx-sa/svelte-daterange-selector
run
npm run package
to package your component and you will see it packaged in adist
folder.Once satisfied there are no errors for the package, run
npm publish
Done ! you should be able to consume your product in an app