脚手架tdn"/>
静态网页开发工作构建流脚手架tdn
tdn-pages
码云
static web app workflow
Installation
$ npm install tdn-pages# or yarn
$ yarn add tdn-pages
Usage
有三个命令可以使用
tdn-pages clean
清除构建文件夹
tdn-pages develop
静态开发网页 会开启开发服务器,提供热更新
支持e6+和scss开发
tdn-pages build
构建生产环境代码
在根目录添加文件pages.config.js 可以配置初始化 文件路径和文件名称和页面数据
默认为
module.exports = {build: {// 代码开发路径src: 'src',// 生产路径dist: 'dist',// 临时文件路径temp: 'temp',// 公共文件路径public: 'public',paths: {// 样式styles: 'assets/styles/*.scss',// jsscripts: 'assets/scripts/*.js', // 页面pages: '*.html', // 图片images: 'assets/images/**',// 字体fonts: 'assets/fonts/**',}},// 页面渲染引擎数据data: {menus: [{name: 'Home',icon: 'aperture',link: 'index.html'},{name: 'Features',link: 'features.html'},{name: 'About',link: 'about.html'},{name: 'Contact',link: '#',children: [{name: 'Twitter',link: ''},{name: 'About',link: ''},{name: 'divider'},{name: 'About',link: ''}]}],pkg: require('./package.json'),date: new Date()}
}
API
tdnPages(name[, options])
name
- Type:
string
- Details: name string
options
host
- Type:
string
- Details: host string
- Default:
'zce.me'
Contributing
- Fork it on GitHub!
- Clone the fork to your own machine.
- Checkout your feature branch:
git checkout -b my-awesome-feature
- Commit your changes to your own branch:
git commit -am 'Add some feature'
- Push your work back up to your fork:
git push -u origin my-awesome-feature
- Submit a Pull Request so that we can review your changes.
NOTE: Be sure to merge the latest from “upstream” before making a pull request!
License
MIT © tdn 2387083001@qq
更多推荐
静态网页开发工作构建流脚手架tdn
发布评论