Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/egoist/hexo-renderer-buble

Using Buble to transform JS files in your Hexo website.
https://github.com/egoist/hexo-renderer-buble

buble es2015 hexo theme

Last synced: about 1 month ago
JSON representation

Using Buble to transform JS files in your Hexo website.

Awesome Lists containing this project

README

        

# hexo-renderer-buble

[![NPM version](https://img.shields.io/npm/v/hexo-renderer-buble.svg?style=flat-square)](https://npmjs.com/package/hexo-renderer-buble) [![NPM downloads](https://img.shields.io/npm/dm/hexo-renderer-buble.svg?style=flat-square)](https://npmjs.com/package/hexo-renderer-buble) [![Build Status](https://img.shields.io/circleci/project/egoist/hexo-renderer-buble/master.svg?style=flat-square)](https://circleci.com/gh/egoist/hexo-renderer-buble)

## Install

```bash
$ npm install --save hexo-renderer-buble
```

## Usage

Just install this package and you're all set, if you want custom options for buble, simply do:

```yml
# _config.yml
buble:
transforms:
dangerousForOf: true
```

Check out all buble options: https://buble.surge.sh/guide/#using-the-javascript-api

Default options:

```js
{
transforms: {
generator: false,
dangerousForOf: true,
dangerousTaggedTemplateString: true
}
}
```

### include

By default it transforms all `.js` `.jsx` `.es6` files, but you can also set `include` to transform specified files only:

```yml
buble:
include: **/foo.js
# or array
include:
- **/foo.js
- **/js/bar.js
```

## Contributing

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## License

[MIT](https://egoist.mit-license.org/) © [EGOIST](https://github.com/egoist)