$ npm install fxos-switch
Then include folowing files in HTML
<script src="node_modules/fxos-component/fxos-component.js"></script>
<script src="node_modules/fxos-switch/fxos-switch.js"></script>
Normal
<fxos-switch></fxos-switch>
Checked
<fxos-switch checked></fxos-switch>
Disabled
<fxos-switch disabled></fxos-switch>
- Accessibility (@yzen)
- Test Coverage
- Performance
- Visual/UX
- RTL
git clone https://github.com/fxos-components/fxos-switch.git
cd fxos-switch
npm install
(NPM3)npm start
- Ensure Firefox Nightly is installed on your machine.
- To run unit tests you need npm >= 3 installed.
$ npm install
$ npm run test-unit
If your would like tests to run on file change use:
$ npm run test-unit-dev
If your would like run integration tests, use:
$ export FIREFOX_NIGHTLY_BIN=/absolute/path/to/nightly/firefox-bin
$ npm run test-integration
Run lint check with command:
$ npm run test-lint