@native-base/babel-plugin
v1.0.13
Published
A babel plugin to add Build time theme resolution for Nativebase
Downloads
88
Maintainers
Keywords
Readme
@native-base/babel-plugin
Official Babel Plugin for NativeBase Build-Time theme resolution.
Installation -
Using yarn :
yarn add -D @native-base/babel-plugin
Using npm :
npm install --save-dev @native-base/babel-plugin
Usage -
Simply add this plugin in your App's babel.config.js
:
module.exports = function (api) {
api.cache(true);
return {
presets: [...YOUR_APP_PRESETS],
plugins: ["@native-base/babel-plugin",...YOUR_OTHER_PLUGINS],
};
};
Also in dev env you will have to delete the cache generated on your root in the folder .native-base .
You can simply add rm -rf .native-base
in your dev script.
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"other-scripts":"yarn something",
"dev": "rm -rf .native-base && yarn start",
}
To setup the Development environment -
- clone this Repo
yarn
ornpm install
cd example && yarn && cd ..
orcd example && npm install && cd ..
yarn dev:web
ornpm run dev:web
to run the example app make your changes inindex.js
.