mirror of
https://github.com/wassname/react-webpack-template.git
synced 2026-07-13 16:40:00 +08:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 393b04526a | |||
| c2b2d99f61 | |||
| 02ff1ecad6 | |||
| 12a446f747 | |||
| 262c0bbc9e | |||
| 0906a22faa | |||
| d94724832e |
+4
-3
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-webpack-template",
|
"name": "react-webpack-template",
|
||||||
"version": "0.0.6",
|
"version": "0.0.10",
|
||||||
"description": "A base skeleton template for react and webpack without task runners",
|
"description": "A base skeleton template for react and webpack without task runners",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@@ -11,8 +11,9 @@
|
|||||||
"serve:dist": "node server.js --env=dist",
|
"serve:dist": "node server.js --env=dist",
|
||||||
"dist": "npm run copy & webpack --env=dist",
|
"dist": "npm run copy & webpack --env=dist",
|
||||||
"lint": "eslint ./src",
|
"lint": "eslint ./src",
|
||||||
"copy": "copyfiles -f ./src/index.html ./dist",
|
"copy": "copyfiles -f ./src/index.html ./src/favicon.ico ./dist",
|
||||||
"clean": "rimraf dist/*"
|
"clean": "rimraf dist/*",
|
||||||
|
"patch-release": "npm version patch && npm publish && git push --follow-tags"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -3,11 +3,14 @@ require('styles/App.css');
|
|||||||
|
|
||||||
import React from 'react/addons';
|
import React from 'react/addons';
|
||||||
|
|
||||||
|
let yeomanImage = require('../images/yeoman.png');
|
||||||
|
|
||||||
class AppComponent extends React.Component {
|
class AppComponent extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div className="index">
|
<div className="index">
|
||||||
Content
|
<img src={yeomanImage} alt="Yeoman Generator" />
|
||||||
|
<div className="notice">Please edit <code>src/components/Main.js</code> to get started!</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
@@ -1 +1,21 @@
|
|||||||
/* Base Application Styles */
|
/* Base Application Styles */
|
||||||
|
body {
|
||||||
|
color: #fff;
|
||||||
|
background: #222;
|
||||||
|
}
|
||||||
|
|
||||||
|
.index img {
|
||||||
|
margin: 40px auto;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: #fff;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.index .notice {
|
||||||
|
margin: 20px auto;
|
||||||
|
padding: 15px 0;
|
||||||
|
text-align: center;
|
||||||
|
border: 1px solid #000;
|
||||||
|
border-width: 1px 0;
|
||||||
|
background: #666;
|
||||||
|
}
|
||||||
|
|||||||
@@ -46,6 +46,22 @@ var config = {
|
|||||||
test: /\.css$/,
|
test: /\.css$/,
|
||||||
loader: 'style!css'
|
loader: 'style!css'
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: /\.sass/,
|
||||||
|
loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded&indentedSyntax'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.scss/,
|
||||||
|
loader: 'style-loader!css-loader!sass-loader?outputStyle=expanded'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.less/,
|
||||||
|
loader: 'style-loader!css-loader!less-loader'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
test: /\.styl/,
|
||||||
|
loader: 'style-loader!css-loader!stylus-loader'
|
||||||
|
},
|
||||||
{
|
{
|
||||||
test: /\.(png|jpg|gif|woff|woff2)$/,
|
test: /\.(png|jpg|gif|woff|woff2)$/,
|
||||||
loader: 'url-loader?limit=8192'
|
loader: 'url-loader?limit=8192'
|
||||||
|
|||||||
Reference in New Issue
Block a user