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

refactor: Improve style setup #152

Merged
merged 2 commits into from
Jan 1, 2016
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
2 changes: 2 additions & 0 deletions app/scripts/main.js → app/scripts/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ import ReactDOM from 'react-dom'
import Router from 'react-router'
import routes from './routes'

require('../styles/app.less')

if (process.env.NODE_ENV !== 'production') {
window.uiDebug = require('debug')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be just window.debug so that it becomes clear that it is just our debugging thing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That depends if we want to bundle the whole debug module, as the current build system will actually not bundle with this setup

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, that will be improved when we do #151

}
Expand Down
2 changes: 0 additions & 2 deletions app/scripts/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import ConfigPage from './pages/config'
import LogPage from './pages/logs'
import NotFoundPage from './pages/notfound'

require('../styles/bundle.less')

export default (
<Route handler={Page} path='/'>
<DefaultRoute name='home' handler={HomePage} />
Expand Down
4 changes: 2 additions & 2 deletions app/scripts/views/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default React.createClass({

getInitialState: function () {
return {
body: JSON.stringify(this.props.config, null, '\t'),
body: JSON.stringify(this.props.config, null, ' '),
error: null,
saving: false,
saved: false
Expand All @@ -20,7 +20,7 @@ export default React.createClass({

reset: function () {
this.setState({
body: JSON.stringify(this.props.config, null, '\t'),
body: JSON.stringify(this.props.config, null, ' '),
error: null
})
},
Expand Down
6 changes: 6 additions & 0 deletions app/styles/app.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@import "./variables";
@import "./bootstrap";
@import "../../node_modules/font-awesome/less/font-awesome";

@import "./base";
@import "./typography";
Loading