A New Package (RC1)
Pre-release
Pre-release
Release Notes
Spaghetti has been reworked quite a bit for this release. It should be much simpler and more versatile than before.
Major changes:
-
Simplified naming when implementing modules
-
If you are implementing a module called
MyModule
, you need to create a class like this:class MyModule implements IMyModule { /* ... */ }
-
-
Unit testing support has been greatly improved, especially for TypeScript.
-
Support for static module methods
-
Module bundles now contain raw JS code wrapped in a
__spaghetti()
closure- There is no dependency on RequireJs anymore.
- If you want something that works with AMD or CommonJS, you need to package the module or application with
PackageModule
orPackageApplication
. - Gone are the
Wrap
andExtractModules
tasks, too.
-
Constant values are now specified in the module definition, and can only have primitive values:
const MyConstants { int NUM = 1 string WHO = "me" }
-
Only directly dependent modules are accessible from a module (we simply don't generate an accessor interface/proxy)
- Defined types, enums and constants are still available (we do generate those types)
Minor additions:
- Module bundles can be a directory or a ZIP
- Module and application packaging names have been cleaned up:
BundleModule
creates a directory with the module bundle contents in it, which are independent of packagingPackageApplication
makes a package of the application to be used with AMD or CommonJSPackageModule
makes a package of a single module bundle to be used with AMD or CommonJS
- The new
processSpaghettiResources
task works likeprocessResources
in JVM plugins. - TypeScript now checks constructor arguments
- Added lots of tests
- ANTLR lexer syntax errors are now reported with the location they happened in, and they fail the build.