lucii
a framework base on webpack
Last updated 2 years ago by aprday .
ISC · Original npm · Tarball · package.json
$ cnpm install lucii 
SYNC missed versions from official npm registry.

基于Webpack2的前端打包工具-lucii

lucii是一套对Webpack2打包过程的轻封装,基于webpack2编译过程最佳实践集成了调试,打包,代理,mock数据和发布代码功能,由JSON的形式配置Api,配置过程不超过一分钟,尤其对Webpack不熟悉的新手可以简单快捷的使用lucii构建项目

适用范围

lucii是Webpack对React编译过程的分装,目前支持React/Vue产品线

安装

npm i lucii

使用方式

lucii提供5个api:lucii [build, dll, mock, server, deploy]

打包第三方文件

lucii dll // build commons to vendor

启动项目

lucii server // release and init service

启动mock服务器

lucii mock // init a server for mock

发布文件到服务器

lucii deploy // deploy files to server

编译打包文件

lucii build // build files

新建脚手架服务

lucii cli --vue/ react // init a programe

调试 && 打包

lucii使用webpack对项目进行打包,打包过程api配置如下:

{
    "publicPath": "/",
    "entry": {
        "main": "./src/main.js"
    },
    // 默认dependences作为commons
    "server": {
        "port": 8046,
        "host": "localhost"
    },
    "html": {
        "title": "D.va",
        "favicon": "./favicon.ico",
        "template": "./index.html"
    }
}
参数 描述
entry 项目入口,配置同Webpack entry
template html 模板入口,使用同 HtmlWebpackPlugin output.template
host 默认localhost
port 端口默认 8352

代理

lucii代理方式包括get、post、fetch、put等,并且可以设置跨域携带cookie

{
    "proxy": "./config/proxy.js" || () => new Promise,
}
参数 描述
proxy 代理地址(Promise对象)

数据mock

基于JSONserver模拟mock数据

{
    "mock": {
        "path": "./mock",
        "port": 3002,
        "dist": "./wiki"
    }
}
参数 描述
path mock文件地址
port mock数据端口,默认3001
dist 生成wiki存放地址

代码发布

lucii 与fis3-deploy功能无缝对接,可以完成文件发布功能

{
    "deploy": {
        "dir": "./dist",
        "server": "http://x.x.x.x/receiver.php",
        "to": "/home/work/odp/template/boss/"
    }
}
参数 描述
path 要发送的文件地址
server 接受服务器receiver
to 服务器目录

TODO

  • [x] 良好的报错
  • [x] 插件扩展

Current Tags

  • 0.2.36                                ...           latest (2 years ago)

56 Versions

  • 0.2.36                                ...           2 years ago
  • 0.2.35                                ...           2 years ago
  • 0.2.34                                ...           2 years ago
  • 0.2.33                                ...           2 years ago
  • 0.2.32                                ...           2 years ago
  • 0.2.31                                ...           2 years ago
  • 0.2.30                                ...           2 years ago
  • 0.2.29                                ...           2 years ago
  • 0.2.28                                ...           2 years ago
  • 0.2.27                                ...           2 years ago
  • 0.2.26                                ...           2 years ago
  • 0.2.25                                ...           2 years ago
  • 0.2.24                                ...           2 years ago
  • 0.2.23                                ...           2 years ago
  • 0.2.22                                ...           2 years ago
  • 0.2.21                                ...           2 years ago
  • 0.2.20                                ...           2 years ago
  • 0.2.19                                ...           2 years ago
  • 0.2.18                                ...           2 years ago
  • 0.2.17                                ...           2 years ago
  • 0.2.16                                ...           2 years ago
  • 0.2.15                                ...           2 years ago
  • 0.2.14                                ...           2 years ago
  • 0.2.13                                ...           2 years ago
  • 0.2.12                                ...           2 years ago
  • 0.2.11                                ...           2 years ago
  • 0.2.10                                ...           2 years ago
  • 0.2.9                                ...           2 years ago
  • 0.2.8                                ...           2 years ago
  • 0.2.7                                ...           2 years ago
  • 0.2.5                                ...           2 years ago
  • 0.2.4                                ...           2 years ago
  • 0.2.3                                ...           2 years ago
  • 0.2.2                                ...           2 years ago
  • 0.2.1                                ...           2 years ago
  • 0.2.0                                ...           2 years ago
  • 0.1.9                                ...           2 years ago
  • 0.1.8                                ...           2 years ago
  • 0.1.7                                ...           3 years ago
  • 0.1.6                                ...           3 years ago
  • 0.1.5                                ...           3 years ago
  • 0.1.4                                ...           3 years ago
  • 0.1.3                                ...           3 years ago
  • 0.1.2                                ...           3 years ago
  • 0.1.1                                ...           3 years ago
  • 0.1.0                                ...           3 years ago
  • 0.0.9                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.6                                ...           3 years ago
  • 0.0.5                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
  • 0.0.2                                ...           3 years ago
  • 0.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 119
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |