└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # salt-tool 2 | 3 | --- 4 | 5 | ## 简介 6 | 7 | 在 Salt 的整体解决方案中,使用 [Nowa](http://nowa-webpack.github.io/docs/) 作为工具层面的支持。 8 | 9 | Nowa 是基于 webpack 的前端开发解决方案集合。包含一系列前端开发生命周期中可能使用到的工具 10 | 11 | ## 快速开始 12 | 13 | - 安装 14 | 15 | ```shell 16 | npm i nowa -g && nowa install 17 | ``` 18 | 19 | > 如果提示没权限,请在命令前面加 sudo 20 | 21 | - 初始化 22 | 23 | ```shell 24 | nowa init salt 25 | ``` 26 | 27 | - 启动服务器 28 | 29 | ```shell 30 | nowa server 31 | ``` 32 | 33 | ![](http://nowa-webpack.github.io/docs/screenshot-server-use.png) 34 | 35 | - 打开浏览器 36 | 37 | 访问命令行中提示的地址,就可以看到刚刚创建的项目页面啦! 38 | 39 | ## 常用功能 40 | 41 | - [初始化新项目](http://nowa-webpack.github.io/docs/xin_xiang_mu.html) 42 | - [初始化新页面](http://nowa-webpack.github.io/docs/xin_ye_mian.html) 43 | - [初始化新模块](http://nowa-webpack.github.io/docs/xin_mo_kuai.html) 44 | - [本地开发服务器](http://nowa-webpack.github.io/docs/ben_di_kai_fa.html) 45 | - [通过网络代理进行远程调试](http://nowa-webpack.github.io/docs/yuan_cheng_tiao_shi.html) 46 | - [https 配置](http://nowa-webpack.github.io/docs/https_pei_zhi.html) 47 | - [模块热替换](http://nowa-webpack.github.io/docs/mo_kuai_re_ti_huan.html) 48 | - [覆盖默认的 webpack 配置](http://nowa-webpack.github.io/docs/fu_gai_mo_ren_de_webpack_pei_zhi.html) 49 | - [环境变量注入](http://nowa-webpack.github.io/docs/huan_jing_bian_liang.html) 50 | - [https 配置](http://nowa-webpack.github.io/docs/https_pei_zhi.html) 51 | - [项目构建](http://nowa-webpack.github.io/docs/xiang_mu_gou_jian.html) 52 | - [组件库的定制构建](http://nowa-webpack.github.io/docs/zu_jian_ku_de_ding_zhi_gou_jian.html) 53 | 54 | ## 目录结构 55 | 56 | ``` 57 | . 58 | ├── abc.json ------------------------- 项目构建配置文件 59 | ├── favicon.ico ---------------------- 页面图标 60 | ├── html ----------------------------- html目录 61 | │ └── index.html ------------------- 入口页面 62 | ├── package.json --------------------- 项目配置 63 | ├── README.md ------------------------ 说明文件 64 | └── src ------------------------------ 源码目录 65 | ├── app -------------------------- 项目级代码 66 | │   ├── app.js ------------------- 项目级脚本逻辑 67 | │   ├── app.styl ----------------- 全局样式 68 | ├── components ------------------- 业务模块集合目录 69 | ├── i18n ------------------------- 国际化文案资源文件 70 | │   ├── en.js 71 | │   ├── index.js ----------------- 国际化资源加载器 72 | │   └── zh-cn.js 73 | ├── images ----------------------- 图片资源目录 74 | └── pages ------------------------ 页面集合目录 75 |    └── demo --------------------- 某一个页面 76 |       ├── index.js ------------- 页面入口文件 77 |       ├── actions.js ----------- 事件列表 78 |       ├── store.js ------------- 存储器 79 |       ├── PageDemo.js ---------- 页面视图逻辑 80 |       └── PageDemo.styl -------- 页面样式 81 | ``` 82 | 83 | ## 链接 84 | 85 | - [提问和反馈](https://github.com/nowa-webpack/nowa/issues/new) 86 | - [常见问题](http://nowa-webpack.github.io/docs/chang_jian_wen_ti.html) 87 | - 更多信息请访问[文档站点](http://nowa-webpack.github.io/docs/) 88 | --------------------------------------------------------------------------------