4.0.1 • Published 5 years ago

on-tour-mobile-modules v4.0.1

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

OnTour Mobile Application Shared Files

Any files used by two or more of the OnTour mobile applications should be moved to this package

!Warning!

This package uses ES6 import/export syntax, so if you do not use a suitable bundler/transpiler, you're gonna have a bad time.

Usage

  1. Install from the public npm registry in the host project by running yarn add on-tour-mobile-modules
  2. import the necessary named exports as usual. Example:
import { ErrorBoundary, Loader, LoginButton } from "on-tour-mobile-modules"

Adding New Components

When adding new components, be sure to give them a testID so that they can be picked up by the automated tests. The naming convention should be the same as the exported component name. For example the LoginButton component should have a testID of 'LoginButton'.

Building

mobile-shared-modules exclusively utilizes yarn for dependency management (don't have yarn installed? See Installing yarn below.). 1. Run yarn from your favorite terminal (or IDE)

Troubleshooting

You may run into issues with the metro bundler complaining about duplicate module names. For instance, this package uses react-native, react-animated, etc. So any project that imports this package and already uses these libraries may have difficulties. To get around this, you can add a file called rn-cli.config.js to the root directory and paste in the following code:

const blacklist = require('metro-config/src/defaults/blacklist');

module.exports = {
    resolver: {
        blacklistRE: blacklist([
            /node_modules\/.*\/node_modules\/react-native\/.*/,
        ])
    },
};

Installing yarn

Follow the instructions outlined in the official yarn docs

4.0.1

5 years ago

3.0.6

5 years ago

3.0.5

5 years ago

3.0.4

5 years ago

3.0.3

5 years ago

3.0.2

5 years ago

3.0.1

5 years ago

2.0.1

5 years ago

1.1.15

5 years ago

1.1.14

5 years ago

1.1.13

5 years ago

1.1.12

5 years ago

1.1.11

5 years ago

1.1.10

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.5

5 years ago

1.1.4

5 years ago

1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago