File tree 4 files changed +8
-5
lines changed
4 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,11 @@ Rock是一个Express + Webpack `脚手架`。可生成简单,稳定的Node服
50
50
4 . 访问 ` http://localhost:8081 `
51
51
52
52
### 其他命令
53
- * Client Side
54
- yo rock:component
53
+ * 生成前端组件
54
+
55
+ yo rock:component
56
+
57
+ ![ yo rock: component ] ( /docs/image/rock-tools.gif?raw=true )
55
58
56
59
### 开发文档
57
60
1 . [ Configuration vs. Definition] ( /docs/01%20Configuration%20vs.%20Definition.md )
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ module.exports = generators.Base.extend({
107
107
}
108
108
109
109
if ( needJs ) {
110
- const className = name . slice ( 0 , 1 ) . toUpperCase ( ) + name . slice ( 1 ) ;
110
+ const className = name . split ( '-' ) . map ( ( item ) => item . slice ( 0 , 1 ) . toUpperCase ( ) + item . slice ( 1 ) ) . join ( '' ) ;
111
111
switch ( type ) {
112
112
case 'react' :
113
113
this . fs . copyTpl (
Original file line number Diff line number Diff line change 1
1
<% layout (' common/layout' ) - %>
2
- <% block (' head' ).append (` <link type="text/css" href="${ assetsConfig. < ? = name ? > .css }" rel=" stylesheet" charset=" utf- 8 " >`) %>
2
+ <% block (' head' ).append (` <link type="text/css" href="${ assetsConfig[ ' <?= name ?>' ] .css } " rel="stylesheet" charset="utf-8">` ) %>
3
3
4
4
<h2 >当前页面是 <?= name ?></h2 ><? if (type === 'vue' || type === 'react') { ?>
5
5
<div id =" app" ></div ><? } ?>
6
6
7
- <% block('footer').append(`<script src=" ${assetsConfig. < ? = name ? > .js }" ></script>`) %>
7
+ <% block (' footer' ).append (` <script src="${ assetsConfig[ ' <?= name ?>' ] .js } "></script>` ) %>
You can’t perform that action at this time.
0 commit comments