Read dependencies's info from package.json so that it is easier to publish updates. Add README.md file
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/b3f5ddc8 Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/b3f5ddc8 Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/b3f5ddc8 Branch: refs/heads/develop Commit: b3f5ddc8fd37e8207a3aaef29333fc8342e99e40 Parents: b0c1cfa Author: OmPrakash Muppirala <[email protected]> Authored: Sun Mar 13 00:41:39 2016 -0800 Committer: OmPrakash Muppirala <[email protected]> Committed: Sun Mar 13 00:44:28 2016 -0800 ---------------------------------------------------------------------- npm-flexjs/README.md | 55 +++++++++++++++++++++++ npm-flexjs/dependencies/AdobeAIR.js | 6 ++- npm-flexjs/dependencies/ApacheFalcon.js | 26 ++++++----- npm-flexjs/dependencies/ApacheFlexJS.js | 6 +-- npm-flexjs/dependencies/FlashPlayerGlobal.js | 5 ++- npm-flexjs/dependencies/SWFObject.js | 5 ++- npm-flexjs/package.json | 15 +++++-- 7 files changed, 94 insertions(+), 24 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b3f5ddc8/npm-flexjs/README.md ---------------------------------------------------------------------- diff --git a/npm-flexjs/README.md b/npm-flexjs/README.md new file mode 100644 index 0000000..2e2d350 --- /dev/null +++ b/npm-flexjs/README.md @@ -0,0 +1,55 @@ +Apache FlexJS +============= + + Apache FlexJS is a next-generation Flex SDK that has the goal of allowing + applications developed in MXML and ActionScript to not only run in the + Flash/AIR runtimes, but also to run natively in the browser without Flash, + on mobile devices as a PhoneGap/Cordova application, and in embedded JS + environments such as Chromium Embedded Framework. FlexJS has the potential + to allow your MXML and ActionScript code to run in even more places than + Flash currently does. + + For detailed information about Apache Flex please visit the + [FlexJS Wiki](https://s.apache.org/flexjs) + + For detailed information about Apache Flex please visit the + [Apache Flex Website] (http://flex.apache.org/) + +Installation +================================== + + Install the Apache FlexJS NPM Module globally + + npm install flexjs -g + (There are a couple of prompts you need to answer before installation starts) + +Usage +================================== + + After global installation, the following compiler tools will be available for you + to use: mxmlc, asjsc and asjscompc + + Usage: + mxmlc <path to main .mxml file> + asjsc <path to main .as file> + asjscompc <path to main .as file> + +Examples +================================== + + There are several examples that ship with the FlexJS npm module. They are located in: + Windows: C:\Users\<username>\AppData\Roaming\npm\node_modules\flexjs\examples\ + Mac: /usr/local/lib/node_modules/flexjs/examples/ + + You can compile them with FlexJS like this: + + MXMLC (Targets apps built for the FlexJS SDK, which creats a swf file as well as + HTML5/JavaScript output) + + Windows: mxmlc C:\Users\<username>\AppData\Roaming\npm\node_modules\flexjs\examples\flexjs\ChartExample\src\ChartExample.mxml + Mac: asjsc /usr/local/lib/node_modules/flexjs/examples/flexjs/ChartExample/src/ChartExample.mxml + + ASJSC (Write ActionScript3 targeting HTML5/SVG DOM without requiring JavaScript): + + Windows: asjsc C:\Users\<username>\AppData\Roaming\npm\node_modules\flexjs\examples\native\USStatesMap\src\USStatesMap.as + Mac: asjsc /usr/local/lib/node_modules/flexjs/examples/native/USStatesMap/src/USStatesMap.as \ No newline at end of file http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b3f5ddc8/npm-flexjs/dependencies/AdobeAIR.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/AdobeAIR.js b/npm-flexjs/dependencies/AdobeAIR.js index 791f5fe..d037a48 100644 --- a/npm-flexjs/dependencies/AdobeAIR.js +++ b/npm-flexjs/dependencies/AdobeAIR.js @@ -23,14 +23,16 @@ var fs = require('fs'); var events = require('events'); var prompt = require('prompt'); var unzip = require('unzip'); +var pjson = require('../package'); var constants = require('../dependencies/Constants'); var AdobeAIR = module.exports = Object.create(events.EventEmitter.prototype); //Adobe AIR -var AdobeAIRURL = 'http://airdownload.adobe.com/air/win/download/19.0/'; -var fileNameAdobeAIR = 'AdobeAIRSDK.zip'; +var AdobeAIRURL = pjson.org_apache_flex.adobe_air_url; +var fileNameAdobeAIR = pjson.org_apache_flex.adobe_air_file_name; + var adobeAirPromptText = "\ Apache FlexJS SDK uses the Adobe AIR SDK to build Adobe AIR applications.\n\ The Adobe AIR SDK is subject to and governed by the\n\ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b3f5ddc8/npm-flexjs/dependencies/ApacheFalcon.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/ApacheFalcon.js b/npm-flexjs/dependencies/ApacheFalcon.js index 415927d..d0edfa2 100644 --- a/npm-flexjs/dependencies/ApacheFalcon.js +++ b/npm-flexjs/dependencies/ApacheFalcon.js @@ -25,6 +25,7 @@ var unzip = require('unzip'); var wrench = require('wrench'); var mkdirp = require('mkdirp'); var replace = require('replace'); +var pjson = require('../package'); var constants = require('../dependencies/Constants'); var duc = require('../dependencies/DownloadUncompressAndCopy'); @@ -32,8 +33,11 @@ var duc = require('../dependencies/DownloadUncompressAndCopy'); var ApacheFalcon = module.exports = Object.create(events.EventEmitter.prototype); //Falcon -var pathToFalconBinary = 'flex/falcon/0.5.0/binaries/'; -var fileNameFalconBinary = 'apache-flex-falconjx-0.5.0-bin.zip'; +var pathToFalconBinary = pjson.org_apache_flex.falcon_path_binary; +var fileNameFalconBinary = pjson.org_apache_flex.falcon_file_name; +var playerVersion = pjson.org_apache_flex.player_version; +var swfVersion = pjson.org_apache_flex.swf_version; + var falconCompilerLibFolder = 'falcon/compiler/lib/'; var jsLibFolder = constants.FLEXJS_FOLDER + 'js/lib/'; var googleClosureCompilerFolder = constants.FLEXJS_FOLDER + 'js/lib/google/closure-compiler/'; @@ -105,14 +109,14 @@ var falconDependencies = [ unzip:true }, { - url:'http://search.maven.org/remotecontent?filepath=/org/apache/flex/flex-tool-api/1.0.0/', + url:'http://search.maven.org/remotecontent?filepath=org/apache/flex/flex-tool-api/1.0.0/', remoteFileName:'flex-tool-api-1.0.0.jar', destinationPath:constants.DOWNLOADS_FOLDER + falconCompilerLibFolder, destinationFileName:'flex-tool-api.jar', unzip:false }, { - url:'http://search.maven.org/remotecontent?filepath=/args4j/args4j/2.0.28/', + url:'http://search.maven.org/remotecontent?filepath=args4j/args4j/2.0.28/', remoteFileName:'args4j-2.0.28.jar', destinationPath:jsLibFolder, destinationFileName:'args4j.jar', @@ -137,21 +141,21 @@ var falconDependencies = [ unzip:true }, { - url:'http://search.maven.org/remotecontent?filepath=/com/google/guava/guava/17.0/', + url:'http://search.maven.org/remotecontent?filepath=com/google/guava/guava/17.0/', remoteFileName:'guava-17.0.jar', destinationPath:jsLibFolder, destinationFileName:'guava.jar', unzip:false }, { - url:'http://search.maven.org/remotecontent?filepath=/org/codeartisans/org.json/20131017/', + url:'http://search.maven.org/remotecontent?filepath=org/codeartisans/org.json/20131017/', remoteFileName:'org.json-20131017.jar', destinationPath:jsLibFolder, destinationFileName:'org.json.jar', unzip:false }, { - url:'http://search.maven.org/remotecontent?filepath=/org/apache/flex/flex-tool-api/1.0.0/', + url:'http://search.maven.org/remotecontent?filepath=org/apache/flex/flex-tool-api/1.0.0/', remoteFileName:'flex-tool-api-1.0.0.jar', destinationPath:jsLibFolder, destinationFileName:'flex-tool-api.jar', @@ -352,7 +356,7 @@ ApacheFalcon.fixConfigFiles = function() .on('close', function(){ replace({ regex: "@playerversion@", - replacement: "19.0", + replacement: playerVersion, paths: [constants.FLEXJS_FOLDER + 'frameworks/flex-config.xml'], recursive: false, silent: false @@ -360,7 +364,7 @@ ApacheFalcon.fixConfigFiles = function() replace({ regex: "@swfversion@", - replacement: "30", + replacement: swfVersion, paths: [constants.FLEXJS_FOLDER + 'frameworks/flex-config.xml'], recursive: false, silent: false @@ -380,7 +384,7 @@ ApacheFalcon.fixConfigFiles = function() .on('close', function(){ replace({ regex: "@playerversion@", - replacement: "19.0", + replacement: playerVersion, paths: [constants.FLEXJS_FOLDER + 'frameworks/air-config.xml'], recursive: false, silent: false @@ -388,7 +392,7 @@ ApacheFalcon.fixConfigFiles = function() replace({ regex: "@swfversion@", - replacement: "30", + replacement: swfVersion, paths: [constants.FLEXJS_FOLDER + 'frameworks/air-config.xml'], recursive: false, silent: false http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b3f5ddc8/npm-flexjs/dependencies/ApacheFlexJS.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/ApacheFlexJS.js b/npm-flexjs/dependencies/ApacheFlexJS.js index 1606949..deee801 100644 --- a/npm-flexjs/dependencies/ApacheFlexJS.js +++ b/npm-flexjs/dependencies/ApacheFlexJS.js @@ -28,11 +28,9 @@ var constants = require('../dependencies/Constants'); var ApacheFlexJS = module.exports = Object.create(events.EventEmitter.prototype); -console.error(Object.keys(pjson)); - //FlexJS -var pathToFlexJSBinary = pjson.org_apache_flex.flexjs_path_binary; //'flex/flexjs/0.5.0/binaries/'; -var fileNameFlexJSBinary = pjson.org_apache_flex.flexjs_file_name; //'apache-flex-flexjs-0.5.0-bin.zip'; +var pathToFlexJSBinary = pjson.org_apache_flex.flexjs_path_binary; +var fileNameFlexJSBinary = pjson.org_apache_flex.flexjs_file_name; ApacheFlexJS.handleFlexJSMirrorsResponse = function (error, response, body) { http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b3f5ddc8/npm-flexjs/dependencies/FlashPlayerGlobal.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/FlashPlayerGlobal.js b/npm-flexjs/dependencies/FlashPlayerGlobal.js index 158c747..2e5e32b 100644 --- a/npm-flexjs/dependencies/FlashPlayerGlobal.js +++ b/npm-flexjs/dependencies/FlashPlayerGlobal.js @@ -22,14 +22,15 @@ var request = require('request'); var fs = require('fs'); var events = require('events'); var prompt = require('prompt'); +var pjson = require('../package'); var constants = require('../dependencies/Constants'); var duc = require('../dependencies/DownloadUncompressAndCopy'); var FlashPlayerGlobal = module.exports = Object.create(events.EventEmitter.prototype); -var flashPlayerGlobalURL = 'http://download.macromedia.com/get/flashplayer/updaters/19/'; -var fileNameFlashPlayerGlobal = 'playerglobal19_0.swc'; +var flashPlayerGlobalURL = pjson.org_apache_flex.flash_player_global_url; +var fileNameFlashPlayerGlobal = pjson.org_apache_flex.flash_player_global_file_name; var flashPlayerGlobalPromptText = "\ Apache FlexJS SDK uses the Adobe Flash Player's playerglobal.swc to build Adobe Flash applications.\n\ \n\ http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b3f5ddc8/npm-flexjs/dependencies/SWFObject.js ---------------------------------------------------------------------- diff --git a/npm-flexjs/dependencies/SWFObject.js b/npm-flexjs/dependencies/SWFObject.js index 4716d2e..7392d9c 100644 --- a/npm-flexjs/dependencies/SWFObject.js +++ b/npm-flexjs/dependencies/SWFObject.js @@ -23,14 +23,15 @@ var fs = require('fs'); var events = require('events'); var unzip = require('unzip'); var mkdirp = require('mkdirp'); +var pjson = require('../package'); var constants = require('../dependencies/Constants'); var SWFObject = module.exports = Object.create(events.EventEmitter.prototype); //SWFObject -var swfObjectURL = 'http://github.com/swfobject/swfobject/archive/'; -var fileNameSwfObject = '2.2.zip'; +var swfObjectURL = pjson.org_apache_flex.swf_object_url; +var fileNameSwfObject = pjson.org_apache_flex.swf_object_file_name; SWFObject.downloadSwfObject = function() { http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/b3f5ddc8/npm-flexjs/package.json ---------------------------------------------------------------------- diff --git a/npm-flexjs/package.json b/npm-flexjs/package.json index 492234f..241ae12 100644 --- a/npm-flexjs/package.json +++ b/npm-flexjs/package.json @@ -1,6 +1,6 @@ { "name": "flexjs", - "version": "0.5.0", + "version": "0.5.5", "description": "Apache FlexJS", "keywords": [ "flex", @@ -20,7 +20,6 @@ "merge-dirs": "^0.2.1", "mkdirp": "^0.5.1", "prompt": "^0.2.14", - "read-package-json": "^2.0.3", "replace": "^0.3.0", "request": "^2.67.0", "unzip": "^0.1.11", @@ -36,6 +35,16 @@ }, "org_apache_flex": { "flexjs_path_binary": "flex/flexjs/0.5.0/binaries/", - "flexjs_file_name": "apache-flex-flexjs-0.5.0-bin.zip" + "flexjs_file_name": "apache-flex-flexjs-0.5.0-bin.zip", + "falcon_path_binary": "flex/falcon/0.5.0/binaries/", + "falcon_file_name": "apache-flex-falconjx-0.5.0-bin.zip", + "flash_player_global_url": "http://download.macromedia.com/get/flashplayer/updaters/19/", + "flash_player_global_file_name": "playerglobal19_0.swc", + "adobe_air_url": "http://airdownload.adobe.com/air/win/download/19.0/", + "adobe_air_file_name": "AdobeAIRSDK.zip", + "player_version": "19.0", + "swf_version": "30", + "swf_object_url": "http://github.com/swfobject/swfobject/archive/", + "swf_object_file_name": "2.2.zip" } }
