hexo-plugin-rollup
hexo plugin es module bundler.
Last updated 2 years ago by c-cho .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install hexo-plugin-rollup 
SYNC missed versions from official npm registry.

hexo-plugin-rollup

hexo plugin es module bundler.

Install

$ npm install hexo-plugin-rollup --save

Using

Entry

# _config.yml
rollup:
  entry: index.js

or

# _config.yml
rollup:
  entry:
    - index.js
    - lib.js

entry file root path

_config.yml in site directory: hexo-site/source/js/

_config.yml in theme directory: hexo-site/themes/my-theme/source/js/

Rollup Plugins Import

Import rollup plugin installed in Site directory.

To configure plugins inside of a configuration file, use the plugins key, which contains a list of plugin names.

The rollup-plugin- prefix can be omitted from the plugin name.

# _config.yml
rollup:
  plugins:
    - memory
    - includepaths
    - commonjs
    - name: node-resolve
      config:
        browser: true
    - name: rollup-plugin-buble
      config:
        ie: 11
        chrome: 58
        edge: 15

Javascript File Include

Include *.js file in Site or Theme directory.

e.g: *.js file in npm package CSS Framework.

# _config.yml
rollup:
  include:
    - ./node_modules/my-package/src/bundle.js
    - ./node_modules/jquery/dist/jquery.js

Include file root path

_config.yml in site directory: hexo-site

_config.yml in theme directory: hexo-site/themes/my-theme

Current Tags

  • 0.0.4                                ...           latest (2 years ago)

1 Versions

  • 0.0.4                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 1
Last Month 2
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |