0.6.5-rc2 • Published 5 years ago

logbook-mobile-components v0.6.5-rc2

Weekly downloads
4
License
MIT
Repository
-
Last release
5 years ago

README

Logbook Mobile Components Library

What is this repository for?

This is a set of React-Native components built in isolation that can be used in a React-Native app

Usage in a React-Native app

yarn add logbook-mobile-components

import { Screen } from 'logbook-mobile-components';

render() {
	<Screen></Screen>
}

Set Up

This project is using Storybook for React-Native, setup and usage can be found here: https://github.com/storybooks/storybook/tree/master/app/react-native The order of the steps is mandatory, wait for each of them to finish after you run the next one, all watchers should stay opened in its own terminal

Install modules

yarn install

Start typescript watcher

yarn tsc -w

Start storybook

yarn storybook

Start ios app

react-native run-ios

You should be able to open the browser on http://localhost:7007/
You should see the ios simulator running

Creating Components

Creating the component for the app

  • Create a folder for your component inside src/components
  • Export the component inside src/components/index.ts

Adding the component to Storybook

  • Create a new story for your component with your choice of knobs and actions inside src/stories/index.ts

More information on knobs and actions can be found below:
Knobs: https://github.com/storybooks/storybook/tree/master/addons/knobs
Actions: https://github.com/storybooks/storybook/tree/master/addons/actions

The stories with all the components examples are in src/stories/index.tsx
You should be able to navigate in the browser and see the changes in the simulator

Updating Components

Updating the Logbook Font

  • All you need to do is replace the following files: src/Assets/fonts/selection.json and src/Assets/fonts/icomoon.ttf

Publish npm module

Once the component has been created it's time to publish it to .npm for everyone to use or publish it for local usege.

Publishing to .npm

Make sure you have an .npm account and you've been added in.

Update version number
  • Inside the package.json file bump up the version number by one
Rebuild the folder
  • Delete the build folder and start yarn again to rebuild
Publishing
  • Open terminal and enter in the following:
npm login
npm publish

Publishing locally

Creates global link
  • Run following command from the logbook.mobile.components project
npm link
Link-install the package
  • Run following command from the logbook.mobile project to add the local build logbook.mobile.components npm module
npm link logbook-mobile-components

Done! Check it out here: https://www.npmjs.com/package/logbook-mobile-components

0.6.5-rc2

5 years ago

0.6.5-rc1

5 years ago

0.6.5

5 years ago

0.6.4

5 years ago

0.6.3

5 years ago

0.6.2

5 years ago

0.6.1

5 years ago

0.6.0

6 years ago

0.5.9

6 years ago

0.5.8

6 years ago

0.5.7

6 years ago

0.5.6

6 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

6 years ago

0.1.7

6 years ago

0.1.6

6 years ago

0.1.5

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago

0.0.3

6 years ago

0.0.2

6 years ago

0.0.1

6 years ago