Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

focus-components-v3

KleeGroup8MIT3.3.3TypeScript support: included

Focus web components to build applications (based on Material Design)

react, material-design-lite, focus

readme

focus-components

NPM

Build Status

Throughput Graph

Issue Stats Issue Stats Package Quality Components for focus application.

Components

Sources

All the source code is in src.

component spec

Component example structure, with all the directories ans sub directories.

  • index.js : the component entry point.
  • style: the style of the component should be written in sass.
  • assets: all the components assets
  • example: a example directory for your component, should have an index.html file. (see build section for more informations).
  • __tests__ : components unit tests

Build

  • First install the dependencies npm install, in case of any problem with a proxy or with node-gyp have a look at this gist
  • npm run build to trigger the complete build
  • npm run build:browser to trigger only the build for the browser

Component catalog

In order to build the catalog, your component must be describe under the components node in the package.json file.

"components": [
    {
      "name": "componentName",
      "path": "componentPath"
    }
  ]

When your component has been added to this list, it will automatically be deployed as a single component and testable through the url: http://localhost:3000 using the static-server.js file. You can launch the examples with the command npm run example.

Unit test

In order to launch unit test: npm run test

CSS

FlexBox/

Lint

npm run lint in order to see your errors.

Browser testing done with Browserstack Browserstack

changelog

In order to release a new version of focus on both github and npm, you have to follow these steps:

  1. Get the latest version of the sources on the master branch with a git pull origin master
  2. Increase the version in the package.json file (maybe it has already be done check npm website
  3. Go on the Release branch with a git checkout release
  4. Be sure to have the latest version of the release branch with a git pull origin release
  5. Merge all changes from master branch into release branch with a git merge master
  6. Perform a npm run build (Just to be sure)
  7. Commit all build's product onto the release branch (it consists of the focus-components.{js,css} from the dist directory).
  8. Create a git tag git tag -a vX.Y.Z -m 'Focus components vX.Y.Z'
  9. Push the tag on github git push origin --tags
  10. Publish the npm package with npm publish command
  11. It should be OK
  12. Go on github release page: Focus-components releases and draft a new release with a release note detailing all the changes and bug fixes.
  13. Go back on master branch and increase the package version on the latest digit: X.Y.Z+1