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 #29 from pxblue/dev
Browse files Browse the repository at this point in the history
Go BLUI
  • Loading branch information
EvanMcLaughlin-eaton authored Nov 3, 2021
2 parents 9b83918 + 786d0b2 commit 0404ec7
Show file tree
Hide file tree
Showing 40 changed files with 783 additions and 1,275 deletions.
98 changes: 57 additions & 41 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,46 +1,62 @@
version: 2
version: 2.1
orbs:
gh: circleci/[email protected]
jobs:
build:
docker:
- image: circleci/node:8.11-browsers
steps:
- checkout
- run:
name: Install Dependencies
command: yarn
- run:
name: Verify Artifacts
command: yarn test
build:
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- run:
name: Install Dependencies
command: yarn
- run:
name: Verify Artifacts
command: yarn test

publish:
docker:
- image: circleci/node:12.9.1-browsers
steps:
- checkout
- run:
name: Authenticate with registry
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
- run:
name: Publish @pxblue/mapbox
command: |
MASTER_VERSION=`node -p "require('./package.json').version"`
NPM_LATEST_VERSION=`npm show @pxblue/mapbox 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
- 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/mapbox
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/mapbox
command: |
yarn tag:package -b $CIRCLE_BRANCH
workflows:
version: 2
mapbox:
jobs:
- build
- publish:
requires:
version: 2
mapbox:
jobs:
- build
filters:
branches:
only:
- master
- publish:
requires:
- build
filters:
branches:
only:
- master
- dev
- tag:
requires:
- publish
filters:
branches:
only:
- master
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Changelog

## v1.0.1 (November 1, 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.

---

## v1.0.1 (October 26, 2018)

- Initial Release
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @emclaug2 @daileytj @jeffvg
23 changes: 19 additions & 4 deletions PUBLISHING.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
# 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:

```sh
yarn publish:package
```
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
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.
34 changes: 24 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,38 @@
# Mapbox Themes
This package contains various Mapbox themes for use with PX Blue.

This package contains various Mapbox themes for use with Brightlayer UI.

## Installation

Install with npm

```
npm install --save @pxblue/mapbox
npm install --save @brightlayer-ui/mapbox
```

or yarn

```
yarn add @pxblue/mapbox
yarn add @brightlayer-ui/mapbox
```

## Usage
To use the PX Blue themes for Mapbox, you simply need to pass the theme file into the configuration object for mapbox initialization.

To use the Brightlayer UI themes for Mapbox, you simply need to pass the theme file into the configuration object for mapbox initialization.

### Angular

Import the theme into your target typescript file:

```
// app.component.ts
declare var require;
const defaultTheme = require('@pxblue/mapbox/default.json');
const darkTheme = require('@pxblue/mapbox/dark.json');
const defaultTheme = require('@brightlayer-ui/mapbox/default.json');
const darkTheme = require('@brightlayer-ui/mapbox/dark.json');
```

Bind the theme to the style attribute of the ```<mgl-map>```:
Bind the theme to the style attribute of the `<mgl-map>`:

```
// app.component.html
<mgl-map
Expand All @@ -33,14 +43,17 @@ Bind the theme to the style attribute of the ```<mgl-map>```:
```

### React

Import the theme into your target file:

```
// App.js
const defaultTheme = require('@pxblue/mapbox/default.json');
const darkTheme = require('@pxblue/mapbox/dark.json');
const defaultTheme = require('@brightlayer-ui/mapbox/default.json');
const darkTheme = require('@brightlayer-ui/mapbox/dark.json');
```

Apply the theme variable to the style parameter of the mapboxgl configuration:

```
// App.js
const map = new mapboxgl.Map({
Expand All @@ -52,4 +65,5 @@ const map = new mapboxgl.Map({
```

### More Information
For more detailed instructions on using Mapbox in your application, read about our [Visualization Patterns](https://pxblue.github.io/patterns/visualizations) and see our demos for [Angular](https://stackblitz.com/github/pxblue/mapbox/tree/master/angular-demo) and [React](https://codesandbox.io/s/github/pxblue/mapbox/tree/master/react-demo).

For more detailed instructions on using Mapbox in your application, read about our [Visualization Patterns](https://brightlayer-ui.github.io/patterns/visualizations) and see our demos for [Angular](https://stackblitz.com/github/brightlayer-ui/mapbox/tree/master/angular-demo) and [React](https://codesandbox.io/s/github/brightlayer-ui/mapbox/tree/master/react-demo).
5 changes: 4 additions & 1 deletion angular-demo/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Mapbox Demo

This is a sample application demonstrating the appearance of the PX Blue Mapbox themes.

[View on Stackblitz](https://stackblitz.com/github/pxblue/mapbox/tree/master/angular-demo)

## Running the Example

```
git clone https://github.com/pxblue/mapbox
yarn start:react
```

> **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://pxblue.github.io/development/frameworks-web/angular) and our [Environment Setup](https://pxblue.github.io/development/environment)
Loading

0 comments on commit 0404ec7

Please sign in to comment.