Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Chore: Create separate package for terra-docs (#105)
Browse files Browse the repository at this point in the history
* Created separate package for terra-graphs-docs
  • Loading branch information
sdadn authored May 4, 2021
1 parent 12ebd95 commit df08163
Show file tree
Hide file tree
Showing 56 changed files with 417 additions and 88 deletions.
29 changes: 24 additions & 5 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ---
parser: babel-eslint
extends: "@cerner/eslint-config-terra"
extends: "@cerner/terra"
settings:
polyfills:
- Promise
Expand Down Expand Up @@ -53,6 +53,12 @@
import/no-unresolved: off
import/extensions: off

- files: "**/tests/**/*.jsx"
rules:
import/no-extraneous-dependencies: off
import/no-unresolved: off
import/extensions: off

- files: "**/dev/**/*.js"
rules:
import/no-extraneous-dependencies: off
Expand All @@ -72,8 +78,21 @@
import/first: off
import/no-duplicates: off

- files: "**/*/terra-dev-site/**/*.jsx"
- files: "packages/terra-graphs-docs/*.jsx"
rules:
import/no-extraneous-dependencies: off
import/no-unresolved: off
import/extensions: off

- files: "*.conf.js"
rules:
import/no-extraneous-dependencies: off
import/no-unresolved: off
import/extensions: off


- files: "*.config.js"
rules:
"import/no-extraneous-dependencies": off
"import/no-unresolved": off
"import/extensions": off
import/no-extraneous-dependencies: off
import/no-unresolved: off
import/extensions: off
7 changes: 7 additions & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
**/aggregated-translations/*.*
build
coverage
dist
generated-themes
lib
node_modules
8 changes: 8 additions & 0 deletions .stylelintrc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
extends: "@cerner/stylelint-config-terra"
rules:
scss/at-mixin-pattern: "^(terra-)[a-z]+([a-z0-9-]+[a-z0-9]+)?$"
selector-no-qualifying-type: null
property-no-vendor-prefix: null
terra/custom-property-name: null
terra/custom-property-namespace: null
terra/custom-property-pseudo-selectors: null
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ branches:
cache:
directories:
- travis-build
- docker_images
before_install:
# Clean install on any new build
- npm run clean
before_script:
- docker load -i docker_images/images.tar || true
jobs:
include:
- stage: danger lint jest and compile
Expand All @@ -25,6 +28,12 @@ jobs:
- npm run build:dist
# These can't be built in parallel because the cache is a single object and you can't add to it in parallel
- npm run compile:prod -- --env.disableAggregateThemes --output-path $TRAVIS_BUILD_DIR/travis-build/default
- npm run compile:lowlight -- --output-path $TRAVIS_BUILD_DIR/travis-build/lowlight
- npm run compile:fusion -- --output-path $TRAVIS_BUILD_DIR/travis-build/fusion
# Prime the docker cache
- docker-compose --file ./node_modules/@cerner/terra-functional-testing/lib/docker/docker-compose.yml pull
# Save docker cache
- docker save -o docker_images/images.tar $(docker images -a -q)
# Split out all the sizes to not eat up all the travis executors at once.

- stage: tiny & small
Expand All @@ -34,43 +43,37 @@ jobs:
# Rely on the cache for node_modules.. this won't work for any node modules in the packages dir but works for running wdio
install: skip
script:
# we start up our own standalone chrome instance because the Selenium Docker Service doesn't seem to work here.
- docker-compose up -d standalone-chrome-travis
# using the travis env section to set env variables seems to break cache
- SITE=$TRAVIS_BUILD_DIR/travis-build/default FORM_FACTOR=tiny npm run wdio-default

- name: small default-theme
before_install: skip
install: skip
script:
- docker-compose up -d standalone-chrome-travis
- SITE=$TRAVIS_BUILD_DIR/travis-build/default FORM_FACTOR=small npm run wdio-default

- stage: medium & large
name: medium default-theme
before_install: skip
install: skip
script:
- docker-compose up -d standalone-chrome-travis
- SITE=$TRAVIS_BUILD_DIR/travis-build/default FORM_FACTOR=medium npm run wdio-default
- name: large default-theme
before_install: skip
install: skip
script:
- docker-compose up -d standalone-chrome-travis
- SITE=$TRAVIS_BUILD_DIR/travis-build/default FORM_FACTOR=large npm run wdio-default

- stage: huge & enormous
name: huge default-theme
before_install: skip
install: skip
script:
- docker-compose up -d standalone-chrome-travis
- SITE=$TRAVIS_BUILD_DIR/travis-build/default FORM_FACTOR=huge npm run wdio-default
- name: enormous default-theme
before_install: skip
install: skip
script:
- docker-compose up -d standalone-chrome-travis
- SITE=$TRAVIS_BUILD_DIR/travis-build/default FORM_FACTOR=enormous npm run wdio-default

- stage: publish & deploy
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2020 Cerner Innovation, Inc.
Copyright 2020 - present Cerner Innovation, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 Cerner Innovation, Inc.
Copyright 2020 - present Cerner Innovation, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
[![Build Status](https://travis-ci.com/cerner/terra-graphs.svg?branch=main)](https://travis-ci.com/cerner/terra-graphs)
[![lerna](https://badgen.net/badge/maintained%20with/lerna/cc00ff)](https://lerna.js.org/)
![GitHub package.json version](https://img.shields.io/github/package-json/v/cerner/terra-graphs)
[![carbon-graphs bugs](https://img.shields.io/github/issues/cerner/terra-graphs/carbon-graphs%20bug?label=carbon-graphs%20bug)](https://github.com/cerner/terra-graphs/labels/carbon-graphs%20bug)
[![terra-graphs bugs](https://img.shields.io/github/issues/cerner/terra-graphs/terra-graphs%20bug?label=terra-graphs%20bug)](https://github.com/cerner/terra-graphs/labels/terra-graphs%20bug)
[![bugs](https://img.shields.io/github/issues/cerner/terra-graphs/bug?label=bugs)](https://github.com/cerner/terra-graphs/labels/bug)

Terra Graphs is a graphing library built using D3 visualization library. It provides an API for generating native graphs such as Line and Paired Result graphs based on design standards.

Expand Down Expand Up @@ -112,8 +111,8 @@ npm i @cerner/carbon-graphs --save-dev

### Getting Started

- [Getting Started](./packages/terra-graphs/docs/getting-started/GettingStarted.md)
- [API Reference](./packages/terra-graphs/docs/README.md)
- [Getting Started](./packages/terra-graphs-docs/docs/getting-started/GettingStarted.md)
- [API Reference](./packages/terra-graphs-docs/docs/README.md)

<hr>
<!-- -->
Expand All @@ -127,18 +126,18 @@ npm i @cerner/carbon-graphs --save-dev

### Graph types

- [Line](./packages/terra-graphs/docs/controls/Line.md#usage)
- [Multi Line](./packages/terra-graphs/docs/controls/Line.md#multi-line)
- [Spline Line](./packages/terra-graphs/docs/controls/Line.md#spline-line)
- [Paired Result](./packages/terra-graphs/docs/controls/PairedResult.md#usage)
- [Bar](./packages/terra-graphs/docs/controls/Bar.md#usage)
- [Timeline](./packages/terra-graphs/docs/controls/Timeline.md#usage)
- [Pie](./packages/terra-graphs/docs/controls/Pie.md#usage)
- [Gantt](./packages/terra-graphs/docs/controls/Gantt.md#usage)
- [Scatter](./packages/terra-graphs/docs/controls/Scatter.md#usage)
- [Bubble](./packages/terra-graphs/docs/controls/Bubble.md#usage)
- [Bubble Single Dataset](./packages/terra-graphs/docs/controls/BubbleSingleDataset.md)
- [Bubble Multiple Dataset](./packages/terra-graphs/docs/controls/BubbleMultipleDataset.md)
- [Line](./packages/terra-graphs-docs/docs/controls/Line.md#usage)
- [Multi Line](./packages/terra-graphs-docs/docs/controls/Line.md#multi-line)
- [Spline Line](./packages/terra-graphs-docs/docs/controls/Line.md#spline-line)
- [Paired Result](./packages/terra-graphs-docs/docs/controls/PairedResult.md#usage)
- [Bar](./packages/terra-graphs-docs/docs/controls/Bar.md#usage)
- [Timeline](./packages/terra-graphs-docs/docs/controls/Timeline.md#usage)
- [Pie](./packages/terra-graphs-docs/docs/controls/Pie.md#usage)
- [Gantt](./packages/terra-graphs-docs/docs/controls/Gantt.md#usage)
- [Scatter](./packages/terra-graphs-docs/docs/controls/Scatter.md#usage)
- [Bubble](./packages/terra-graphs-docs/docs/controls/Bubble.md#usage)
- [Bubble Single Dataset](./packages/terra-graphs-docs/docs/controls/BubbleSingleDataset.md)
- [Bubble Multiple Dataset](./packages/terra-graphs-docs/docs/controls/BubbleMultipleDataset.md)


### Graph Settings and Toggles
Expand Down Expand Up @@ -207,7 +206,7 @@ npm run dev
LICENSE
</h2>

Copyright 2020 Cerner Innovation, Inc.
Copyright 2020 - present Cerner Innovation, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Expand Down
37 changes: 17 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@
"browserslist": [
"extends @cerner/browserslist-config-terra"
],
"stylelint": {
"extends": "@cerner/stylelint-config-terra",
"rules": {
"scss/at-mixin-pattern": "^(terra-)[a-z]+([a-z0-9-]+[a-z0-9]+)?$"
}
},
"dependencies": {
"d3": "^5.16.0"
},
Expand All @@ -47,8 +41,12 @@
"@cerner/eslint-config-terra": "^5.0.0",
"@cerner/jest-config-terra": "^1.0.0",
"@cerner/stylelint-config-terra": "^4.0.0",
"@cerner/terra-cli": "^1.0.0",
"@cerner/terra-aggregate-translations": "^2.0.1",
"@cerner/terra-cli": "^1.6.0",
"@cerner/terra-functional-testing": "^1.0.1",
"@cerner/terra-open-source-scripts": "^1.0.1",
"@cerner/webpack-config-terra": "^1.3.1",
"autoprefixer": "^9.8.6",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-istanbul": "^6.0.0",
Expand Down Expand Up @@ -82,26 +80,25 @@
"loader-utils": "^1.4.0",
"mini-css-extract-plugin": "^0.9.0",
"one-cerner-style-icons": "https://github.com/cerner/one-cerner-style-icons/archive/v1.34.0.tar.gz",
"postcss": "^8.2.1",
"postcss-loader": "^3.0.0",
"prettier": "^2.0.5",
"prop-types": "^15.5.8",
"raf": "^3.4.1",
"react": "^16.8.5",
"react-dom": "^16.8.5",
"react-json-pretty": "^2.2.0",
"react-test-renderer": "^16.4.2",
"regenerator-runtime": "^0.13.2",
"style-loader": "^2.0.0",
"stylelint": "^13.0.0",
"terra-aggregate-translations": "^1.0.0",
"terra-dev-site": "^6.5.0",
"terra-disclosure-manager": "^4.9.0",
"terra-enzyme-intl": "^3.0.0",
"terra-toolkit": "^6.2.0",
"url-loader": "^4.1.1",
"webpack": "^4.30.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.3.1",
"webpack-merge": "^4.2.2"
"webpack-merge": "^5.1.4"
},
"scripts": {
"build": "webpack --config ./packages/carbon-graphs/webpack/webpack.config.js --env.TYPE=LIB",
Expand All @@ -111,7 +108,7 @@
"clean:install": "npm run clean && npm install",
"clean:obsolete-snapshots": "npm test -- -u",
"compile": "npm run compile:clean && npm run compile:build",
"compile:build": "lerna ls | sed 's/@cerner\\///g' | cut -d ' ' -f1 | xargs -I {} babel packages/{}/src --out-dir packages/{}/lib --copy-files",
"compile:build": "lerna ls -all | sed 's/@cerner\\///g' | cut -d ' ' -f1 | xargs -I {} babel packages/{}/src --out-dir packages/{}/lib --copy-files",
"compile:clean": "rm -rf packages/**/lib",
"compile:src": "lerna run compile",
"compile:prod": "rm -rf ./build; NODE_ENV=production webpack -p",
Expand All @@ -127,19 +124,19 @@
"lint:fix": "npm run lint:js:fix",
"lint:js": "eslint --ext .js,.jsx .",
"lint:js:fix": "eslint --fix --ext .js,.jsx .",
"lint:scss": "stylelint 'packages/**/src/**/*.scss' --syntax scss",
"lint:scss": "stylelint 'packages/**/*.scss' --syntax scss",
"prepare-for-release": "terra prepare-for-release",
"pretest": "npm run lint",
"postinstall": "link-parent-bin && npm run compile && npm run bootstrap:hoist && npm run build && npm run build:dist",
"start": "tt-serve",
"start-heroku": "tt-serve-static --port $PORT --site './build' ",
"start-prod": "tt-serve --env.disableHotReloading -p",
"start-static": "npm run compile:prod && tt-serve-static --site ./build",
"start": "webpack-dev-server",
"start-heroku": "terra express-server --port $PORT --site build",
"start-prod": "webpack-dev-server --env.disableHotReloading -p",
"start-static": "npm run compile:prod && terra express-server --site ./build",
"test": "npm run lint && npm run jest && npm run karma && npm run wdio",
"karma": "karma start ./packages/carbon-graphs/karma.config.js --single-run --no-auto-watch",
"wdio-default": "wdio",
"wdio-lowlight": "NODE_OPTIONS=--max-old-space-size=2048 THEME=clinical-lowlight-theme wdio",
"wdio-fusion": "THEME=orion-fusion-theme wdio",
"wdio-default": "terra wdio",
"wdio-lowlight": "NODE_OPTIONS=--max-old-space-size=2048 terra wdio --themes clinical-lowlight-theme",
"wdio-fusion": "terra wdio --themes orion-fusion-theme",
"wdio": "npm run wdio-default && npm run wdio-lowlight && npm run wdio-fusion"
}
}
1 change: 1 addition & 0 deletions packages/carbon-graphs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Changed
* Fixed rendering of timeline graph when it is rendered below another graph.
* Fixed Y-axis and y2-axis icons not updating during reflow.
* Updated `packages/carbon-graphs/README.md` so that links point to updated documentation path.

