Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Releases: jriecken/asset-smasher

0.3.2

02 Jul 22:36
Compare
Choose a tag to compare

Changes

  • Check that found 'asset' is not a non-manifest directory. (Fixes #18)

0.3.1

02 Jul 22:35
Compare
Choose a tag to compare

Changes

Enhanced AMD support

  • Make AMD support opt-in - must specify 'amd: true', or 'amd: {....}' in asset-smasher config
  • Allow a 'baseLogicalPath' option to be in the amd option object that will be stripped off the front of all module ids (useful for shortening module names if for example, they are all inside a 'js' folder in their logical path
  • Give anonymous/simple commonjs wrapped define calls module ids (and dependency arrays for simple commonjs wrapper)

0.3.0

02 Jul 22:38
Compare
Choose a tag to compare

Changes

Functional Changes

  • The JSX transformer now can transform .js files (without the additional .jsx extension) as long as the /** @jsx React.DOM */ comment is present in the file.
  • For .jsx files, the JSX transformer will add the /** @jsx React.DOM */ comment to the file if it is missing.
  • CommonJS-style .js files can now be automatically wrapped with AMD define calls if a /** @amd */ comment is present in the file. See the "AMD Support" section of the README for more info.

API Changes (this should only affect you if you've written custom transformers)

  • The shouldTransform and transformedFileName methods in transformers now receive the asset object as a second parameter
  • The asset object now has a transformInfo property (that is an object) that transformers can use to put information in when they are processing. This can be used, for example, to prevent a file from being processed more than once (see jsx_transform.js for an example)
  • Post-transform operations now must be a constructor function rather than just a function(asset, cb). This is to allow options to be passed into the post-transformer (see end_js_semicolon.js or the new amd_wrapper.js for examples)

0.2.12

02 Jul 22:38
Compare
Choose a tag to compare

Changes

  • Add a .jsx transformer for use with React

0.2.11

02 Jul 22:39
Compare
Choose a tag to compare

Changes

  • No functional changes
  • Extract and use dependency-graph module.