npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

qu-build

v2.2.0

Published

Build tools for FE

Downloads

107

Readme

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;
};