reddit/node-build

Name: node-build

Owner: Reddit

Description: build system for ES2015 projects

Created: 2016-04-25 21:37:10.0

Updated: 2018-03-03 20:36:45.0

Pushed: 2017-07-27 09:06:59.0

Homepage: null

Size: 371

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

r-build

r/Build aims to be a configurable build system for ES6/7 projects based on on Webpack. Out of the box it includes some default configurations for building clients (all pre-packaked, minifed, and tree-shaken), and servers (common code bundled into a vendor file that node can run). It can also handle less/css (defining sass is easy and left as an excercise for the reader), and webfonts

Generators

r/Build is built off a system of defining shorthand for webpack build configurations. This way you can define configs via simple names if you want to build your own config. The goal being you can define your own configs (as /<project-root>/blueprints.config.js) that either:

Configs

See /lib/build/makeBuild and /bin/buildBlueprints.js To understand more how builds work.

In practice, say you have a simple client you want to build with less, css, es6/7, and you want it to watch. you would run buildBlueprints -c -w, or you could define your own (in this case equivalent) config in a blueprints.config.js with the contents:

le.exports = [{
me: 'Client',
bpack: {
entry: './lib/Client.es6.js',
output: {
  generator: 'simple',
  dest: './bin',
},
resolve: {
  generator: 'npm-and-modules',
  extensions: ['', '.js', '.jsx', 'es6.js', '.json'],
},
loaders: [
  'esnextreact',
  'json',
  'css',
  'less',
],
plugins: [
  'extract-css',
  'abort-if-errors',
],


Future goals

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.