The reference implementation of Polaris, written in React and TypeScript.
This is the internal version of the Polaris repository. All changes and issues should be made here, and the changes will be applied to the public version when we release a new version.
We’ve created a simple, hot-reloading playground for development on these components. You can edit the playground/Playground.tsx
file to import the components you are working on, and run yarn dev
in order to start the development server. Please do not commit your work on the playground so that it is pristine for other developers to work on.
- Run
yarn dev:host
- Visit http://YOUR_IP_ADDRESS:ASSIGNED_PORT in a browser window from within your virtual machine or mobile device on the same network
- Run
yarn run build-consumer PROJECT_DIRECTORY
PROJECT_DIRECTORY
is where the build will be copied, which must be a sibling of the polaris-react
directory.
# Example
yarn run build-consumer polaris-styleguide
In the example above, the build is copied to polaris-styleguide/node_modules/@shopify/polaris
. And in this case, a rebuild of polaris-styleguide
is required after copying the polaris-react
build, but may not be the case for all consuming projects.
# Example
dev cd polaris-styleguide
yarn run build:development
Also, when running yarn install
(which often happens as part of dev up
), copied builds will be overwritten and will require running yarn run build-consumer PROJECT_DIRECTORY
again.
See Neutron Technical Brief: Outside Admin for more details.