0.1.0 • Published 1 year ago

@purposeinplay/core-mobile v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

How to install this library?

1. Install the dependencies

yarn add nativewind # install nativewind
yarn add --dev tailwindcss@3.2.2 # Install tailwind css v3.2.2 https://stackoverflow.com/questions/76688256/getting-error-use-processcss-thencb-to-work-with-async-plugins
yarn add @purposeinplay/core-mobile # Install the library

2. Babel config

Go to babel.config.js and add the following:

// babel.config.js
module.exports = function (api) {
  api.cache(true);
  return {
    presets: ["babel-preset-expo"],
+   plugins: ["nativewind/babel"],
  };
};

3. Tailwind config

Add a tailwind.config.js file to the root of your project and add the following:

const libraryPath = require.resolve('@purposeinplay/core-mobile/package.json');

/** @type {import('tailwindcss').Config} */
module.exports = {
  content: [
    // App's own components
    './src/**/*.{js,jsx,ts,tsx}',
    `${libraryPath}/src/**/*.{js,jsx,ts,tsx}`,
  ],

  theme: {
    extend: {},
  },
  plugins: [],
};