Coder Social home page Coder Social logo

wkexinpd / honeypack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alibaba-archive/honeypack

0.0 1.0 1.0 62 KB

a combination of webpack-dev-server and webpack-dev-middleware, which provides full featured and scalable configuration to bundle assets

JavaScript 100.00%

honeypack's Introduction

Honeypack

Honeypack is a combination of webpack-dev-server and webpack-dev-middleware, which provides full featured and scalable configuration to bundle assets, and supports HMR.

Install

npm i honeypack --save-dev

Migration from v0.x

Please read our documentation on migration.

Usage

CLI

honeypack --help

>

  Usage: honeypack [options]
         honeypack <command> [options]

  Options:

    -v, --version        output the version number
    -h, --help           output usage information

  Commands:

    init [options]
    run|start [options]
    build [options]

Create new apps

honeypack init

>

  Usage: init [options]

  Options:

    -o, --output <name>  The config file name
    --default            Skip questions, create the config file directly
    -h, --help           output usage information

Start as a dev server

honeypack run|start

>

  Usage: run|start [options]

  Options:

    -c, --config <path>  Path to the config file, defaults to webpack.config.js
    -h, --host <host>    The host to listen on, defaults to localhost
    -p, --port <port>    The port to listen on, defaults to 8000
    -h, --help           output usage information

Build the app for production

honeypack build

>

  Usage: build [options]

  Options:

    -c, --config <path>  Path to the config file, defaults to webpack.config.js
    -h, --help           output usage information

API

Middleware

const honeypack = require('honeypack');
const express = require('express');
const app = express();

app.use(honeypack({
  config: 'webpack.config.js',
  root: './assets',
  hot: false
}));
  • config: the webpack config filename

  • root: the directory contains your frontend assets

  • hot: enable HMR

honeypack's People

Contributors

hqidea avatar baqian avatar cctv1005s avatar futurist avatar

Watchers

James Cloos avatar

Forkers

noonnightstorm

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.