2.4.3 • Published 4 years ago

connections-components v2.4.3

Weekly downloads
3
License
ISC
Repository
github
Last release
4 years ago

semantic-release Build Status

Section 31 Component Library

Components created by team Section 31

Dev Setup

Quick start

Make sure you have Node version >= 6.0 and NPM >= 3

Clone the repo, install and then start adding/editing components inside /src/lib

# clone the gaf-ng-app-starter repo and rename it (renamed 'new_awesome_lib' below)
git clone git@github.com:meltwater/connections-components.git connections-components

# change directory to our repo
cd connections-components

# install the repo with npm
npm install

# start the sandbox app
npm start

Navigate to https://localhost:3000

Development

NPM link

NPM link allows you to develop locally without publishing the npm package. If you are just working on your component, there is not need to use npm link, the sandbox app will work fine. But if you need to test your component in the consuming project, while making changes, npm link is right for you.

In connections component library

cd dist/connections-component
npm link

In consuming library

npm link @meltwater/connections-components

To continuously run the build on change(recommended when using npm link) you will want to run the build:watch script in the wildcards component library. Furthermore, you may want to enable a watcher on the consuming library to build when node_modules/@meltwater/ changes.

NPM Publish Connections-Components*

update revision no in package.json
npm run build
cd dist/connections-components
npm publish

Create PR for section 31

Create a new branch in connections-components based on master

do a npm install and then npm start to test changes.

If everything is good, check in the code, and create a PR. This repo is utilizing npm semantic-release, so it is important you use the proper commenting scheme.

Here is an example of the release type that will be done based on a commit messages:

Commit messageRelease type
fix(pencil): stop graphite breaking when too much pressure appliedPatch Release
feat(pencil): add 'graphiteWidth' optionMinor Feature Release
perf(pencil): remove graphiteWidth optionBREAKING CHANGE: The graphiteWidth option has been removed.The default graphite width of 10mm is always used for performance reasons.Major Breaking Release

NPM scripts

  • npm start: Runs npm run sandbox:serve
  • npm run build: Generate bundles and typings
  • npm run build:watch: Run build in watch mode (build will re-generate on save of any file in the src/dist directory)
  • npm run sandbox: Generate library bundle using npm run build and start sandbox web app using webpack dev server
  • npm run docs: Generate API docs for the library using compodoc
  • npm run docs:watch: Run docs generation in watch mode (docs will re-generate on save any file in the src/lib directory)
  • npm run test: Run unit test suite
  • npm run lint: Lints code using tslint

Generated from

https://github.com/meltwater/gaf-ng-lib-starter

Maintained by Section 31. Reach out to section31@meltwater.com for any questions about this repo.