Skip to content

Commit d7c03bd

Browse files
committed
Merge pull request #79 from TechnologyAdvice/feature/fix-paths-and-deps
Fix paths and deps
2 parents 4627d6c + 58ce6bf commit d7c03bd

86 files changed

Lines changed: 520 additions & 374 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ bower_components/*
55
node_modules/*
66
docs/build/*
77
testBundle.js
8+
dist/*

.eslintrc

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
{
2-
"extends": "ta-webapp"
2+
"extends": "ta-webapp",
3+
"env": {
4+
"node": true
5+
}
36
}

.gitignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
.DS_Store
2-
.idea/
1+
# HEADS UP!
2+
#
3+
# 'npm run clean' runs rm -rf on all lines in this file.
4+
#
5+
36
_builds/
47
_projects/
58
_steps/
69
npm-debug.log
710
node_modules/
811
bower_components/
912
testBundle.js
13+
dist/
1014
docs/build
1115
docgenInfo.json

ENV.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44
* @type {object}
55
*/
66
const ENV = {
7-
setTest: function() {
7+
setTest() {
88
process.env.NODE_ENV = 'test';
99
},
10-
setStaging: function() {
10+
setStaging() {
1111
process.env.NODE_ENV = 'staging';
1212
},
13-
setProduction: function() {
13+
setProduction() {
1414
process.env.NODE_ENV = 'production';
1515
},
16-
setDevelopment: function() {
16+
setDevelopment() {
1717
process.env.NODE_ENV = 'development';
1818
},
1919

20-
isProduction: function() {
20+
isProduction() {
2121
return process.env.NODE_ENV === 'production';
2222
},
23-
isTest: function() {
23+
isTest() {
2424
return process.env.NODE_ENV === 'test';
2525
},
26-
isStaging: function() {
26+
isStaging() {
2727
return process.env.NODE_ENV === 'staging';
2828
},
29-
isDevelopment: function() {
29+
isDevelopment() {
3030
return process.env.NODE_ENV === 'development' || !ENV.isProduction() && !ENV.isTest() && !ENV.isStaging();
3131
},
3232
};
3333

34-
module.exports = ENV;
34+
export default ENV;

dev-env.js

Lines changed: 0 additions & 10 deletions
This file was deleted.

docs/app/Components/ComponentDoc/ComponentDescription.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import _ from 'lodash';
12
import React, {Component, PropTypes} from 'react';
23
import SEMANTIC_TYPES from 'docs/app/utils/SemanticTypes';
34
import STARDUST_TYPES from 'docs/app/utils/StardustTypes';
@@ -42,7 +43,7 @@ export default class ComponentDescription extends Component {
4243
}
4344

4445
render() {
45-
let semanticDocsLink = (
46+
const semanticDocsLink = (
4647
<a href={this.semanticDocUrl} target='_blank'>
4748
<i className='book icon' />
4849
Semantic UI Docs

docs/app/Components/ComponentDoc/ComponentDoc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default class ComponentDoc extends Component {
1212
};
1313

1414
render() {
15-
let doc = getComponentDocInfo(this.props.name);
15+
const doc = getComponentDocInfo(this.props.name);
1616

1717
return (
1818
<Segment id={doc.name}>

docs/app/Components/ComponentDoc/ComponentExample.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export default class ComponentExample extends Component {
2323
};
2424

2525
render() {
26-
let code = (
26+
const code = (
2727
<Column>
2828
<Highlight className='language-javascript'>
2929
{this.fileContents}

docs/app/Components/ComponentDoc/ComponentExamples.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ export default class ComponentExamples extends Component {
88
};
99

1010
render() {
11-
let examples = exampleContext.keys()
11+
const examples = exampleContext.keys()
1212
.filter(path => path.includes(`/${this.props.name}Examples.js`))
1313
.map((path, i) => {
14-
let Example = exampleContext(path);
14+
const Example = exampleContext(path);
1515
return <Example key={i} />;
1616
});
1717

18-
let content = (
18+
const content = (
1919
<Segment className='basic vertical'>
2020
<h2 className='ui header'>Examples</h2>
2121
{examples}

docs/app/Components/ComponentDoc/ComponentProps.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ export default class ComponentProps extends Component {
1515
};
1616

1717
nameRenderer(item) {
18-
let required = item.required && <span className='ui mini red circular label'>required</span>;
18+
const required = item.required && <span className='ui mini red circular label'>required</span>;
1919
return <div>{item.name} {required}</div>;
2020
}
2121

2222
defaultValueRenderer(item) {
23-
let defaultValue = _.get(item, 'defaultValue.value');
24-
let defaultIsComputed = <span className='ui mini gray circular label'>computed</span>;
23+
const defaultValue = _.get(item, 'defaultValue.value');
24+
const defaultIsComputed = <span className='ui mini gray circular label'>computed</span>;
2525

2626
return (
2727
<div>
@@ -31,20 +31,20 @@ export default class ComponentProps extends Component {
3131
}
3232

3333
render() {
34-
var propsDefinition = this.props.props;
35-
var content = _.map(propsDefinition, (propConfig, propName) => {
36-
let name = propName;
37-
let description = _.get(propConfig, 'docBlock.description');
34+
const propsDefinition = this.props.props;
35+
const content = _.map(propsDefinition, (propConfig, propName) => {
36+
const name = propName;
37+
const description = _.get(propConfig, 'docBlock.description');
3838

39+
const value = _.get(propConfig, 'type.value');
3940
let type = _.get(propConfig, 'type.name');
40-
let value = _.get(propConfig, 'type.value');
4141
if (type === 'union') {
4242
type = _.map(value, (val) => val.name).join('|');
4343
}
4444
type = type && `{${type}}`;
4545

46-
let required = propConfig.required;
47-
let defaultValue = propConfig.defaultValue;
46+
const required = propConfig.required;
47+
const defaultValue = propConfig.defaultValue;
4848

4949
return {
5050
name,

0 commit comments

Comments
 (0)