thriller
Thriller is a configureless build system for Node.js microservices on top of Rollup
Last updated 2 years ago by ezekielchentnik .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install thriller 
SYNC missed versions from official npm registry.

Thriller

Thriller is an easy peasy build system for Node.js micro-services on top of Rollup. Thriller lets you create modern Node.js apps and services with zero config. Thriller handles all the watching, reloading, transpiling, and bundling for you. It comes with a few healthy defaults and support for modern JS features. Everything can be customized and you can easily add Thriller to your existing Node.js project with just a single dependency, batteries included. Inspired by backpack, nuxt.js, next.js, and create-react-app

Features

  • Zero-config, one dependency
  • Latest ES6 features (module syntax, async/await, object rest spread)
  • Live reloading

How to use

Install it:

npm i thriller --save

Add an npm script to your package.json:

{
  "scripts": {
    "dev": "thriller"
  }
}

Make sure src/index.js is the entry of your app.

Run your application in development mode:

npm run dev

Custom configuration

For custom advanced behavior, you can create a thriller.config.js in the root of your project's directory (next to package.json).

module.exports = {
  /* config options here */
}

Customizing rollup config

Example

To extend webpack, you can define a function that extends its config via thriller.config.js.

// thriller.config.js
module.exports = {
  rollup: (config, options, rollup) => {
    // Perform customizations to config
    // Important: return the modified config
    return config
  }
}

Customizing babel config

Example

To extend our usage of babel, you can define a .babelrc file at the root of your app. This file is optional.

If found, Thriller will consider it to be the defacto babel config, it will also need Thriller's preset thriller/babel.

Here's an example .babelrc:

{
  "presets": [
    "thriller/babel",
    "stage-0"
  ]
}

Building for Production

Add a npm script for the build step:

{
  "scripts": {
    "dev": "thriller",
    "build": "thriller build"
  }
}

Then run the build command and start your app

npm run build
node ./build/main.js

CLI Commands

thriller dev

Runs thriller in development mode.

Your code will reload if you make edits.

thriller build

Builds the app for production to the build folder.
It correctly bundles your production mode and optimizes the build for the best performance.

You can run your production application with the following command:

node ./build/main.js

Your application is ready to be deployed!

Inspiration

Current Tags

  • 0.0.1                                ...           latest (2 years ago)

1 Versions

  • 0.0.1                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 3
Last Month 1
Dependencies (13)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |