Comparing version 0.1.1 to 0.1.2
{ | ||
"name": "omi-cli", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "CLI for scaffolding Omi.js projects.", | ||
@@ -5,0 +5,0 @@ "main": "bin/omi", |
@@ -118,3 +118,3 @@ var del = require('del'), | ||
gulp.watch(ENV + '/**').on('change', browserSync.reload); | ||
gulp.watch(['src/component/**/*.js', 'src/js/*.js', 'common/*.js'], function () { | ||
gulp.watch(['src/component/**/*.**', 'src/js/*.js', 'common/*.js'], function () { | ||
runSequence( | ||
@@ -121,0 +121,0 @@ 'webpack', |
@@ -28,2 +28,3 @@ { | ||
"run-sequence": "^1.2.2", | ||
"string-loader": "0.0.1", | ||
"webpack": "^1.14.0", | ||
@@ -30,0 +31,0 @@ "webpack-stream": "^3.2.0" |
@@ -1,14 +0,1 @@ | ||
## Omi脚手架 | ||
使用 Gulp + Webpack + Babel + BrowserSync 搭建 的脚手架。 | ||
你可以修改你的目录名,也可通过npm init去修改你的项目信息。 | ||
## 安装开发依赖包 | ||
``` js | ||
npm install | ||
``` | ||
## 开发 | ||
@@ -15,0 +2,0 @@ |
import Omi from 'omi'; | ||
const tpl = require('./index.html'); | ||
const css = require('./index.css'); | ||
class Footer extends Omi.Component { | ||
@@ -9,21 +12,7 @@ constructor (data) { | ||
style () { | ||
return ` | ||
.footer{ | ||
position:fixed; | ||
height:45px; | ||
line-height: 45px; | ||
width:100%; | ||
bottom:0; | ||
color:white; | ||
background-color:black; | ||
z-index:100; | ||
} | ||
`; | ||
return css; | ||
} | ||
render () { | ||
return ` | ||
<div class="footer"> | ||
I am footer | ||
</div>`; | ||
return tpl; | ||
} | ||
@@ -30,0 +19,0 @@ } |
@@ -32,3 +32,5 @@ var path = require('path'); | ||
exclude:/node_modules/ | ||
} | ||
}, | ||
{ test: /\.html$/, loader: "string" }, | ||
{ test: /\.css$/, loader: "string" } | ||
] | ||
@@ -35,0 +37,0 @@ }, |
28
39196
665