Skip to content

Commit fb853c2

Browse files
author
sayll
committed
IE TEST
0 parents  commit fb853c2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+8039
-0
lines changed

.codeclimate.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
languages:
2+
Ruby: true
3+
JavaScript: true
4+
PHP: true
5+
Python: true
6+
exclude_paths:
7+
- "app/source/css/library/weui.css"
8+
- "app/static/tools/fetch.js"

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules
2+
*.log
3+
*.log.*
4+
.idea
5+
.happypack
6+
build

.travis.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
language: node_js
2+
node_js:
3+
- '7'
4+
before_script:
5+
- export DISPLAY=:99.0
6+
- sh -e /etc/init.d/xvfb start
7+
install:
8+
- npm install
9+
- npm install coveralls
10+
script:
11+
- npm run test
12+
after_script:
13+
- npm run test:coveralls

README.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# ie-webpack-start
2+
[![Coverage Status](https://travis-ci.org/sayll/ie-webpack-start.svg?branch=master)](https://travis-ci.org/sayll/ie-webpack-start)  [![Coverage Status](https://coveralls.io/repos/github/sayll/ie-webpack-start/badge.svg)](https://coveralls.io/github/sayll/ie-webpack-start) [![Coverage Status](https://codeclimate.com/github/sayll/ie-webpack-start/badges/gpa.svg)](https://codeclimate.com/github/sayll/ie-webpack-start)
3+
4+
<b>IE 9+ 用户请转至:[avalon-webpack-start](https://github.com/sayll/avalon-webpack-start)</b>
5+
6+
<b>React 用户请转至:[react-webpack-start](https://github.com/sayll/react-webpack-start)</b>
7+
## 介绍
8+
9+
这个一个为打包支持到低版本的`webpack2`实验性脚手架。</br>
10+
本项目使用[`avalon2`](https://github.com/RubyLouvre/avalon)作为演示框架。
11+
12+
下面是非常!非常!!非常!!!重要的事情!!!</br>
13+
此项目无法在低版本IE下启动服务实时测试,必须通过打包才知道测试结果。</br>
14+
所以请用户自行在其他浏览器编写测试,最后回跑测试打包的IE</br>
15+
由于代码压缩导致无法在IE下正常运行,本版本取消代码压缩功能。如有使用如Jquery第三方库的同学,最好自行引用它的min版本,而不是通过打包形式。
16+
17+
<b>[更多介绍...](/docs/README.md)</b>
18+
19+
## 开始
20+
21+
### 环境配置
22+
1. 安装新版:[node.js](https://nodejs.org/)
23+
2. 安装新版:[git](https://git-scm.com/)
24+
25+
### 依赖配置
26+
确认好你的环境配置,然后就可以开始以下步骤。
27+
28+
```bash
29+
$ git clone https://github.com/sayll/ie-webpack-start.git
30+
$ cd ie-webpack-start
31+
$ npm install # Install project dependencies
32+
$ npm start # Compile and launch
33+
```
34+
35+
如果一切顺利,就能正常打开端口:[http://localhost:3000/](http://localhost:3000/)
36+
37+
开发过程中,你用得最多的会是`npm start`
38+
39+
但是这里还有很多其它的处理:
40+
41+
42+
|`npm run <script>`|解释|
43+
|------------------|-----------|
44+
|`start`|启动3000端口服务,代码热替换开启。|
45+
|`build`|单纯打包资源,不会进行代码测试。|
46+
|`deploy`|删除旧文件,进行代码测试,打包相关文件(默认目录~/build)。|
47+
|`test`|开启Karma测试并生成覆盖率报告。|
48+
|`visualizer`|打包资源分析|
49+
|`clean`|清除打包的文件|
50+
|`cnpm`|替换为淘宝镜像|
51+
* 开发使用 `start`
52+
* 调试IE使用 `build`
53+
* 发布使用`deploy`
54+
55+
56+
## 使用手册
57+
58+
### 流程
59+
60+
基本
61+
62+
1. 位于[`app/html`](/app/html)创建HTML视图【[更多说明](/docs/basics/Html.md)
63+
2. 位于[`app/view`](/app/view)配置html相关的JS和CSS文件。(JS和CSS需与HTML保持一致,可参考现有模版)【[更多说明](/docs/basics/Views.md)
64+
65+
高级
66+
67+
1. 引用字体图标Icon【[更多说明](/docs/basics/Icon.md)
68+
2. 使用框架(avalon)或库(jquery)【[更多说明](/docs/Library.md)
69+
3. 设置全局变量。【[更多说明](/docs/basics/Common.md)
70+
4. 使用Css预处理器([更多说明](/docs/loaders))
71+
5. 使用CDN([更多说明](/docs/webpack))
72+
6. 修改目录结构([更多说明](/docs/webpack))
73+
7. 单元测试([更多说明](/docs/webpack/Tests.md))
74+
75+
发布
76+
77+
1. 打包说明【[更多说明](/docs/webpack/BasePack.md)
78+
79+
80+
## 目录说明
81+
82+
```
83+
.
84+
├── build # 所有打包配置项
85+
├── config # 项目配置文件
86+
│   ├── webpack # webpack配置文件夹
87+
│ └── karma.conf.js # karma配置文件
88+
├── server # Express 程序 (使用 webpack 中间件)
89+
│ └── main.js # 服务端程序入口文件
90+
├── app # 程序源文件
91+
│   ├── html                 # 多页或单页应用的入口HTML
92+
│   └── source               # 公共的资源文件
93+
│   ├   ├── css
94+
│   ├   ├── js
95+
│   ├   ├── font
96+
│   ├   └── img             
97+
│   ├── static               # 公共的静态资源文件(所有内部文件通过index.js引入,可配置全局变量。)
98+
│   └── view               # 主路由和异步分割点
99+
│       └── index           # 匹配html文件夹中的index.html。(css,js文件名对应文件夹名,可直接打包无需单独引入)
100+
│           ├── index.js     # 直接与index.html匹配的入口文件,可以作为单页应用的入口,在内部定义自己的项目目录
101+
│           ├── index.css    # 如是多页应用,可设置对应的CSS文件,直接匹配。
102+
│           └── other **     # 页面的其他资源文件,通过index.js引入
103+
└── tests                   # 单元测试
104+
```
105+
106+
## 更新日志
107+
108+
[更新详情](/docs/Update.md)
109+
110+
## 最重要的事情
111+
112+
* 亲不要吝啬自己的**Star**,先右上角**Star**一下呗!
113+
114+
<a href="https://segmentfault.com/a/1190000008249713"><img src='https://gss0.baidu.com/9vo3dSag_xI4khGko9WTAnF6hhy/zhidao/wh%3D600%2C800/sign=405cc666d543ad4ba67b4ec6b2327697/d058ccbf6c81800a80b7b2cdb53533fa838b47a6.jpg' height='160'></a>
115+

app/html/index.html

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>单页Demo</title>
5+
<meta charset="UTF-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7+
</head>
8+
9+
<body ms-controller="test">
10+
<div id="content">
11+
<div>
12+
图标字体:
13+
<i class="icon icon-sliderR"></i>
14+
</div>
15+
<input ms-duplex="@name">
16+
<p>Hello,{{@name}}!</p>
17+
<ul>
18+
<li ms-for="($index,el) in @array">{{$index}}--{{el}}</li>
19+
</ul>
20+
</div>
21+
</body>
22+
</html>

app/source/css/index.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/** 引入字体文件
2+
* @import "../font/icon/iconfont.css";
3+
* */
4+
@import "./parts/normalize.css";

0 commit comments

Comments
 (0)