This is an automated email from the ASF dual-hosted git repository. bigosmallm pushed a commit to branch feature/npm-release-scripts in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 5024507b75f513c562650c40922805eb355058bf Author: Om Muppirala <[email protected]> AuthorDate: Mon Jan 29 02:36:53 2018 -0800 Add support for @apache-royale org; Add npm publish scripts; Fix royale-js-swf package so that it installs correctly. --- build.xml | 4 +-- npm/README.md | 40 ++++++++++++++++++++++ npm/{ => js-only}/package.json | 14 ++------ npm/{ => js-swf}/dependencies/AdobeAIR.js | 0 npm/{ => js-swf}/dependencies/Constants.js | 0 .../dependencies/DownloadUncompressAndCopy.js | 0 npm/{ => js-swf}/dependencies/FlashPlayerGlobal.js | 0 npm/{ => js-swf}/dependencies/FlatUI.js | 4 +-- .../dependencies/download_dependencies.js | 4 +-- npm/{ => js-swf}/package.json | 19 +++++++--- 10 files changed, 64 insertions(+), 21 deletions(-) diff --git a/build.xml b/build.xml index 32b2811..3434bc8 100644 --- a/build.xml +++ b/build.xml @@ -794,7 +794,7 @@ limitations under the License. </target> <target name="stage-top-level" > - <copy file="${basedir}/package.json" todir="${basedir}/temp" /> + <copy file="${basedir}/npm/js-swf/package.json" todir="${basedir}/temp" /> <copy todir="${basedir}/temp" includeEmptyDirs="false"> <fileset dir="${basedir}/releasemgr" includes="**" /> </copy> @@ -996,7 +996,7 @@ limitations under the License. </replace> <!-- replace npm descriptor with js-only descriptor --> <antcall target="create-jsonly-description" /> - <copy file="${basedir}/npm/package.json" todir="${basedir}/temp" overwrite="true"/> + <copy file="${basedir}/npm/js-only/package.json" todir="${basedir}/temp" overwrite="true"/> <zip destfile="${basedir}/out/${binary-js.kit}.zip" basedir="${basedir}/temp"/> <tar-gzip name="${binary-js.kit}" /> </target> diff --git a/npm/README.md b/npm/README.md new file mode 100644 index 0000000..d9fb39d --- /dev/null +++ b/npm/README.md @@ -0,0 +1,40 @@ +The **Apache Royale** NPM packages are distributed under the Apache-Royale NPM organization: https://www.npmjs.com/org/apache-royale + +**There are two packages available:** + +1. `@apache-royale/royale-js` [https://www.npmjs.com/package/@apache-royale/royale-js] +2. `@apache-royale/royale-js-swf` [https://www.npmjs.com/package/@apache-royale/royale-js-swf] + +The package: `@apache-royale/royale-js` supports only the JS/HTML output. +The package: `@apache-royale/royale-js-swf` supports both JS/HTML and SWF/AIR output. + +**For End Users** + +To install these packages, users need to run the following commands: + +``` +npm install @apache-royale/royale-js +npm install @apache-royale/royale-js-swf +``` + +**For Release Managers:** + +To setup the publish scripts, first run: + +``` +cd release-scripts +npm install +``` + +To publish the packages to NPM, run: + +``` +node publish.js --type=js-only --pathToTarball=path-to-tgz-file --username=npm-username --password=npm-password +node publish.js --type=js-swf --pathToTarball=path-to-tgz-file --username=npm-username --password=npm-password +``` + +For example: +``` +node publish.js --type=js-only --pathToTarball="C:\p\os\flexroot\royale\royale-asjs\out\binaries\apache-royale-0.9.0-bin-js.tar.gz" --username=apache-royale-owner --password=shared_in_private +node publish.js --type=js-swf --pathToTarball="C:\p\os\flexroot\royale\royale-asjs\out\binaries\apache-royale-0.9.0-bin-js-swf.tar.gz" --username=apache-royale-owner --password=shared_in_private +``` \ No newline at end of file diff --git a/npm/package.json b/npm/js-only/package.json similarity index 73% copy from npm/package.json copy to npm/js-only/package.json index 1cd5ab6..00741be 100644 --- a/npm/package.json +++ b/npm/js-only/package.json @@ -1,6 +1,6 @@ { - "name": "apache-royale", - "version": "0.9.1", + "name": "@apache-royale/royale-js", + "version": "0.9.0", "description": "Apache Royale (formerly FlexJS)", "keywords": [ "royale", @@ -18,15 +18,7 @@ "author": "Apache Royale <[email protected]>", "license": "Apache-2.0", "dependencies": { - "eol": "^0.2.0", - "fs-extra": "^0.26.3", - "merge-dirs": "^0.2.1", - "mkdirp": "^0.5.1", - "prompt": "^0.2.14", - "replace": "^0.3.0", - "request": "^2.67.0", - "unzip": "^0.1.11", - "wrench": "^1.5.8" + }, "scripts": { }, diff --git a/npm/dependencies/AdobeAIR.js b/npm/js-swf/dependencies/AdobeAIR.js similarity index 100% rename from npm/dependencies/AdobeAIR.js rename to npm/js-swf/dependencies/AdobeAIR.js diff --git a/npm/dependencies/Constants.js b/npm/js-swf/dependencies/Constants.js similarity index 100% rename from npm/dependencies/Constants.js rename to npm/js-swf/dependencies/Constants.js diff --git a/npm/dependencies/DownloadUncompressAndCopy.js b/npm/js-swf/dependencies/DownloadUncompressAndCopy.js similarity index 100% rename from npm/dependencies/DownloadUncompressAndCopy.js rename to npm/js-swf/dependencies/DownloadUncompressAndCopy.js diff --git a/npm/dependencies/FlashPlayerGlobal.js b/npm/js-swf/dependencies/FlashPlayerGlobal.js similarity index 100% rename from npm/dependencies/FlashPlayerGlobal.js rename to npm/js-swf/dependencies/FlashPlayerGlobal.js diff --git a/npm/dependencies/FlatUI.js b/npm/js-swf/dependencies/FlatUI.js similarity index 97% rename from npm/dependencies/FlatUI.js rename to npm/js-swf/dependencies/FlatUI.js index 8861c2b..ea4a88c 100644 --- a/npm/dependencies/FlatUI.js +++ b/npm/js-swf/dependencies/FlatUI.js @@ -31,8 +31,8 @@ var constants = require('../dependencies/Constants'); var FlatUI = module.exports = Object.create(events.EventEmitter.prototype); //FlatUI -var flatUIURL = pjson.org_apache_flex.flatui_url; -var fileNameFlatUI = pjson.org_apache_flex.flatui_file_name; +var flatUIURL = pjson.org_apache_royale.flatui_url; +var fileNameFlatUI = pjson.org_apache_royale.flatui_file_name; var promptText = "Apache FlexJS includes an optional component set\n\ that uses fonts from designmodo.com. The font\n\ diff --git a/npm/dependencies/download_dependencies.js b/npm/js-swf/dependencies/download_dependencies.js similarity index 96% rename from npm/dependencies/download_dependencies.js rename to npm/js-swf/dependencies/download_dependencies.js index 711505d..6145a8f 100644 --- a/npm/dependencies/download_dependencies.js +++ b/npm/js-swf/dependencies/download_dependencies.js @@ -47,7 +47,7 @@ function updateScriptEOL() { try { - var dirPath = path.join(__dirname, '..', 'js', 'bin'); + var dirPath = path.join(__dirname, '..', '..', 'js', 'bin'); var files = fs.readdirSync(dirPath); do { @@ -81,7 +81,7 @@ function updateScriptPermissions() var mode = parseInt('755', 8); try { - var dirPath = path.join(__dirname, '..', 'js', 'bin'); + var dirPath = path.join(__dirname, '..', '..', 'js', 'bin'); var files = fs.readdirSync(dirPath); do { diff --git a/npm/package.json b/npm/js-swf/package.json similarity index 56% rename from npm/package.json rename to npm/js-swf/package.json index 1cd5ab6..7dc4fe8 100644 --- a/npm/package.json +++ b/npm/js-swf/package.json @@ -1,10 +1,10 @@ { - "name": "apache-royale", - "version": "0.9.1", + "name": "@apache-royale/royale-js-swf", + "version": "0.9.0", "description": "Apache Royale (formerly FlexJS)", "keywords": [ - "royale", - "apache royale", + "royale", + "apache royale", "flex", "flexjs", "apache flexjs", @@ -29,6 +29,7 @@ "wrench": "^1.5.8" }, "scripts": { + "postinstall": "node royale-asjs/npm/dependencies/download_dependencies.js" }, "bin": { "asjsc": "./royale-asjs/js/bin/asjscnpm", @@ -39,5 +40,15 @@ "externc": "./royale-asjs/js/bin/externcnpm" }, "org_apache_royale": { + "flash_player_global_url": "http://download.macromedia.com/get/flashplayer/updaters/25/", + "flash_player_global_file_name": "playerglobal25_0.swc", + "adobe_air_url": "http://airdownload.adobe.com/air/win/download/25.0/", + "adobe_air_file_name": "AdobeAIRSDK.zip", + "player_version": "25.0", + "swf_version": "36", + "swf_object_url": "http://github.com/swfobject/swfobject/archive/", + "swf_object_file_name": "2.2.zip", + "flatui_url": "https://github.com/designmodo/Flat-UI/archive/", + "flatui_file_name": "2.2.2.zip" } } -- To stop receiving notification emails like this one, please contact [email protected].
