@brjs-ci brjs-ci released this Sep 5, 2014 · 2549 commits to master since this release

Assets 3

BladeRunnerJS v0.12

Overview

  • A simplified app structure is now supported
    • The 'default' Aspect (apps/<app-name>/default-aspect) is no longer needed
    • A BladeSet is no longer required to create Blades
    • Package directory structures within 'src' is now optional
    • See below for more information
  • Removed the WEB-INF directory from newly created apps
    • The j2eeify command can be used to create the WEB-INF directory if it is needed
  • Changed the build-app command so it does not create a nested <app-name> directory
    • This is a change to previous functionality, see below
  • Removed last remaining workbench dependencies on ExtJS
  • Improved JsDoc
  • If an exception is thrown when a page is loaded the exception no longer changes on subsequent refreshes
  • Aspect and Workbench URLs that don't end with a / are now correctly redirected
  • The js-style for CommonJS classes has changed from node-js to common-js
    • This is a breaking change, see below
  • Alias namespaces are now correctly enforced
    • This is a breaking change, see below
  • Sub themes are now supported
    • A theme can now extend another by using the format <parent>-<variant>
  • A new command has been created which allows copying themes to a new name
  • Thirdparty libraries will no longer be wrapped in a 'define' block based on the presence of a package.json
    • This is a breaking change, see below

'default' Aspect is no longer needed

  • The default-aspect folder at the root level of your application is now optional. Aspect files and folders for the 'default' Aspect are now supported directly at the root level of your application, for example:
apps/someCoolApp
├── app.conf             # Application configuration
├── index.html           # Application entry point
├── src                  # app-level JavaScript
├── resources            # other app resources
├── themes               # CSS and images
├── libs                 # app libraries
└── unbundled-resources  # Assets that shouldn't be minified and bundled
  • The above is now the default structure for any newly created applications
  • Previously created applications which only made use of the 'default Aspect can migrate their application to this structure by moving all of the folder contents up to the application folder
  • This change does not break backwards compatability so any existings apps with a default-aspect will continue to behave as before, however having both the default-aspect folder and aspect files directly in the app folder is not supported

Optional BladeSet

  • A BladeSet is no longer needed in order to create Blades. Blades without a parent BladeSet can live inside a blades directory directly inside an app.
  • To create a new Blade without a parent BladeSet via the CLI use the command ./brjs create-blade <app-name> default <blade-name>. In a future release the need for 'default' will be removed.
  • The require prefix for Blades inside the 'default' Bladeset is <app-require-prefix>/<blade-name

Optional package directories

  • Package directories are no longer needed within 'src' directories. For example: in previous releases the path to a file inside a Blade's src directory was myBlade/src/<app-requirePrefix>/<bladeset-name>/<blade-name>/MyBladeClass.js. The <app-requirePrefix>/<bladeset-name>/<blade-name> part of this path is now implicitly added, this means the require path to a Blade class is still <app-requirePrefix>/<bladeset-name>/<blade-name>/MyBladeClass.js but MyBladeClass.js can live at <blade>/src/MyBladeClass.js
  • Classes can stil live within sub packages, the implicit require prefix will be prepended. For example, the class myBlade/src/bladePackage/subPackage/MyBladeClass.js will have a require path of <app-requirePrefix>/<bladeset-name>/<blade-name>/bladePackage/subPackage/MyBladeClass.js
  • This change is 100% backwards compatible, classes can still have the explicit package directories

Themes can now extend other themes

  • Themes can now extend one another using the format <parent>-<variant>
  • For example, an app may have the theme red and the sub themes red-dark and red-light. When red-dark is used as a theme in the css.bundle tag (<@css.bundle theme="red-dark" @/>) the red theme bundle will be loaded follow by the red-dark theme bundle. This allows the red theme to contain common 'red' styling and the red-dark and red-light themes to contain variants on their parent theme.
  • Themes in the format <something>-<anotherthing> can still be used without requiring a parent theme to be present, however a warning will be logged

