Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #30 from pxblue/dev
Browse files Browse the repository at this point in the history
Publish v2.1.0
  • Loading branch information
daileytj authored Nov 3, 2021
2 parents 3b090f7 + e6162b6 commit 789c1bb
Show file tree
Hide file tree
Showing 22 changed files with 392 additions and 306 deletions.
122 changes: 69 additions & 53 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,58 +1,74 @@
version: 2
version: 2.1
orbs:
gh: circleci/[email protected]
jobs:
build:
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- run:
name: Install Dependencies
command: yarn
- run:
name: Test
command: yarn test
- run:
name: Build Package
command: yarn build
- run:
name: Verify Artifacts
command: yarn test:build
- persist_to_workspace:
root: .
paths:
- dist
build:
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- run:
name: Install Dependencies
command: yarn
- run:
name: Test
command: yarn test
- run:
name: Build Package
command: yarn build
- run:
name: Verify Artifacts
command: yarn test:build
- persist_to_workspace:
root: .
paths:
- dist

publish:
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: Publish @pxblue/highcharts
command: |
MASTER_VERSION=`node -p "require('./package.json').version"`
NPM_LATEST_VERSION=`npm show @pxblue/highcharts version`
if ! [ $MASTER_VERSION == $NPM_LATEST_VERSION ];
then
npm publish
else
echo "Latest version is already published."
fi
publish:
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- attach_workspace:
at: .
- run:
name: Authenticate with registry
command: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
echo "//registry.yarnpkg.com/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run:
name: Publish @brightlayer-ui/highcharts
command: |
yarn publish:package -b $CIRCLE_BRANCH
tag:
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- gh/setup
- run:
name: Tag @brightlayer-ui/highcharts
command: |
yarn tag:package -b $CIRCLE_BRANCH -s -blui-highcharts
workflows:
version: 2
types:
jobs:
- build
- publish:
requires:
version: 2
types:
jobs:
- build
filters:
branches:
only:
- master
- publish:
requires:
- build
filters:
branches:
only:
- master
- dev
- tag:
requires:
- publish
filters:
branches:
only:
- master
8 changes: 4 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
parser: '@typescript-eslint/parser',
extends: [ '@pxblue/eslint-config/ts', '@pxblue/eslint-config/tsx' ],
parserOptions: {
module.exports = {
parser: '@typescript-eslint/parser',
extends: ['@brightlayer-ui/eslint-config/ts', '@brightlayer-ui/eslint-config/tsx'],
parserOptions: {
project: "./tsconfig.json",
},
env: {
Expand Down
44 changes: 31 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,45 @@
# CHANGELOG

### v2.1.0
## v2.1.0 (November 3, 2021)

### Changed

- Changed package namespace from `@pxblue` to `@brightlayer-ui`.

## Package Migration Notice

Previous versions listed after this indicator refer to our deprecated `@pxblue` packages.

---

### v2.1.0 (March 30, 2021)

### Added
- Utility functions for translating chart labels and formats.

### v2.0.0
- Utility functions for translating chart labels and formats.

### v2.0.0 (January 22, 2020)

### Changed
- Library converted to TypeScript to provide strong typings for TS projects. This will continue to work for plain JavaScript projects without any changes necessary.

### v1.1.0
- Library converted to TypeScript to provide strong typings for TS projects. This will continue to work for plain JavaScript projects without any changes necessary.

### v1.1.0 (November 21, 2018)

### Changed

Significant improvements to the way we generate charts:
* We now expose chart generator functions, rather than sample config objects
* These generator functions accept a configuration object that supports any Highcharts configuration properties
* If required data is missing, sample data will be injected automatically
* Leaving the config object blank will generate a complete sample chart that can be used as a placeholder

- We now expose chart generator functions, rather than sample config objects
- These generator functions accept a configuration object that supports any Highcharts configuration properties
- If required data is missing, sample data will be injected automatically
- Leaving the config object blank will generate a complete sample chart that can be used as a placeholder

Breaking changes:
* We no longer export chart samples from the /samples directory
* baseConfig object exports have been replaced by the chart generator functions

### v1.0.0
- This library has been ported from @pxblue/visualizations
- We no longer export chart samples from the /samples directory
- baseConfig object exports have been replaced by the chart generator functions

### v1.0.0 (October 26, 2018)

- This library has been ported from @pxblue/visualizations
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @emclaug2 @daileytj @huayunh
26 changes: 21 additions & 5 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
# Publishing Instructions

To update the version number, edit the version in `package.json`.
## Automatic Publishing

To publish a new package through NPM, run the following commands from the root folder:
This package is published to NPM automatically by CircleCI when code is merged into the `dev` or `master` branches. To publish a new version, simply update the version in `package.json` and merge your code into the appropriate branch.
- The `dev` branch will publish versions marked as `alpha` or `beta`.
- The `master` branch will publish any version (`alpha`, `beta`, or `latest`).
In both cases, the code will only be published if the version number differs from the current version published under the respective dist tag.

## Manually Publishing

If you need to publish a package manually, you can run the following commands from the root folder:

```
yarn build
yarn publish:package
```
yarn build
npm publish --tag <alpha | beta>

The publishing script will look at the version in the `package.json` and automatically determine whether to publish an alpha, beta, or latest package.

For this command to work, you must have an NPM token configured in your environment variables or you can perform a login prior to executing the publish command via:

```sh
yarn build
npm adduser && yarn publish:package
```

> The above command should only be run for `alpha` or `beta` packages. This repo's CircleCI will automatically publish latest packages from the master branch.
> Publishing manually should only be done for `alpha` or `beta` packages. The command will work for `latest` packages, but this should be avoided except in rare situations where the automatic publishing functionality is not working in CircleCI.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Highcharts Configurations
[![](https://img.shields.io/npm/v/@pxblue/highcharts.svg?label=@pxblue/highcharts&style=flat)](https://www.npmjs.com/package/@pxblue/highcharts)
[![](https://img.shields.io/circleci/project/github/pxblue/highcharts/master.svg?style=flat)](https://circleci.com/gh/pxblue/highcharts/tree/master)
[![](https://img.shields.io/npm/v/@brightlayer-ui/highcharts.svg?label=@brightlayer-ui/highcharts&style=flat)](https://www.npmjs.com/package/@brightlayer-ui/highcharts)
[![](https://img.shields.io/circleci/project/github/brightlayer-ui/highcharts/master.svg?style=flat)](https://circleci.com/gh/brightlayer-ui/highcharts/tree/master)

This package contains basic support for basic HighCharts line, pie, bar, and donut graphs for use with PX Blue.
This package contains basic support for basic HighCharts line, pie, bar, and donut graphs for use with Brightlayer UI.

## Installation
Install with npm:
```
npm install --save @pxblue/highcharts
npm install --save @brightlayer-ui/highcharts
```
or yarn
```
yarn add @pxblue/highcharts
yarn add @brightlayer-ui/highcharts
```

## Basic Usage
Expand All @@ -23,7 +23,7 @@ import {
createPieGraph,
createDonutGraph,
createBarGraph
} from '@pxblue/highcharts';
} from '@brightlayer-ui/highcharts';
```

and then use them as placeholders in your application.
Expand All @@ -47,7 +47,7 @@ This will use the default sample data to render a chart in your application. Rea
When you are ready to customize charts of your own, you can pass a configuration object into the chart generator functions.

```
import { createPieChart } from '@pxblue/highcharts';
import { createPieChart } from '@brightlayer-ui/highcharts';
...
let myPieConfig = {
series: [{
Expand All @@ -71,24 +71,24 @@ This package also includes several utility functions and style variables to make
```
import {
OpenSans,
pxblueColors,
bluiColors,
sizes
} from '@pxblue/highcharts/styles';
} from '@brightlayer-ui/highcharts/styles';
import {
getRandomData,
sharedTooltipFormatter,
sharedTimeTooltipFormatter,
simpleTooltipFormatter
} from '@pxblue/highcharts/utilities';
} from '@brightlayer-ui/highcharts/utilities';
```

### Translations

Several functions are provided that will translate the language and format of chart labels. These functions can be imported from the i18n file and accept a language locale string as their argument.

```tsx
import { getChartsLanguage, getChartsAxisDateTimeLabelFormats, getChartsTooltipDateTimeLabelFormats } from '@pxblue/highcharts';
import { getChartsLanguage, getChartsAxisDateTimeLabelFormats, getChartsTooltipDateTimeLabelFormats } from '@brightlayer-ui/highcharts';
...
const langOptions = getChartsLanguage('fr');
const axisFormats = getChartsAxisDateTimeLabelFormats('fr');
Expand All @@ -112,5 +112,5 @@ const tooltipFormats = getChartsTooltipDateTimeLabelFormats('fr');
## Demos
| Framework | Live Examples |
|-----------|--------------------------------------------------------------------------------------------------|
| Angular | [View on Stackblitz](https://stackblitz.com/github/pxblue/highcharts/tree/master/angular-demo) |
| React | [View on Code Sandbox](https://codesandbox.io/s/github/pxblue/highcharts/tree/master/react-demo) |
| Angular | [View on Stackblitz](https://stackblitz.com/github/brightlayer-ui/highcharts/tree/master/angular-demo) |
| React | [View on Code Sandbox](https://codesandbox.io/s/github/brightlayer-ui/highcharts/tree/master/react-demo) |
22 changes: 11 additions & 11 deletions angular-demo/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: [ '@pxblue/eslint-config/ts' ],
parserOptions: {
project: "./tsconfig.json",
},
env: {
browser: true
}
};
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
extends: ['@brightlayer-ui/eslint-config/ts'],
parserOptions: {
project: "./tsconfig.json",
},
env: {
browser: true
}
};
11 changes: 7 additions & 4 deletions angular-demo/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
# Highcharts Demo
This is a sample application demonstrating the PXBlue Highcharts library.

[View on Stackblitz](https://stackblitz.com/github/pxblue/highcharts/tree/master/angular-demo)
This is a sample application demonstrating the Brightlayer UI Highcharts library.

[View on Stackblitz](https://stackblitz.com/github/brightlayer-ui/highcharts/tree/master/angular-demo)

## Running the Example

```
git clone https://github.com/pxblue/highcharts
git clone https://github.com/brightlayer-ui/highcharts
cd highcharts
yarn start:angular
```

> **NOTE**: running the demo will use the latest src files from the repository and NOT the themes that are published on NPM.
For additional information read our [Angular Guide](https://pxblue.github.io/development/frameworks-web/angular) and our [Environment Setup](https://pxblue.github.io/development/environment)
For additional information read our [Angular Guide](https://brightlayer-ui.github.io/development/frameworks-web/angular) and our [Environment Setup](https://brightlayer-ui.github.io/development/environment)
10 changes: 5 additions & 5 deletions angular-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"@angular/platform-browser-dynamic": "~11.2.7",
"@angular/router": "~11.2.7",
"@pxblue/angular-themes": "^6.0.1",
"@pxblue/colors": "^3.0.0",
"@pxblue/highcharts": "^2.1.0-beta.0",
"@brightlayer-ui/colors": "^3.0.1",
"@brightlayer-ui/highcharts": "^2.1.0-beta.0",
"angular-highcharts": "^11.3.1",
"highcharts": "^9.0.1",
"rxjs": "~6.6.0",
Expand All @@ -39,8 +39,8 @@
"@angular-devkit/build-angular": "~0.1102.6",
"@angular/cli": "~11.2.6",
"@angular/compiler-cli": "~11.2.7",
"@pxblue/eslint-config": "^2.0.4",
"@pxblue/prettier-config": "^1.0.2",
"@brightlayer-ui/eslint-config": "^2.0.5",
"@brightlayer-ui/prettier-config": "^1.0.3",
"@types/jasmine": "~3.6.0",
"@types/node": "^12.11.1",
"@typescript-eslint/eslint-plugin": "^4.5.0",
Expand All @@ -60,5 +60,5 @@
"ts-node": "~8.3.0",
"typescript": "~4.1.5"
},
"prettier": "@pxblue/prettier-config"
"prettier": "@brightlayer-ui/prettier-config"
}
Loading

0 comments on commit 789c1bb

Please sign in to comment.