Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#53 closed defect (fixed)

single file build

Reported by: madair Owned by: madair
Priority: P1 Milestone: 1.1
Component: Core Version: 1.0.4
Severity: Major Keywords:
Cc: Browser: All
External ID: Operating System: All
state: New

Description

add a build target to create a 'compiled' app that would do the following:

  • analyse the application definition and create a single file build that includes only the widgets referenced by the application definition
  • pre-process the application definition into a json object and include it in the single file build
  • include config.json in the single file build

The result would be a template that loads a single javascript file that includes everything required to get started.

Implement the YUI compressor in build.xml

Change History (10)

comment:1 by madair, 17 years ago

(In [1385]) re #53:

  • builds all of fusion in a single file
  • will parse an AppDef file for required Widget and Map js files and include only those files in the SF build.xml
  • converts AppDef to a JSON structure and includes it
  • add YUI compression

comment:2 by madair, 17 years ago

(In [1386]) re #53: file clean up

comment:3 by jbirch, 17 years ago

Hey, that's pretty darn cool.

Will there be an option for sites that are running multiple fusion apps off the same install to specify multiple appdefs?

comment:4 by madair, 17 years ago

Status: newassigned

in response to Jason, no not as it stands since the AppDef gets converted to JSON and included in the single file. Multiple fusion apps would each be "compiled" into separate JavaScript files in included in the app's script src tag.

However all other Fusion files (CSS/PHP/images) would come from a shared install of Fusion.

comment:5 by madair, 17 years ago

including the AppDef JSON structure should be optional, i.e. if not specified in the ant build process, it's not included and Fusion behaves as before loading AppDef and converting to JSON at run time.

comment:6 by madair, 17 years ago

Milestone: 1.0.5

comment:7 by jbirch, 17 years ago

Mike, is including the appdef currently optional, or is this a future enhancement (should be?)? I'd love to see MapGuide 2.0.1 use a single-file build.

How does this impact extensions? If using a single-file build, will extensions not in the build still be loaded at runtime?

comment:8 by madair, 17 years ago

extensions are supported in the singleFile build as long as they are installed in fusion/ext. Including the AppDef is not optional at the moment, this will be fixed for 1.0.5.

comment:9 by madair, 17 years ago

Resolution: fixed
Status: assignedclosed

(In [1390]) closes #53: makes pre-parsing and including ApplicationDefinition optional.

comment:10 by madair, 17 years ago

Milestone: 1.0.51.1
Note: See TracTickets for help on using tickets.