静态网页开发工作构建流脚手架tdn

编程入门 行业动态 更新时间:2024-10-27 19:21:27

静态网页开发工作构建流<a href=https://www.elefans.com/category/jswz/34/1756721.html style=脚手架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

  1. Fork it on GitHub!
  2. Clone the fork to your own machine.
  3. Checkout your feature branch: git checkout -b my-awesome-feature
  4. Commit your changes to your own branch: git commit -am 'Add some feature'
  5. Push your work back up to your fork: git push -u origin my-awesome-feature
  6. 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

本文发布于:2024-02-25 11:01:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1698755.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:脚手架   静态   网页   工作   tdn

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!