Skip to content

Commit 45de5ef

Browse files
committed
'fix'
1 parent 30ec7f1 commit 45de5ef

7 files changed

Lines changed: 71 additions & 8669 deletions

File tree

README.md

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -6,45 +6,5 @@
66

77
X-BUILD 是针对 H5 开发的一套自动化构建工具,致力于提升开发效率,减小开发难度。它可以让你在没有任何构建工具(例如 grunt 、 gulp 或 webpack 等工具)配置经验的情况下,帮你快速生成一个完整的前端工程,并可以打包代码和静态资源,使你的项目以最优异的性能上线。
88

9-
### 功能特性
10-
11-
| Speciality | Description |
12-
| :- | :- |
13-
| devServer | [模块热替换(HMR - Hot Module Replacement)](https://webpack.docschina.org/concepts/hot-module-replacement/)可以显著加快开发速度。 |
14-
| 自适应解决方案 | [px2rem](https://github.com/songsiqi/px2rem) + [hotcss](https://github.com/imochen/hotcss) 实现多终端显示一致。 |
15-
| HTML | 支持[Pug](https://pug.bootcss.com/api/getting-started.html)模板引擎。 |
16-
| Css | 支持sass、less、stylus样式预处理器,normalize重置样式,Postcss。 |
17-
| JavaScript | [Webpack](https://webpack.docschina.org/concepts/)解决模块化,通过Babel编译成现代浏览器可执行的JavaScript。 |
18-
| 代码规范 | 使用[ESLint](https://eslint.org/)避免低级错误和统一代码的风格。 |
19-
| 静态资源服务 | 提供代码压缩、图片压缩、文件hash、base64处理等服务。 |
20-
21-
### 生态系统
22-
23-
| Project | Status | Description |
24-
| :------ | :------ | :------ |
25-
| <a href="https://github.com/codexu/x-build">X-BUILD</a> | <img src="https://img.shields.io/badge/npm-v4.4.10-blue.svg"> | 脚手架工具,快速生成工程目录,并安装依赖。 |
26-
| <a href="https://github.com/codexu/x-fullpage">X-FULLPAGE</a> | <img src="https://img.shields.io/badge/npm-v1.2.2-blue.svg"> | 适用于移动端的整屏滚动插件,支持动画触发。 |
27-
| <a href="https://github.com/codexu/x-load">X-LOAD</a> | <img src="https://img.shields.io/badge/npm-v1.3.4-blue.svg"> | 创建Loading效果、控制图片加载方式。 |
28-
| <a href="https://github.com/codexu/x-animate">X-ANIMATE</a> | <img src="https://img.shields.io/badge/npm-v1.0.2-blue.svg"> | 屏幕滚动执行相应动画,支持动画组和生命周期回调。 |
29-
| <a href="https://github.com/codexu/x-touch">X-TOUCH</a> | <img src="https://img.shields.io/badge/npm-v1.2.1-blue.svg"> | 使原生DOM支持轻触、长按和滑动事件。 |
30-
| <a href="https://github.com/codexu/x-music">X-MUSIC</a> | <img src="https://img.shields.io/badge/npm-v1.0.2-blue.svg"> | 设置背景音乐与按钮控制。 |
31-
32-
### 讨论交流
33-
34-
#### QQ群
35-
36-
欢迎加入 QQ交流群(374406559),在这里可以互相交流前端问题。
37-
38-
#### 提问 & BUG
39-
40-
请将BUG提交在不同项目的 **Github issues** 里:
41-
42-
[X-BUILD](https://github.com/codexu/x-build/issues) |
43-
[X-FULLPAGE](https://github.com/codexu/x-fullpage/issues) |
44-
[X-LOAD](https://github.com/codexu/x-load/issues) |
45-
[X-ANIMATE](https://github.com/codexu/x-animate/issues) |
46-
[X-TOUCH](https://github.com/codexu/x-touch/issues) |
47-
[X-MUSIC](https://github.com/codexu/x-music/issues)
48-
49-
### 使用文档
9+
## 使用文档
5010
[https://codexu.github.io/](https://codexu.github.io/)

lib/setParam.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@ function setParam() {
2222
break;
2323
}
2424

25+
/* 添加插件 -> this.plugin */
26+
if (this.answers.rem){
27+
this.answers.plugin.push('hotcss');
28+
}
29+
if (this.answers.plugin.includes('x-animate') || this.answers.plugin.includes('x-fullpage') ){
30+
this.answers.plugin.push('animate.css');
31+
}
32+
2533
/* 添加依赖 -> this.dependencies */
2634
// 使用 rem 布局依赖 hotcss
2735
if (this.answers.rem) {
2836
this.dependencies.push('hotcss');
2937
}
30-
// x-animate & x-fullpage 依赖 animate.css
31-
if (this.answers.plugin.includes('x-animate') || this.answers.plugin.includes('x-fullpage') ){
32-
this.answers.plugin.push('animate.css');
33-
}
3438
if (this.answers.plugin.length > 0) {
3539
this.dependencies = [...this.dependencies, ...this.answers.plugin];
3640
}

0 commit comments

Comments
 (0)