qu-build
Build tools for FE
Last updated a year ago by quteam .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install qu-build 
SYNC missed versions from official npm registry.

Build tools for FE

Universal front-end automation tools

Install

npm install qu-build -g

Usage

Usage: qu-build [options]

Options:

    -v, --version                output the version number
    -o, --output-path <path>     output path
    -w, --watch [delay]          watch file changes and rebuild
    -d, --dev                    start develop server
    -p, --port [port]            develop server port, default is 8080
    -b, --build                  build this project
    -t, --test                   test this project, use jest
    -c, --component <component>  quickly create components
    --pwa                        use pwa
    --hash                       build with hash and output map.json
    --publicPath <publicPath>    publicPath for webpack
    --devtool <devtool>          sourcemap generate method, default is null
    --config <path>              custom config path, default is webpack.config.js
    --cwd <path>                 custom context path
    --no-compress                build without compress
    --json                       running webpack with --json, ex. result.json
    --verbose                    run with more logging messages.
    --init <template> <project>  generate a new project from a template. template: [vue, pages]
    -h, --help                   output usage information

Template Create

# vue template project
qu-build --init vue project-name

# multi page template project
qu-build --init pages project-name

Mock

Use mockjs, mock storage directory ./src/api, support .js,.json.

/**
 * @url /order/addOrderComment.do
 *
 */
module.exports = function (req) {
  return {
    success: Math.random() < 0.5 ? false : true,
    msg: '@word',
    code: Math.random() < 0.5 ? -200 : 0,
  };
}

or

{
    "msg": "@word",
    "code": 200,
}

If you use jsonp, request parameters increase callback. The return data will be jsonp.

/**
 *  http://localhost:8080/?callback=jQuery1513158553653
 */
jQuery1513158553653({
  "msg": "abc",
  "code": 200,
})

Directory

./public                # static resource directory;
./api                   # mock directory;
./src                   # development source code;
./package.json          # project info
./webpack.config.js     # custom webpack configuration

Config

webpack.config.js

// get webpack
var webpack = require('qu-build/lib/webpack');

module.exports = function(webpackConfig) {
  webpackConfig.plugins.push(
    new webpack.DefinePlugin({
      __DEV__: JSON.stringify('true')
    });
  );
  return webpackConfig;
};

Current Tags

  • 2.2.0                                ...           latest (a year ago)

66 Versions

  • 2.2.0                                ...           a year ago
  • 2.1.5                                ...           a year ago
  • 2.1.4                                ...           a year ago
  • 2.1.3                                ...           a year ago
  • 2.1.2                                ...           a year ago
  • 2.1.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.1.0-beta.2                                ...           a year ago
  • 2.1.0-beta.1                                ...           a year ago
  • 2.0.2                                ...           a year ago
  • 2.0.1                                ...           a year ago
  • 2.0.0                                ...           a year ago
  • 2.0.0-beta.4                                ...           a year ago
  • 2.0.0-beta.3                                ...           a year ago
  • 2.0.0-beta.2                                ...           a year ago
  • 2.0.0-beta.1                                ...           a year ago
  • 2.0.0-beta.0                                ...           a year ago
  • 1.5.15                                ...           a year ago
  • 1.5.14                                ...           a year ago
  • 1.5.13                                ...           a year ago
  • 1.5.12                                ...           a year ago
  • 1.5.11                                ...           a year ago
  • 1.5.10                                ...           a year ago
  • 1.5.9                                ...           a year ago
  • 1.5.8                                ...           a year ago
  • 1.5.7                                ...           2 years ago
  • 1.5.6                                ...           2 years ago
  • 1.5.2                                ...           2 years ago
  • 1.5.1                                ...           2 years ago
  • 1.4.7                                ...           2 years ago
  • 1.4.6                                ...           2 years ago
  • 1.4.5                                ...           2 years ago
  • 1.4.4                                ...           2 years ago
  • 1.4.3                                ...           2 years ago
  • 1.4.2                                ...           2 years ago
  • 1.4.1                                ...           2 years ago
  • 1.4.0                                ...           2 years ago
  • 1.3.8                                ...           2 years ago
  • 1.3.7                                ...           2 years ago
  • 1.3.6                                ...           2 years ago
  • 1.3.5                                ...           2 years ago
  • 1.3.4                                ...           2 years ago
  • 1.3.0                                ...           2 years ago
  • 1.2.15                                ...           2 years ago
  • 1.2.14                                ...           2 years ago
  • 1.2.13                                ...           2 years ago
  • 1.2.12                                ...           2 years ago
  • 1.2.11                                ...           2 years ago
  • 1.2.10                                ...           2 years ago
  • 1.2.9                                ...           2 years ago
  • 1.2.8                                ...           2 years ago
  • 1.2.6                                ...           2 years ago
  • 1.2.5                                ...           2 years ago
  • 1.2.4                                ...           2 years ago
  • 1.2.3                                ...           2 years ago
  • 1.2.2                                ...           2 years ago
  • 1.2.1                                ...           2 years ago
  • 1.2.0                                ...           2 years ago
  • 1.1.7                                ...           2 years ago
  • 1.1.6                                ...           2 years ago
  • 1.1.5                                ...           2 years ago
  • 1.1.4                                ...           2 years ago
  • 1.1.3                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 4
Last Day 1
Last Week 2
Last Month 2
Dependencies (54)
Dev Dependencies (4)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |