webpack-bbq
webpack your bbq
Last updated 2 years ago by peiren .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install webpack-bbq 
SYNC missed versions from official npm registry.

webpack-bbq

Supported Features

✔︎ 转化 src 到 lib
✔︎ 生成 app-revisions.json
✔︎ 装配 loaders: javascript, stylesheets, json, fonts, images, medias
✔︎ 兼容 Node.js: process.env.NODE_ENV 和 __dirname, __filename
✔︎ server rendering
✔︎ static rendering


webpack-bbq/libify

Show Your Webpack Loader Transformed Source!

约定

  • 使用到的 src 源码需要转化到 lib 中
  • src 中 require 的 id 不需要进行改变: abc.css -> abc.css.js, abc.jsx -> abc.jsx.js
  • 支持 ts 和 tsx 文件,ts 文件配合resolve.extensions直接引入, abc.ts -> abc.js
  • 所有 lib 中的模块 node 可运行

用法

// in your webpack.config.js
const libify = require.resolve('webpack-bbq/libify');

module.rules: [ { loader: libify, enforce: 'post', options: { webpackConfigPath } } ]

webpack_public_path

基于 require('js-tokens') 技术, 使用类 require("../webpack.config")[0].output.publicPath 替换掉 __webpack_public_path__


AppRevisions Generator for Webpack

Webpack Plugin that generates a app-resisions of bundled files.

Usage

// webpack.config.js  
var AppRevisionsGenerator = require('webpack-bbq/AppRevisionsGenerator');

var config = {
  ...
  entry: {
    "bundle": "./src/application.js",
    "vendors": "./vendors/vendors.js"
  },
  output: {
    path: './public/assets/',
    filename: 'js/[name]-[hash].js',
    publicPath: "http://example.com/assets"
  },
  plugins: {
    new AppRevisionsGenerator("PATH_TO_DEST_DIRECTORY")
  }
  ...
}

module.exports = config;

Output

{
  "bundle.js": "js/bundle-f34dc68a3493edfcaa3a.js",
  "vendors.js": "js/vendors-13adcef238710a91e834.js"
}

Current Tags

  • 5.3.9                                ...           latest (2 years ago)
  • 5.4.2-1                                ...           next (2 years ago)

85 Versions

  • 5.4.2-1                                ...           2 years ago
  • 5.3.9                                ...           2 years ago
  • 5.4.2-0                                ...           2 years ago
  • 5.3.8                                ...           2 years ago
  • 5.4.1 [deprecated]           ...           2 years ago
  • 5.4.0 [deprecated]           ...           2 years ago
  • 5.3.7                                ...           2 years ago
  • 5.3.6                                ...           2 years ago
  • 5.3.5                                ...           2 years ago
  • 5.3.4                                ...           2 years ago
  • 5.3.3                                ...           2 years ago
  • 5.4.0-0                                ...           2 years ago
  • 5.3.2                                ...           2 years ago
  • 5.3.1                                ...           2 years ago
  • 5.3.0                                ...           2 years ago
  • 5.2.1                                ...           2 years ago
  • 5.2.0                                ...           2 years ago
  • 5.1.4                                ...           2 years ago
  • 5.1.3                                ...           2 years ago
  • 5.1.2                                ...           2 years ago
  • 5.1.1                                ...           2 years ago
  • 5.1.0                                ...           3 years ago
  • 5.0.1                                ...           3 years ago
  • 4.1.2                                ...           3 years ago
  • 5.0.0                                ...           3 years ago
  • 5.0.0-9                                ...           3 years ago
  • 5.0.0-8                                ...           3 years ago
  • 5.0.0-7                                ...           3 years ago
  • 5.0.0-6                                ...           3 years ago
  • 5.0.0-5                                ...           3 years ago
  • 5.0.0-4                                ...           3 years ago
  • 5.0.0-3                                ...           3 years ago
  • 5.0.0-2                                ...           3 years ago
  • 5.0.0-1                                ...           3 years ago
  • 5.0.0-0                                ...           3 years ago
  • 4.1.1                                ...           3 years ago
  • 4.1.0                                ...           3 years ago
  • 4.0.7                                ...           3 years ago
  • 4.0.6                                ...           3 years ago
  • 4.0.6-4                                ...           3 years ago
  • 4.0.6-3                                ...           3 years ago
  • 4.0.6-2                                ...           3 years ago
  • 4.0.6-1                                ...           3 years ago
  • 4.0.6-0                                ...           3 years ago
  • 4.0.5                                ...           3 years ago
  • 4.0.4                                ...           3 years ago
  • 4.0.3                                ...           3 years ago
  • 4.0.2                                ...           3 years ago
  • 4.0.1                                ...           3 years ago
  • 4.0.1-0                                ...           3 years ago
  • 3.1.6                                ...           3 years ago
  • 3.1.5                                ...           3 years ago
  • 3.1.4                                ...           3 years ago
  • 3.1.3                                ...           3 years ago
  • 3.1.2                                ...           3 years ago
  • 3.1.1                                ...           3 years ago
  • 3.1.0                                ...           3 years ago
  • 3.0.0                                ...           3 years ago
  • 2.1.3                                ...           3 years ago
  • 2.1.2                                ...           3 years ago
  • 2.1.1                                ...           3 years ago
  • 2.1.0                                ...           3 years ago
  • 2.0.8                                ...           3 years ago
  • 2.0.7                                ...           4 years ago
  • 2.0.6                                ...           4 years ago
  • 2.0.5                                ...           4 years ago
  • 2.0.4                                ...           4 years ago
  • 2.0.3                                ...           4 years ago
  • 2.0.2                                ...           4 years ago
  • 2.0.1                                ...           4 years ago
  • 2.0.0                                ...           4 years ago
  • 1.2.6                                ...           4 years ago
  • 1.2.5                                ...           4 years ago
  • 1.2.4                                ...           4 years ago
  • 1.2.3                                ...           4 years ago
  • 1.2.1                                ...           4 years ago
  • 1.2.2                                ...           4 years ago
  • 1.2.0                                ...           4 years ago
  • 1.1.0                                ...           4 years ago
  • 1.0.7                                ...           4 years ago
  • 1.0.6                                ...           4 years ago
  • 1.0.4                                ...           4 years ago
  • 1.0.3                                ...           4 years ago
  • 1.0.2                                ...           4 years ago
  • 1.0.0                                ...           4 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (25)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |