Skip to content

Releases: broccolijs/broccoli

v3.5.2

03 May 17:57
Compare
Choose a tag to compare

🐛 Bug Fix

Committers: 1

v3.5.0

07 Dec 15:49
Compare
Choose a tag to compare

🚀 Enhancement

  • #474 add the ability to ignore absolute paths from watcher (@ef4)

🐛 Bug Fix

  • #473 remove vestigial filter option (@ef4)

📝 Documentation

  • #470 Fix wrong package name in README (@ursm)

Committers: 2

  • Edward Faulkner (@ef4)
  • Keita Urashima (@ursm)

Input node change tracking

15 Aug 21:42
a78b7ac
Compare
Choose a tag to compare
  • Add input node change tracking (#419)
  • Initial typescript conversion (#422)
  • Fixup cli usage information (#421)
  • Use a more appropriate data structure for nodeWrappers (#418)
  • Support serving over HTTPS (#417)

Node version change, Rebuild memoization, and Watcher changes

20 May 23:48
3949b6a
Compare
Choose a tag to compare
  • Add rebuild memoization support behind feature flag (#396)
    • BROCCOLI_ENABLED_MEMOIZE=true to turn on
  • Add more watcher events (#398)
  • Drop support for unsupported Node versions (#400)
    • Drop Node 6 support.
  • Bump broccoli-node-info to v2.0.0
  • Pass watchedNodes to Watcher/WatcherAdapter (#403)
    • Require watchedNodes arguments to Watcher/WatcherAdapter (#405)

TypeScript support

20 Mar 18:04
Compare
Choose a tag to compare

The future is here, today!

Broccoli now supports a Brocfile.ts, and will auto compile this through ts-node 🎉

By default, ts-node uses TypeScript defaults for the compiler options. If you wish to add your own compiler options to make things stricter, you can add a tsconfig.json of your own and Broccoli should auto pick this up.

So now:

import merge = require('broccoli-merge-trees');
import uglify = require('broccoli-uglify-sourcemap');
import { BrocfileOptions } from 'broccoli';

export default (options: BrocfileOptions) => {
  let js = 'src/a';

  if (options.env === 'production') {
    js = uglify(js);
  }

  return merge([js, 'src/b']);
}

Should work, and your editor should get access to the types it can find.
Over time, we will push for plugin developers to define at least a type definition, and provide documentation for how to convert a plugin to TypeScript

Thanks to everyone who helped in reviewing this.

ES Modules, Export function & Environment support

07 Mar 03:03
Compare
Choose a tag to compare

This release adds support for several new features.

ES Modules syntax

PR: #385
ES modules syntax is now supported in Broccoli using the esm npm package. You're now free to use this syntax for your Brocfile.js https://github.com/broccolijs/broccoli#using-plugins-in-a-brocfilejs
Welcome to the future!

import merge from 'broccoli-merge-trees';

export default merge(['a', 'b']);

Export function

PR: #386
Broccoli now supports exporting a function from the Brocfile.js, in the same way that Ember-CLI does https://github.com/broccolijs/broccoli#brocfilejs which paves the way for future enhancements to supply build parameters to the pipeline

import merge from 'broccoli-merge-trees';

export default () => {
  return merge(['a', 'b']);
}

Environment

PR: #387
Broccoli now supports --environment,-e,--prod,--dev CLI arguments similar to Ember-CLI. The environment flag is passed to the Brocfile in the options hash { env: ENVIRONMENT } and defaults to development.
Similar to the legacy BROCCOLI_CLI environment variable, this allows a build pipeline to be altered based on the destined environment, for example by minifying files for production.

import merge from 'broccoli-merge-trees';
import uglify from 'broccoli-uglify-js';

export default (options) => {
  let tree = merge(['a', 'b']);
  if (options.environment === 'production') {
    tree = uglify(tree);
  }
  return tree;
}