Skip to content

Commit

Permalink
fix(paths): fixes incorrect paths to assets (#51)
Browse files Browse the repository at this point in the history
* fix incorrect paths

* remove card class from widgets

* bump publish version
  • Loading branch information
elisechant authored Apr 17, 2017
1 parent a40df5c commit b30aa84
Show file tree
Hide file tree
Showing 13 changed files with 34 additions and 31 deletions.
9 changes: 6 additions & 3 deletions config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = {
'react-native': 'react-native-web'
}
},

module: {
// First, run the linter.
// It's important to do this before Babel processes the JS.
Expand Down Expand Up @@ -127,7 +127,7 @@ module.exports = {
include: paths.appSrc,
loader: 'babel',
query: {

// This is a feature of `babel-loader` for webpack (not Babel itself).
// It enables caching results in ./node_modules/.cache/babel-loader/
// directory for faster rebuilds.
Expand Down Expand Up @@ -161,7 +161,7 @@ module.exports = {
// Remember to add the new extension(s) to the "url" loader exclusion list.
]
},

// We use PostCSS for autoprefixing only.
postcss: function() {
return [
Expand All @@ -176,6 +176,9 @@ module.exports = {
];
},
plugins: [
new webpack.DefinePlugin({
__DEV__: process.env.NODE_ENV || true,
}),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
Expand Down
3 changes: 3 additions & 0 deletions config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,9 @@ module.exports = {
];
},
plugins: [
new webpack.DefinePlugin({
__DEV__: process.env.NODE_ENV || false,
}),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
// <link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
Expand Down
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
module.exports = require('./lib/Datavizkit');
if (typeof __DEV__ !== 'undefined' && __DEV__) {
module.exports = require('./src/Datavizkit');
} else {
module.exports = require('./lib/Datavizkit');
}
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gov.au/datavizkit",
"version": "0.0.9-development",
"version": "0.0.10-development",
"description": "A fully featured data visualisation toolset built on top of Highcharts and React.",
"keywords": [
"highcharts",
Expand All @@ -17,9 +17,11 @@
"bugs": {
"url": "https://github.com/govau/datavizkit/issues"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"homepage": "https://datavizkit.surge.sh/",
"dependencies": {
"deep-merge": "^1.0.0",
"highcharts": "^5.0.9",
"lodash": "^4.17.4",
"react": "^15.4.2",
Expand Down
10 changes: 5 additions & 5 deletions src/Datavizkit.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ Exports the library
*/

import ColumnWidget from './components/widgets/column';
import LineWidget from './components/widgets/line';
import SparklineWidget from './components/widgets/sparkline';
import DonutWidget from './components/widgets/donut';
import StackedColumnWidget from './components/widgets/stackedColumn';
import ColumnWidget from './components/columnWidget';
import LineWidget from './components/lineWidget';
import SparklineWidget from './components/sparklineWidget';
import DonutWidget from './components/donutWidget';
import StackedColumnWidget from './components/stackedColumnWidget';

export {
ColumnWidget,
Expand Down
2 changes: 1 addition & 1 deletion src/components/columnWidget/columnWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import withColumnChart from './../withColumnChart';
// might also have a ColumnWidgetLarge or ColumnWidgetMonochrome
const ColumnWidget = (props) => {
return (
<article className="chart--column card" role="article">
<article className="chart--column" role="article">
<header>
<div>Column Widget</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/components/donutWidget/donutWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import withDonutChart from './../withDonutChart';
// might also have a ColumnWidgetLarge or ColumnWidgetMonochrome
const DonutWidget = (props) => {
return (
<article className="chart--donut card" role="article">
<article className="chart--donut" role="article">
<header>
<div>Donut Widget</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/components/lineWidget/lineWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import withLineChart from './../withLineChart';
// might also have a ColumnWidgetLarge or ColumnWidgetMonochrome
const LineWidget = (props) => {
return (
<article className="chart--line card" role="article">
<article className="chart--line" role="article">
<header>
<div>Column Widget</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/components/sparklineWidget/sparklineWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import withSparklineChart from './../withSparklineChart';
// might also have a SparklineWidgetLarge or SparklineWidgetMonochrome
const SparklineWidget = (props) => {
return (
<article className="chart--sparkline card" role="article">
<article className="chart--sparkline" role="article">
<header>
<div>Sparkline Widget</div>
</header>
Expand Down
2 changes: 1 addition & 1 deletion src/components/stackedColumnWidget/stackedColumnWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import withStackedColumnChart from './../withStackedColumnChart';
// might also have a StackedColumnWidgetLarge or StackedColumnWidgetMonochrome
const StackedColumnWidget = (props) => {
return (
<article className="chart--stackedColumn card" role="article">
<article className="chart--stackedColumn" role="article">
<header>
<div>StackedColumn Widget</div>
</header>
Expand Down
1 change: 1 addition & 0 deletions src/components/withColumnChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import Legend from './customLegend.js';


// render a column chart and manage column chart stuff
// and manages *all state*
const withColumnChart = (ComposedComponent) => {
return class extends PureComponent {
constructor(props) {
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import React from 'react';
import {render} from 'react-dom';

import ColumnWidget from './components2/columnWidget';
import LineWidget from './components2/lineWidget';
import StackedColumnWidget from './components2/stackedColumnWidget';
import DonutWidget from './components2/donutWidget';
import SparklineWidget from './components2/sparklineWidget';
import ColumnWidget from './components/columnWidget';
import LineWidget from './components/lineWidget';
import StackedColumnWidget from './components/stackedColumnWidget';
import DonutWidget from './components/donutWidget';
import SparklineWidget from './components/sparklineWidget';


render(
Expand Down
10 changes: 0 additions & 10 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2001,12 +2001,6 @@ deep-is@~0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"

deep-merge@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/deep-merge/-/deep-merge-1.0.0.tgz#0906cc56c3a93099ae093fe995589eefe38a0e95"
dependencies:
xtend "~1.0.3"

default-require-extensions@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
Expand Down Expand Up @@ -6955,10 +6949,6 @@ xml-name-validator@^2.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af"

xtend@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/xtend/-/xtend-1.0.3.tgz#3f5d937353cced8e085399a563fdb22541c2960a"

y18n@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
Expand Down

0 comments on commit b30aa84

Please sign in to comment.