GithubHelp home page GithubHelp logo

qwer1234-cyber / ykit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ymfe/ykit

0.0 1.0 0.0 2.57 MB

基于 Webpack 的灵活快速的打包工具,帮助稳定高效构建现代 JavaScript 应用。

Home Page: https://ykit.ymfe.org/

License: Apache License 2.0

JavaScript 99.71% HTML 0.22% CSS 0.07%

ykit's Introduction

YKit CircleCI

ENGLISH DOC

YKit 是一个基于 Webpack 的打包工具,它利用插件机制封装了各种 JavaScript 应用的配置,选择和安装合适的插件即可开始构建你的应用。

特性

  • 通过 init 命令快速初始化各种环境
  • 封装各类配置,减少搭建环境工作量
  • 包含 hot-reload 的本地 server

安装

  • latest 稳定版: [sudo] npm install ykit -g
  • 或者选择基于 [email protected] 的最新版本:[sudo] npm install ykit@next -g

快速开始

  1. 创建目录 mkdir ykit-app && cd ykit-app
  2. 初始化工程 ykit init
  3. 启动服务 ykit s -p 3000
  4. 用浏览器访问 http://127.0.0.1:3000/index.html

初始化结束后,项目中会生成一个名为 ykit.js 的配置文件:

module.exports = {
    plugins: [],
    config: {
        export: ['./scripts/index.js', './styles/index.css'],
        modifyWebpackConfig: function (baseConfig) {
            // 更改 Webpack 配置
            return baseConfig;
        }
    },
    hooks: {},
    commands: []
};

配置文件选项

  • plugins - 插件是对一类配置和功能的封装,通过安装插件可以快速搭建开发环境
  • config.exports - 资源入口
  • config.modifyWebpackConfig - 用来更改 Webpack 现有配置的函数
  • hooks - 打包过程钩子
  • commands - 自定义命令

范例

通过插件快速搭建不同类型的应用,可参考以下示例。

文档

访问 ykit.ymfe.org 来获取更多 YKit 的文档。

ykit's People

Contributors

yuhaoju avatar ellery0924 avatar edwonlim avatar malcolmyu avatar jasonfang93 avatar wy-ei avatar

Watchers

zhengping avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.