simple-bundle
Bundle without a task manager
Last updated 2 years ago by willhoag .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install simple-bundle 
SYNC missed versions from official npm registry.

simple-bundle

Bundle assets without a task manager. HTML -> BUNDLE

npm version

If you use any of my packages, please star them on github. It’s a great way of getting feedback and gives me the kick to put more time into their development. If you encounter any bugs or have feature requests, just open an issue report on Github.

Follow me on Twitter @devhoag

Description

html -> dest / pre-processed, minified & cache-busted

Input html and output pre-processed, minified and cache-busted asset bundle without a task manager.

Use .babelrc and postcss.config.js to configure processing your javascript and styles.

Example

bundle index.html -o dist

tree dist
# dist
# ├── index-43fd1cd487.js
# ├── style-be04798bc0.css
# └── index.html

Usage

Make .babelrc and postcss.config.js files in your project to customize processing assets

.babelrc

{
  "plugins": ["transform-runtime"],
  "presets": ["es2015"]
}

postcss.config.js

module.exports = {
  plugins: [
    require('postcss-import'),
    require('postcss-cssnext')
  ]
}

Install used dependencies

yarn add --save-dev \
  babel-plugin-transform-runtime \
  babel-preset-es2015 \
  postcss-import \
  postcss-cssnext

npm run / CLI

bundle index.html other.html -o dist

tree dist
# dist
# ├── combined-43fd1cd487.js
# ├── css/combined-be04798bc0.css
# ├── other.html
# └── index.html

CLI

Usage: bundle [html] {OPTIONS}

Options:

  -h, --help             output usage information
  -V, --version          output the version number
  -o, --output [folder]  output directory for assets

JS API

const bundle = require('simple-bundle')
bundle({
  src: ['index.html', 'other.html'],
  dist: 'dist'
})

Installation

Download node at nodejs.org and install it, if you haven't already.

npm install simple-bundle --save

License

ISC

Current Tags

  • 2.0.0-alpha                                ...           latest (2 years ago)

5 Versions

  • 2.0.0-alpha                                ...           2 years ago
  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (20)
Dependents (0)
None

Copyright 2014 - 2018 © taobao.org |