Qualcomm modules library
$ cnpm install qualcomm-modules
Updated: 10/03/2017
Mirum's repository for reusable and generic components to serve as a base styleguide and style system for Qualcomm
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Recommended: NVM to manage node versions: https://github.com/creationix/nvm/
git clone https://username@bitbucket.mirum.agency/scm/mirus/qualcomm-modules.git
npm login
cd mirum-qc
npm install
npm run bootstrap
to bootstrap the modules in /packages and install all their dependencies, linking any of their cross-dependencies.npm test
to set up the test runnernpm run storybook
to launch storybookEach package contains their own "build" script in their package.json
lerna run build
This will create a cjs (CommonJS) and an es (ECMAScript) directory in each package directory. Consumers with webpack 3 will automatically use the module entry point defined in the package.json for that package, and will fall back to the main entry point.
npm run publish
Note: Make sure you are loggined in to npm by running npm login
You can import any package with the following example syntax:
import {colors} from "@mirum-qc/styles"
import {FeaturedToutsContainer} from "@mirum-qc/components"
In general, imports should be in generality order -> alphabetical order see section on Syntax for more details
See the package README for more details
An icon conversion utility is available to create React components from SVG files for use as icons. The utility converts all icons placed inside the icon directory inside icon-utils, and then places all converted components inside the Components package keeping the existing dir structure. Then creates an Object with all of the components.
npm run converticons
Run prettier to format our code:
npm run prettier
Import statements should be handled in generality order -> alphabetical order, for example:
//most general
import React from "react'
//libraries used
import R from "ramda"
import styled from "styled-components"
//generic reusable functions, components, or utilities
import {colors} from "@mirum-qc/styles"
//components or relative paths
import {Link} from "link"
import {Items} from "../items"
import {Item} from "./item"
We use SemVer for versioning.
Copyright 2014 - 2017 © taobao.org |