findify-js is a mono-repo, which means it is built out of multiple packages. To start using them in your projects you have to install them one by one.
For example, getting the SDK will require you to install @findify/sdk
:
$ npm install @findify/sdk
Please note! Latest versions of the pages are shipped as esnext-modules that may require additional setup in your bundle or test environment! This change is made to reduce the size of the packages in your bundle and not overload it by (probably) not required polyfills.
- Babel setup: use
babel.config.*
instead of.babelrc
it will make your babel compile node modules - Jest setup: use
--experimental-modules
- Legacy Webpack: do not exclude @findify packages in loader
exclude: /node_modules\/(?!(@findify\/.*)\/).*/
In our setup lerna uses yarn to control package dependencies and workspaces, it means you need to have yarn installed
npm install -g yarn # Install Yarn
yarn # Install dependencies
yarn bootstrap # Build packages
cd packages/bundle && yarn start # Run bundle dev server
Afterwards you will be able to develop every single package locally, the dependencies will be pulled from packages/*
folder.
Note: Once before yarn start
in @findify/bundle you need to build dll by yarn build:dll
in packages/bundle
folder.
Note: react-components
are always "hot", so you don't need to rebuild it after change.