Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(paths): fix component paths which were incorrect for npm #53

Merged
merged 8 commits into from
Apr 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion config/webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,10 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
__DEV__: process.env.NODE_ENV || true,
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'development')
},
__DEV__: process.env.NODE_ENV === 'development' || true
}),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
Expand Down
5 changes: 4 additions & 1 deletion config/webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,10 @@ module.exports = {
},
plugins: [
new webpack.DefinePlugin({
__DEV__: process.env.NODE_ENV || false,
'process.env': {
NODE_ENV: JSON.stringify(process.env.NODE_ENV || 'production')
},
__DEV__: process.env.NODE_ENV === 'development' || false,
}),
// Makes some environment variables available in index.html.
// The public URL is available as %PUBLIC_URL% in index.html, e.g.:
Expand Down
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
if (typeof __DEV__ !== 'undefined' && __DEV__) {
module.exports = require('./src/Datavizkit');
} else {
module.exports = require('./lib/Datavizkit');
}
module.exports = require('./lib/Datavizkit');
14 changes: 10 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gov.au/datavizkit",
"version": "0.0.10-development",
"version": "0.0.16-development",
"description": "A fully featured data visualisation toolset built on top of Highcharts and React.",
"keywords": [
"highcharts",
Expand All @@ -13,7 +13,6 @@
"url": "git+https://github.com/govau/datavizkit.git"
},
"main": "index.js",
"module": "lib/Datavizkit.js",
"bugs": {
"url": "https://github.com/govau/datavizkit/issues"
},
Expand All @@ -24,12 +23,19 @@
"dependencies": {
"highcharts": "^5.0.9",
"lodash": "^4.17.4",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"recompose": "^0.23.1",
"styled-components": "^1.4.4"
},
"peerDependencies": {
"react": "^15.5.4",
"react-dom": "^15.5.4"
},
"devDependencies": {
"recompose": "^0.23.1",
"styled-components": "^1.4.4",
"lodash": "^4.17.4",
"react": "^15.5.4",
"react-dom": "^15.5.4",
"autoprefixer": "6.7.2",
"babel-cli": "^6.24.1",
"babel-core": "^6.24.1",
Expand Down
28 changes: 15 additions & 13 deletions src/Datavizkit.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,18 @@ Exports the library

*/

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,
LineWidget,
SparklineWidget,
DonutWidget,
StackedColumnWidget
}

import ColumnWidget from './components/columnWidget/columnWidget.js';
export {ColumnWidget};

import LineWidget from './components/lineWidget/lineWidget.js';
export {LineWidget};

import SparklineWidget from './components/sparklineWidget/sparklineWidget.js';
export {SparklineWidget};

import DonutWidget from './components/donutWidget/donutWidget.js';
export {DonutWidget};

import StackedColumnWidget from './components/stackedColumnWidget/stackedColumnWidget.js';
export {StackedColumnWidget};
3 changes: 0 additions & 3 deletions src/components/columnWidget/columnWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import withColumnChart from './../withColumnChart';
const ColumnWidget = (props) => {
return (
<article className="chart--column" role="article">
<header>
<div>Column Widget</div>
</header>
<section>{props.children}</section>
</article>
)
Expand Down
1 change: 0 additions & 1 deletion src/components/columnWidget/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/donutWidget/donutWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import withDonutChart from './../withDonutChart';
const DonutWidget = (props) => {
return (
<article className="chart--donut" role="article">
<header>
<div>Donut Widget</div>
</header>
<section>{props.children}</section>
</article>
)
Expand Down
1 change: 0 additions & 1 deletion src/components/donutWidget/index.js

This file was deleted.

1 change: 0 additions & 1 deletion src/components/lineWidget/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/lineWidget/lineWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import withLineChart from './../withLineChart';
const LineWidget = (props) => {
return (
<article className="chart--line" role="article">
<header>
<div>Column Widget</div>
</header>
<section>{props.children}</section>
</article>
)
Expand Down
1 change: 0 additions & 1 deletion src/components/sparklineWidget/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/sparklineWidget/sparklineWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import withSparklineChart from './../withSparklineChart';
const SparklineWidget = (props) => {
return (
<article className="chart--sparkline" role="article">
<header>
<div>Sparkline Widget</div>
</header>
<section>{props.children}</section>
</article>
)
Expand Down
1 change: 0 additions & 1 deletion src/components/stackedColumnWidget/index.js

This file was deleted.

3 changes: 0 additions & 3 deletions src/components/stackedColumnWidget/stackedColumnWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ import withStackedColumnChart from './../withStackedColumnChart';
const StackedColumnWidget = (props) => {
return (
<article className="chart--stackedColumn" role="article">
<header>
<div>StackedColumn Widget</div>
</header>
<section>{props.children}</section>
</article>
)
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 './components/columnWidget';
import LineWidget from './components/lineWidget';
import StackedColumnWidget from './components/stackedColumnWidget';
import DonutWidget from './components/donutWidget';
import SparklineWidget from './components/sparklineWidget';
import ColumnWidget from './components/columnWidget/columnWidget.js';
import LineWidget from './components/lineWidget/lineWidget.js';
import SparklineWidget from './components/sparklineWidget/sparklineWidget.js';
import DonutWidget from './components/donutWidget/donutWidget.js';
import StackedColumnWidget from './components/stackedColumnWidget/stackedColumnWidget.js';


render(
Expand Down
26 changes: 17 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2590,7 +2590,7 @@ fb-watchman@^1.8.0, fb-watchman@^1.9.0:
dependencies:
bser "1.0.2"

fbjs@^0.8.1, fbjs@^0.8.4, fbjs@^0.8.5, fbjs@^0.8.7, fbjs@^0.8.8:
fbjs@^0.8.1, fbjs@^0.8.5, fbjs@^0.8.7, fbjs@^0.8.8, fbjs@^0.8.9:
version "0.8.11"
resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.11.tgz#340b590b8a2278a01ef7467c07a16da9b753db24"
dependencies:
Expand Down Expand Up @@ -5208,6 +5208,12 @@ [email protected], promise@^7.1.1:
dependencies:
asap "~2.0.3"

prop-types@^15.5.7, prop-types@~15.5.7:
version "15.5.8"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.5.8.tgz#6b7b2e141083be38c8595aa51fc55775c7199394"
dependencies:
fbjs "^0.8.9"

proto-list@~1.2.1:
version "1.2.4"
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
Expand Down Expand Up @@ -5338,13 +5344,14 @@ react-docgen@^2.13.0:
node-dir "^0.1.10"
recast "^0.11.5"

react-dom@^15.4.2:
version "15.4.2"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.4.2.tgz#015363f05b0a1fd52ae9efdd3a0060d90695208f"
react-dom@^15.5.4:
version "15.5.4"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.5.4.tgz#ba0c28786fd52ed7e4f2135fe0288d462aef93da"
dependencies:
fbjs "^0.8.1"
fbjs "^0.8.9"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "~15.5.7"

react-group@^1.0.3:
version "1.0.3"
Expand Down Expand Up @@ -5397,13 +5404,14 @@ react-styleguidist@^5.0.2:
webpack-dev-server "^1.16.3"
webpack-merge "^4.1.0"

react@^15.4.2:
version "15.4.2"
resolved "https://registry.yarnpkg.com/react/-/react-15.4.2.tgz#41f7991b26185392ba9bae96c8889e7e018397ef"
react@^15.5.4:
version "15.5.4"
resolved "https://registry.yarnpkg.com/react/-/react-15.5.4.tgz#fa83eb01506ab237cdc1c8c3b1cea8de012bf047"
dependencies:
fbjs "^0.8.4"
fbjs "^0.8.9"
loose-envify "^1.1.0"
object-assign "^4.1.0"
prop-types "^15.5.7"

read-pkg-up@^1.0.1:
version "1.0.1"
Expand Down