## 2.16.3 - (March 16, 2021)

Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-graphs/LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2020 Cerner Innovation, Inc.
Copyright 2017 - present Cerner Innovation, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-graphs/NOTICE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2020 Cerner Innovation, Inc.
Copyright 2021 - present Cerner Innovation, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
28 changes: 14 additions & 14 deletions packages/carbon-graphs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,30 +86,30 @@ The data can now by plotted by as a line graph by using the following:

This results in the following graph:

![Alt](../terra-graphs/docs/assets/carbon-simple-line-graph.png "simple line graph")
![Alt](../terra-docs/docs/assets/carbon-simple-line-graph.png "simple line graph")


## Graph types

The following graph types can be plotted using Carbon:

- [Line](../terra-graphs/docs/controls/Line.md#usage)
- [Multi Line](../terra-graphs/docs/controls/Line.md#multi-line)
- [Spline Line](../terra-graphs/docs/controls/Line.md#spline-line)
- [Paired Result](../terra-graphs/docs/controls/PairedResult.md#usage)
- [Bar](../terra-graphs/docs/controls/Bar.md#usage)
- [Timeline](../terra-graphs/docs/controls/Timeline.md#usage)
- [Pie](../terra-graphs/docs/controls/Pie.md#usage)
- [Gantt](../terra-graphs/docs/controls/Gantt.md#usage)
- [Scatter](../terra-graphs/docs/controls/Scatter.md#usage)
- [Bubble](../terra-graphs/docs/controls/Bubble.md#usage)
- [Bubble Single Dataset](../terra-graphs/docs/controls/BubbleSingleDataset.md)
- [Bubble Multiple Dataset](../terra-graphs/docs/controls/BubbleMultipleDataset.md)
- [Line](../terra-docs/docs/controls/Line.md#usage)
- [Multi Line](../terra-docs/docs/controls/Line.md#multi-line)
- [Spline Line](../terra-docs/docs/controls/Line.md#spline-line)
- [Paired Result](../terra-docs/docs/controls/PairedResult.md#usage)
- [Bar](../terra-docs/docs/controls/Bar.md#usage)
- [Timeline](../terra-docs/docs/controls/Timeline.md#usage)
- [Pie](../terra-docs/docs/controls/Pie.md#usage)
- [Gantt](../terra-docs/docs/controls/Gantt.md#usage)
- [Scatter](../terra-docs/docs/controls/Scatter.md#usage)
- [Bubble](../terra-docs/docs/controls/Bubble.md#usage)
- [Bubble Single Dataset](../terra-docs/docs/controls/BubbleSingleDataset.md)
- [Bubble Multiple Dataset](../terra-docs/docs/controls/BubbleMultipleDataset.md)


## LICENSE

Copyright 2020 Cerner Innovation, Inc.
Copyright 2017 - present Cerner Innovation, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-graphs/src/js/helpers/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export default {
highlight: 'carbon-highlight',
blur: 'carbon-blur',
bubbleBlur: 'carbon-bubble-blur',
svgIcon: 'carbon-svgIcon',
svgIcon: 'carbon-svg-icon',
axisLabelX: 'carbon-x-axis-label',
axisLabelY: 'carbon-y-axis-label',
axisLabelY2: 'carbon-y2-axis-label',
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-graphs/src/less/core.less
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ svg:not(:root) {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}

.carbon-svgIcon {
.carbon-svg-icon {
width: 0.625rem;
height: 0.625rem;
display: inline-block;
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-graphs/webpack/webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const path = require('path');
const merge = require('webpack-merge');
const { merge } = require('webpack-merge');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const { jsOptions, cssOptions } = require('./helpers/rules');

Expand Down
Loading

0 comments on commit df08163

Please sign in to comment.