mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2025-02-16 16:19:48 -05:00
Clean-up travis config and demo code
This commit is contained in:
parent
685ea10aeb
commit
79dce3f711
7 changed files with 26 additions and 21 deletions
|
@ -1,3 +1,6 @@
|
|||
language: node_js
|
||||
node_js: '0.12'
|
||||
sudo: false
|
||||
cache:
|
||||
directories:
|
||||
- node_modules
|
||||
|
|
7
Makefile
7
Makefile
|
@ -26,13 +26,14 @@ test:
|
|||
@make lint
|
||||
|
||||
lint:
|
||||
@$(ESLINT) ./src/{components/**,views/**}/*.jsx
|
||||
$(ESLINT) ./*.js
|
||||
$(ESLINT) ./src/{components/**,mixins,views/**}/*.jsx
|
||||
|
||||
# ------------------------------------
|
||||
|
||||
start:
|
||||
$(LIVE) ./build &
|
||||
@make watch &
|
||||
make watch &
|
||||
wait
|
||||
|
||||
watch:
|
||||
|
@ -43,4 +44,4 @@ watch:
|
|||
|
||||
# ------------------------------------
|
||||
|
||||
.PHONY: build clean static webpack watch test lint
|
||||
.PHONY: build clean static webpack test lint start watch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
### scratch-www
|
||||
#### Standalone WWW client for Scratch
|
||||
## scratch-www
|
||||
#### Standalone web client for Scratch
|
||||
|
||||
[![Build Status](https://magnum.travis-ci.com/LLK/scratch-www.svg?token=xzzHj4ct3SyBTpeqxnx1)](https://magnum.travis-ci.com/LLK/scratch-www)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ require('./box.scss');
|
|||
|
||||
module.exports = React.createClass({
|
||||
propTypes: {
|
||||
title: React.PropTypes.string.isRequired
|
||||
title: React.PropTypes.string.isRequired,
|
||||
more: React.React.PropTypes.string
|
||||
},
|
||||
render: function () {
|
||||
|
@ -15,7 +15,7 @@ module.exports = React.createClass({
|
|||
</div>
|
||||
|
||||
<div className="content">
|
||||
{children}
|
||||
{this.children}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#navigation {
|
||||
background-color: yellow;
|
||||
background-color: cyan;
|
||||
}
|
||||
|
|
|
@ -15,23 +15,15 @@ var View = React.createClass({
|
|||
};
|
||||
},
|
||||
componentDidMount: function () {
|
||||
this.api({
|
||||
method: 'get',
|
||||
uri: 'https://gist.githubusercontent.com/thisandagain/4d62ac52b78f76e833bd/raw/a2f4a67ec16d980d2313f3645b30d22acc150d7a/news.json'
|
||||
}, function (err, body) {
|
||||
if (err) return;
|
||||
|
||||
console.dir(JSON.parse(body));
|
||||
this.setState({
|
||||
news: JSON.parse(body)
|
||||
});
|
||||
}.bind(this));
|
||||
// @todo API request for News
|
||||
// @todo API request for Activity
|
||||
// @todo API request for Featured
|
||||
},
|
||||
render: function () {
|
||||
return (
|
||||
<div>
|
||||
<h1>I am the splash page!</h1>
|
||||
<News items={this.state.news} />
|
||||
<News />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -32,5 +32,14 @@ module.exports = {
|
|||
loader: 'style!css!sass'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
plugins: [
|
||||
new webpack.optimize.UglifyJsPlugin({
|
||||
compress: {
|
||||
warnings: false
|
||||
}
|
||||
}),
|
||||
new webpack.optimize.OccurenceOrderPlugin(),
|
||||
new webpack.optimize.DedupePlugin()
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue