Please do not make any new changes to this repository unless it is critical.
This package contains core functionality for development of Equinors Mobile Applications like authentication, feedback and typography. This package is used by our React Native Expo template.
Currently you can only find this package on GitHub.
To be able to use this package you need to have expo-cli
installed. Follow the installation guide.
If using npm
, run:
npm install git+https://github.com/equinor/mad-expo-core
If using yarn
, run:
yarn add git+https://github.com/equinor/mad-expo-core
Replace {commithash-or-tag-or-branch}
with a commit hash, tag or branch name. For npm
, run:
npm install git+https://github.com/equinor/mad-expo-core#{commit-hash-or-tag-or-branch-name}
or if using yarn
, run:
yarn add git+https://github.com/equinor/mad-expo-core#{commit-hash-or-tag-or-branch-name}
mad-expo-core
into the same folder containing your React Native Expo project. We suggest using our React Native Expo template:git clone https://github.com/equinor/mad-expo-core
The folder structure could look like this:
/Users/Adam/mad-expo-core
/Users/Adam/mad-react-native-expo-template
yalc
to link mad-expo-core
to the project. To install yalc
in your project follow the installation guide.refresh-core
-script to package.json
in your React Native Expo project. Remember to replace the {projectName}
with your project name:{
scripts: {
'refresh-core': 'cd ../mad-expo-core && yalc publish && cd ../{projectName} && yalc add mad-expo-core && expo start',
},
}
mad-expo-core
. Make sure to update documentation too!refresh-core
-script you can skip step 6 and 7. Run the following in your project to refresh mad-expo-core
, for npm
run:npm run refresh-core
or if using yarn
, run:
yarn run refresh-core
refresh-core
-script you need to publish mad-expo-core
to yalc
. Run the following in mad-expo-core
:yalc publish
mad-expo-core
to your project, run the following in your project folder:yalc add mad-expo-core
After each change of mad-expo-core
you either have to follow step 5
or 6 and 7
to be able to test while you develop this package.
import MadExpoCore from 'mad-expo-core';
// ...
const result = await MadExpoCore.multiply(3, 7);
We use standard-version, a utility for versioning using semver and CHANGELOG generation powered by Conventional Commits.
Copied from https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716 See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
feat: add hat wobble
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
More Examples:
feat
: (new feature for the user, not a new feature for build script)fix
: (bug fix for the user, not a fix to a build script)docs
: (changes to the documentation)style
: (formatting, missing semi colons, etc; no production code change)refactor
: (refactoring production code, eg. renaming a variable)test
: (adding missing tests, refactoring tests; no production code change)chore
: (updating grunt tasks etc; no production code change)References:
We use standard-version to:
Bump
the version numberchangelog
based on the commits since last releasetag
with the new version numberby running the following if you use npm
:
npm run release
or if using yarn
, run:
yarn run release
MIT