Skip to content

Commit

Permalink
Merge pull request #918 from appnexus/webpack-4-build-clean
Browse files Browse the repository at this point in the history
Build upgrade (Webpack 4 & more)
  • Loading branch information
ogupte committed Apr 11, 2018
2 parents ab924ff + 48d086d commit 0927b81
Show file tree
Hide file tree
Showing 36 changed files with 2,528 additions and 3,730 deletions.
9 changes: 8 additions & 1 deletion .babelrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
{
"env": {
"test": {
"plugins": []
"plugins": [
["babel-plugin-transform-require-ignore", {
"extensions": [".less", ".css"]
}],
]
},
"development": {
"plugins": ["lodash"]
},
"production": {
"plugins": [
["babel-plugin-transform-require-ignore", {
"extensions": [".less", ".css"]
}],
["react-peek/babel", {
"minifyStatics": true
}],
Expand Down
2 changes: 1 addition & 1 deletion .storybook/lucid-docs-addon/ChildComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import ReactDOMServer from 'react-dom/server';
import _ from 'lodash';
import marksy from 'marksy/components';
import PropTypes from './PropTypes';
import { stripIndent } from '../../src/docs/util';
import { stripIndent } from './util';

import SyntaxHighlighter, {
registerLanguage,
Expand Down
2 changes: 1 addition & 1 deletion .storybook/lucid-docs-addon/PropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import ReactDOMServer from 'react-dom/server';
import _ from 'lodash';
import marksy from 'marksy/components';
import { stripIndent } from '../../src/docs/util';
import { stripIndent } from './util';

import SyntaxHighlighter, {
registerLanguage,
Expand Down
2 changes: 1 addition & 1 deletion .storybook/lucid-docs-addon/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import _ from 'lodash';
import addons from '@storybook/addons';
import { stripIndent } from '../../src/docs/util';
import { stripIndent } from './util';
import marksy from 'marksy';
import Hoverable from './Hoverable';

Expand Down
16 changes: 16 additions & 0 deletions .storybook/lucid-docs-addon/util.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const stripIndent = text => {
if (!text) {
return '';
}

const sigLines = text.split(/\n/).filter(line => !/^\s*$/.test(line));
const leadingWhitespaces = sigLines.map(line => /^(\s*)/g.exec(line)[1]);
const minimumLeadingWhitespace = leadingWhitespaces.reduce(
(min, line) => (line.length < min.length ? line : min),
leadingWhitespaces[0]
);
return text
.split(/\n/)
.map(line => line.replace(minimumLeadingWhitespace, ''))
.join('\n');
};
3 changes: 2 additions & 1 deletion .storybook/manager-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@
font-family: "Helvetica Neue", Helvetica, Arial, Sans-Serif;
}
</style>
<link rel="icon" type="image/png" href="/lucid/lucid-icon.png" />
<link rel="icon" type="image/png" href="//appnexus.github.io/lucid/lucid-icon.png" />
<link rel="icon" type="image/png" href="/lucid-icon.png" />
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import classNames from 'classnames';
import React from 'react';
import createClass from 'create-react-class';

import { lucidClassNames } from '../../util/style-helpers';
import { lucidClassNames } from '../src/util/style-helpers';
import './color-palette.less';

const cx = lucidClassNames.bind('ColorPalette');

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import '../src/styles/variables.less';

.ColorPalette {
padding: 15px;

Expand Down
2 changes: 1 addition & 1 deletion docs/hybrid-components.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ StatelessExpander.reducers = {
})
}

const HybridExpander = buildHybridComponent(Expander);
const HybridExpander = buildHybridComponent(StatelessExpander);
export default HybridExpander;
```
Now you have the flexibility to either let the component handle it's own state:
Expand Down
6 changes: 6 additions & 0 deletions docs/index.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import SyntaxHighlighter, {
import jsx from 'react-syntax-highlighter/languages/prism/jsx';
import okaidia from 'react-syntax-highlighter/styles/prism/okaidia';
import '../src/index.less';
import ColorPalette from './color-palette';

registerLanguage('jsx', jsx);

Expand Down Expand Up @@ -155,6 +156,11 @@ storiesOf('Lucid UI', module)
))
.add('Computed Props', () => (
<ArticlePage>{compile(computedPropsText).tree}</ArticlePage>
))
.add('Color Palette', () => (
<ArticlePage>
<ColorPalette />
</ArticlePage>
));

const loadedComponents = require('./load-components');
Expand Down
Binary file removed docs/public/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion docs/public/lucid/lucid-icon.png

This file was deleted.

185 changes: 0 additions & 185 deletions gulp/build.js

This file was deleted.

20 changes: 0 additions & 20 deletions gulp/config.js

This file was deleted.

0 comments on commit 0927b81

Please sign in to comment.