Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
fix(pkg): drop storybook, add missing deps
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaringe committed Mar 10, 2017
1 parent 4fdc46c commit 15d52ca
Show file tree
Hide file tree
Showing 13 changed files with 426 additions and 1,116 deletions.
2 changes: 0 additions & 2 deletions .storybook/addons.js

This file was deleted.

13 changes: 0 additions & 13 deletions .storybook/config.js

This file was deleted.

8 changes: 0 additions & 8 deletions .storybook/styleguidist/styleguidist.stories.js

This file was deleted.

3 changes: 0 additions & 3 deletions .storybook/styles.css

This file was deleted.

55 changes: 0 additions & 55 deletions .storybook/webpack.config.js

This file was deleted.

36 changes: 0 additions & 36 deletions .storybook/welcome/Welcome.js

This file was deleted.

6 changes: 0 additions & 6 deletions .storybook/welcome/Welcome.stories.js

This file was deleted.

25 changes: 9 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,8 @@
"lib"
],
"devDependencies": {
"@kadira/storybook": "^2.21.0",
"@kadira/storybook-addon-knobs": "^1.4.1",
"@kadira/storybook-addon-notes": "^1.0.1",
"@kadira/storybook-addons": "^1.6.1",
"@semantic-release/condition-codeship": "^1.1.0",
"@semantic-release/release-notes-generator": "^2.0.0",
"autoprefixer": "^6.5.2",
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-jest": "^19.0.0",
Expand All @@ -30,8 +25,10 @@
"coveralls": "^2.11.15",
"cross-spawn-promise": "^0.9.2",
"faker": "^4.1.0",
"file-loader": "^0.10.1",
"fs-extra": "^2.0.0",
"gh-pages": "^0.12.0",
"glob": "^7.1.1",
"gulp": "^3.9.1",
"html-loader": "^0.4.4",
"javascript-natural-sort": "^0.7.1",
Expand All @@ -53,25 +50,21 @@
"semantic-release-cli": "^3.0.2",
"semantic-ui": "^2.2.6",
"standard": "^9.0.0",
"storybook-host": "^1.0.7",
"url": "^0.11.0"
"style-loader": "^0.13.2",
"url": "^0.11.0",
"webpack": "^1.13.1"
},
"dependencies": {
"d3": "^4.4.0",
"d3": "^4.7.1",
"elegant-icons": "^0.0.1",
"flexbox-react": "^4.1.0",
"glob": "^7.1.1",
"flexbox-react": "^4.2.1",
"lato-font": "^2.0.0",
"react": "^15.4.1",
"react-dom": "^15.4.1",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"semantic-ui-react": "^0.66.0"
},
"scripts": {
"build": "node scripts/build",
"prebuild-storybook": "npm run build",
"build-storybook": "build-storybook",
"postbuild-storybook": "node scripts/build storybookPost",
"storybook": "start-storybook -p 6007",
"secure": "nsp check",
"lint": "standard 'src/**/*.js' '.storybook/**/*.js' 'scripts/**/*.js' 'test/**/*.js' 'stories/**/*.js'",
"test": "echo 'TBD'",
Expand Down
13 changes: 1 addition & 12 deletions scripts/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const pify = require('pify')
const os = require('os')

const exec = pify(cp.exec, { multiArgs: true })
const spawn = require('cross-spawn-promise')
const copy = pify(fs.copy)
const mkdirp = pify(fs.mkdirp)
const remove = pify(fs.remove)
Expand All @@ -27,11 +26,9 @@ module.exports = {
get semanticCSSFilename () { return path.join(this.stylesDist, 'semantic.css') },
get stylesDist () { return path.join(this.distDir, 'styles') },
get styleguidistDist () { return path.join(this.projectRoot, 'styleguide') },
get staticStorybookDist () { return path.join(this.projectRoot, 'storybook-static') },
get assetsDist () { return path.join(this.distDir, 'assets') },
/**
* Build full lib.
* @NOTE, does not build storybook. {@see this.storybook}
* @returns {Promise}
*/
build () {
Expand All @@ -48,7 +45,6 @@ module.exports = {
remove(this.coverageDir),
remove(this.distDir),
remove(this.semanticDist),
remove(this.staticStorybookDist),
remove(this.styleguidistDist)
])
},
Expand All @@ -60,7 +56,7 @@ module.exports = {
},
octagonComponentJs (opts) {
opts = opts || {}
const args = [this.getBin('babel'), 'src', '-d', this.componentDist, '--ignore', '*.stories.js', '--source-maps']
const args = [this.getBin('babel'), 'src', '-d', this.componentDist, '--source-maps']
if (opts.watch) args.push('--watch')
return Promise.resolve()
.then(() => mkdirp(this.componentDist))
Expand Down Expand Up @@ -98,12 +94,5 @@ module.exports = {
// ref: https://github.com/Semantic-Org/Semantic-UI/issues/2171
return this.semanticBuild()
.then(() => this.copySemanticAssets())
},
storybookPost () {
return spawn('npm', ['run', 'styleguide:build'], { cwd: this.projectRoot, stdio: 'inherit' })
.then(() => copy(
this.styleguidistDist,
path.join(this.staticStorybookDist, path.basename(this.styleguidistDist))
))
}
}
3 changes: 1 addition & 2 deletions src/components/charts/AreaChart/AreaChart.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react'
import PlotArea from './PlotArea'
import Immutable from 'immutable'
import Axis from './Axis'
import ToolTip from './ToolTip'
import Dots from '../Chart/Dots'
Expand Down Expand Up @@ -105,7 +104,7 @@ class AreaChart extends React.Component {
const margin = { top: 5, right: 50, bottom: 20, left: 50 }
const innerWidth = width - (margin.left + margin.right)
const innerHeight = height - (margin.top + margin.bottom)
const data = Immutable.fromJS(this.props.data).toJS() // copy data from props
const data = this.props.data
let xAxis = null
let xScale = null
let xScaleAxis = null
Expand Down
3 changes: 1 addition & 2 deletions src/components/charts/BarChart/BarChart.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { PropTypes } from 'react'
import Rect from './Rect'
import Immutable from 'immutable'
import ToolTip from './BarChartTooltip'
import * as ChartUtils from '../Chart/utils'
var d3 = Object.assign({}, require('d3-time-format'))
Expand Down Expand Up @@ -53,7 +52,7 @@ class BarChart extends React.Component {
const innerWidth = width - (margin.left + margin.right)
const innerHeight = height - (margin.top + margin.bottom)
const transform = `translate(-${margin.left}, ${margin.top})`
const data = Immutable.fromJS(this.props.data).toJS() // copy data from props
const data = this.props.data
let xScale = null

// const xScale = ChartUtils.xScaleBand(data, innerWidth, barPadding);
Expand Down
2 changes: 1 addition & 1 deletion styleguide.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = {
loaders: [
{
test: /\.(jpe?g|png|gif|svg)$/i,
loader: 'file?name=[name].[ext]'
loader: 'file-loader?name=[name].[ext]'
},
{
test: /\.css?$/,
Expand Down
Loading

0 comments on commit 15d52ca

Please sign in to comment.