Improved JSDoc

  • BRJS has been updated to use the latest master version of JSDoc toolkit 3
  • Performance when generating docs for large apps has improved. Thanks to @hegemonic for the help on this.
  • JSDoc styling has been updated and improved.
  • The BRJS API documentation hosted at http://apidocs.bladerunnerjs.org has been updated to use the new styling
  • The command ./brjs jsdoc <app-name> makes use of all changes made to JSDoc generation

Compatibility Issues

1. Alias namespace rules are now more strict

  • Previously Alias namespaces were not properly enforced which meant an alias name could be defined outside of a Blade; BladeSet or Library namespace. This enforcement is now properly enforced.
    • BladeSet Aliases must have the format <app-require-prefix>.<bladeset-name>.*
    • Blade Aliases must have the format <app-require-prefix>.<bladeset-name>.<blade-name>.*
    • Library Aliases must have the format <library-require-prefix>.*
  • Any Aliases not conforming to the above rules will generate an exception when the App is loaded

2. '.js-style' file contents have changed

  • The JS style representing CommonJS classes has changed from node-js to common-js. Any instances of node-js inside .js-style files should change to common-js.
  • This change only affects apps that make use of the NamespacedJS JavaScript style

3. Thirdparty libraries no longer wrapped in a 'define' block is package.json is present

  • Previous Thirdparty libraries were wrapped in a 'define' block during the bunding process is a package.json file was present in the library
  • commonjsDefinition: true is now required in thirdparty-lib.manifest instead to produce the same behaviour
  • If NamespacedJS style classes are used anywhere in the application Thirdparty libraries are also now globalised using the name of the library rather than the value of the exports. The value of exports is still used when you require() the library.

4. Changes to build-app command

  • The build app command has changed so it no longer creates an extra nested directory if the <target-dir> argument is provided
  • For example ./brjs build-app myApp target previously built the app in target/myApp, it will now be built to target


API Documentation

Travis Build Status for v0.12:   Build Status

Closed Issues

The following issues labelled bug, feature, enhancement, experience, breaking-change, java-api or js-api have been closed:

  • When a path is supplied to the build-app command the static files should be output to that folder #938
  • Built apps contain a .git file which can't be added to a git repo #934
  • Tick box overlaps "Don't show this again" text on dashboard #921
  • Error/Warning when running brjs from gitbash #909
  • Import app command fails to re-namespace some directories #889
  • review the tests directory structure and simplify it #880
  • Remove ExtJs as thirdparty library #875
  • BRJS could help with Java installation issues #872
  • No error when there is a new line at the top of web.xml #816
  • different exceptions seen after each reload #810
  • NamespacedJS tests fail if testing CommonJS code #782
  • Don't Emit Bundles For Unused Minifiers #721
  • Allow multiple aliasDefinitions.xml files #717
  • Allow aspect/locale URLs that dont end with a / #712
  • Parameter details are listed out of order (and some are missing) #549
  • As a developer I want only the files related to the functionality/runtime of my application to be present within my app directory #541
  • The prefix 'common-js' should be used instead of 'node-js'. #422
  • Add support for thirdparty libraries with UMD wrappers #420
  • allow support for sub-themes or variants on a theme #401
  • Unable to find SourceModule exception should state where it was when trying to find other source module #379
  • ./brjs app-dependencies shows exception #376
  • Improve test experience #353
  • Copy theme command #247
  • modify the app template to no longer add 'WEB-INF.xml' and allow the server to add this in programtically #91
  • create a J2eeifyCommandPlugin that allows the WEB-INF folder to be made explicit again #90
  • allow package directories to be optional #80
  • Simplified application directory structure #19
  • Aspects should be optional #17
  • BladeSets should be optional #2
  • Support for Static File deployment #18

30 issues closed; 29 labelled bug, feature, enhancement, experience, breaking-change, java-api or js-api from 1 milestones:
https://github.com/BladeRunnerJS/brjs/issues?milestone=19&state=closed

Found an Issue?

Parts of this release note have been auto-generated. If you notice any problems with it tell us