GithubHelp home page GithubHelp logo

jamesmgreene / node-flex-sdk Goto Github PK

View Code? Open in Web Editor NEW
31.0 6.0 11.0 602 KB

A Node.js module to download and "install" the latest open source Apache/Adobe Flex SDK.

License: MIT License

JavaScript 98.70% ActionScript 1.30%

node-flex-sdk's Introduction

Build Status

flex-sdk

An NPM wrapper for the Apache Flex SDK / Adobe Flex SDK.

Building and Installing

npm install flex-sdk

Or grab the source and

npm install .

What this is really doing is just grabbing a particular "blessed" (by this module) version of the Flex SDK. As new versions of the Apache/Adobe Flex SDK are released and vetted, this module will be updated accordingly.

The package has been set up to fetch the Flex SDK and run mxmlc for MacOS (darwin), Linux based platforms (as identified by Node.js), and Windows. If you spot any platform weirdnesses, let me know or send a patch.

External Dependencies

If you intend to use this module after it is installed, almost all of the Flex SDK binary/executable files have an implicit dependency on Java being installed on the system and that it is available in the PATH such that it can be invoked just by typing the command java.

Running

bin/mxmlc [mxmlc arguments]

Check out the full list of mxmlc command line options for more information.

And npm will install a link to the binary in node_modules/.bin as it is wont to do.

Running via node

The package exports an object contains:

  • a binDir string which is the path to the "bin" directory of the Flex SDK
  • a bin object which contains an entry for each executable included in the "bin" directory of the Flex SDK (e.g. flexSdk.bin.mxmlc will provide the path to the mxmlc executable).
  • a refresh function if you ever need to refresh the bin object (e.g. if you have an existing flex-sdk module reference object but then downloaded a new Flex SDK).

Below is an example of using this package via node.

var childProcess = require('child_process');
var flexSdk = require('flex-sdk');
var binPath = flexSdk.bin.mxmlc;

var childArgs = [
  'arguments to pass to mxmlc',
  path.join(__dirname, 'fileToCompile.as')
];

childProcess.execFile(binPath, childArgs, function(err, stdout, stderr) {
  // handle results
});

Versioning

The NPM package version tracks the version of the Flex SDK that will be installed, with an additional build number that is used for revisions to the installer when necessary.

As such, 4.6.0-0, 4.6.0-1, and 4.6.0-2 will all install Flex SDK v4.6.0 but each has newer changes to the installer than the previous.

For the full list of available versions, see FlexSDKs.md.

Purpose

This is an NPM wrapper and can be used to make the various binary executables from the Apache/Adobe Flex SDKs (e.g. mxmlc) conveniently available. It is not a Node.js wrapper.

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

Release History

  • Adobe Flex SDK v4.6.0 → npm install flex-sdk@~4.6.0
  • Adobe Flex SDK v4.5.1 → npm install flex-sdk@~4.5.1
  • Adobe Flex SDK v4.5.0 → npm install flex-sdk@~4.5.0
  • Adobe Flex SDK v4.1.0 → npm install flex-sdk@~4.1.0
  • Adobe Flex SDK v4.0.0 → npm install flex-sdk@~4.0.0
  • Adobe Flex SDK v3.6.0 → npm install flex-sdk@~3.6.0
  • Adobe Flex SDK v3.5.0 → npm install flex-sdk@~3.5.0
  • Adobe Flex SDK v3.4.1 → npm install flex-sdk@~3.4.1
  • Adobe Flex SDK v3.4.0 → npm install flex-sdk@~3.4.0
  • Adobe Flex SDK v3.3.0 → npm install flex-sdk@~3.3.0
  • Adobe Flex SDK v3.2.0 → npm install flex-sdk@~3.2.0
  • Adobe Flex SDK v3.1.0 → npm install flex-sdk@~3.1.0
  • Adobe Flex SDK v3.0.1 → npm install flex-sdk@~3.0.1
  • Adobe Flex SDK v3.0.0 → npm install flex-sdk@~3.0.0

License

Copyright (c) 2014 James M. Greene
Licensed under the MIT license.

node-flex-sdk's People

Contributors

jamesmgreene avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

node-flex-sdk's Issues

Apache Flex SDK 4.14.1 supported?

Is there any way to get this work with a current Apache Flex SDK 4.14.1?
I need to have a current flex sdk because of major changes to the as3corelib.

Is this project still alive (last commit 16 month ago) or is there a better alternative to build as3 with node?

Cannot install on Ubuntu 16.04, Node v6.3.0

I am not able to install the package on Ubuntu 16.04, Node v.6.3.0 and npm v3.10.3. I've tried to install flex-sdk both globally and locally, i've check file permissions and ran the npm install -g flex-sdk command both with and without sudo. This /.staging/ directory seems to come out of nowhere. Any idea how to debug this?

18562 verbose stack Error: ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-d8ef66f2' -> '/usr/local/lib/node_modules/flex-sdk/node_modules/abbrev'
18562 verbose stack     at destStatted (/usr/local/lib/node_modules/npm/lib/install/action/finalize.js:25:7)
18562 verbose stack     at FSReqWrap.oncomplete (fs.js:123:15)
18562 verbose stack
18562 verbose stack Error: ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-d8ef66f2' -> '/usr/local/lib/node_modules/flex-sdk/node_modules/abbrev'
18562 verbose stack     at Error (native)
18563 verbose cwd /usr/local/lib/node_modules
18564 error Linux 4.4.0-28-generic
18565 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "flex-sdk"
18566 error node v6.3.0
18567 error npm  v3.10.3
18568 error path /usr/local/lib/node_modules/.staging/abbrev-d8ef66f2
18569 error code ENOENT
18570 error errno -2
18571 error syscall rename
18572 error enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-d8ef66f2' -> '/usr/local/lib/node_modules/flex-sdk/node_modules/abbrev'
18573 error enoent ENOENT: no such file or directory, rename '/usr/local/lib/node_modules/.staging/abbrev-d8ef66f2' -> '/usr/local/lib/node_modules/flex-sdk/node_modules/abbrev'
18573 error enoent This is most likely not a problem with npm itself
18573 error enoent and is related to npm not being able to find a file.
18574 verbose exit [ -2, true ]

Send a buffer to mxmlc

Hello guys.

This module so good, you guys made an awesome job.

Currently the mxmlc it only read path to .as source files.
I'm looking for a way to it read buffer.

The idea is make it more friendly to gulpjs
I already made the gulp-flash buy only for paths.

Also i have made an as3 pre-compiler called jinx.
Without buffer i have to using some kinda temporary folder trick, and this probably eventually will have problems with path in functions like (include, URLLoader, etc).

Getting shasum error when installing 4.6.0-0 via npm.

npm http GET https://registry.npmjs.org/flex-sdk
npm http 304 https://registry.npmjs.org/flex-sdk
npm http GET https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.6.0-0.tgz
npm http 200 https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.6.0-0.tgz
npm ERR! Error: shasum check failed for /var/folders/w6/s4s8gc6s4mb0wv2416922pt1hv4l51/T/npm-22339-bJmoEtJY/1397241763422-0.24659038637764752/tmp.tgz
npm ERR! Expected: 6536c3fd366a520267b36fae21f50ee3631c82dc
npm ERR! Actual:   8c3048dc5a00e608cbb693dbc91d08db1403deab
npm ERR! From:     https://registry.npmjs.org/flex-sdk/-/flex-sdk-4.6.0-0.tgz
npm ERR!     at /Users/gkatsevman/.nvm/v0.10.4/lib/node_modules/npm/node_modules/sha/index.js:38:8
npm ERR!     at ReadStream.<anonymous> (/Users/gkatsevman/.nvm/v0.10.4/lib/node_modules/npm/node_modules/sha/index.js:85:7)
npm ERR!     at ReadStream.EventEmitter.emit (events.js:117:20)
npm ERR!     at _stream_readable.js:883:14
npm ERR!     at process._tickCallback (node.js:415:13)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Darwin 13.1.0
npm ERR! command "node" "/Users/gkatsevman/.nvm/v0.10.4/bin/npm" "install" "flex-sdk"
npm ERR! cwd /Users/gkatsevman/p/video-js-swf
npm ERR! node -v v0.10.4
npm ERR! npm -v 1.4.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /Users/gkatsevman/p/video-js-swf/npm-debug.log
npm ERR! not ok code 0

Find a download source for Apache Flex SDK 4.8.0

It seems like Apache removed the download folders for the Flex SDK 4.8.0. Try to find an alternative download source.

If it's not available anymore, it's likely for legitimate reasons. No worries, just don't offer it....

Add `npm install` hook to `chmod +x` the bin files

Update all published versions to add an npm install hook to chmod +x the bin files.

This will likely bring the ire of NPM zealots as they highly discourage npm install scripts now but, honestly, having to always switch over to Linux to publish this module is a PITA (and would probably just result in the Windows executables becoming non-executable anyway). 😉

Resolve build/configuration issues for Apache Flex 4.8.0+

When the Flex SDK moved under the Apache Foundation's flag, Apache had to make a number of changes in order to separate the Flex SDK core from the Adobe proprietary bits, e.g. removing the AIR SDK but included an Ant script to easily download it from Adobe.

Because of these differences, though, this repo's current prepublish.js does not work once we rev to using the Apache Flex SDKs (4.8.0+).

Look into what is necessary to automate this completely... but it may end up faster to just leave it as a Node.js spawn that requires external dependencies like Ant are installed.

Examples

How do I use install the FLEX_SDK version 4.5.0 with this tool?

Reorganize this module (and create additional) to workaround SemVer deficiencies

I propose that this module MUST be re-written as a new module (let's refer to it as "flexsdk" for now) in order to support SemVer while also maintaining non-prelease, FlexSDK-specific versioning.

For more background on the issue and how I arrived at the following approach, see semver/semver#242

Top Level Module Versions

  • flexsdk@3.0.0
    • flex-sdk-3.0.0@*
  • flexsdk@3.0.1
    • flex-sdk-3.0.1@*
  • flexsdk@3.1.0
    • flex-sdk-3.1.0@*
  • flexsdk@3.2.0
    • flex-sdk-3.2.0@*
  • flexsdk@3.3.0
    • flex-sdk-3.3.0@*
  • flexsdk@3.4.0
    • flex-sdk-3.4.0@*
  • flexsdk@3.4.1
    • flex-sdk-3.4.1@*
  • flexsdk@3.5.0
    • flex-sdk-3.5.0@*
  • flexsdk@3.6.0
    • flex-sdk-3.6.0@*
  • flexsdk@4.0.0
    • flex-sdk-4.0.0@*
  • flexsdk@4.1.0
    • flex-sdk-4.1.0@*
  • flexsdk@4.5.0
    • flex-sdk-4.5.0@*
  • flexsdk@4.5.1
    • flex-sdk-4.5.1@*
  • flexsdk@4.6.0
    • flex-sdk-4.6.0@*

Lower Level Dependency Module Versions

  • flex-sdk-3.0.0@1.3.4
  • flex-sdk-3.0.1@1.2.3
  • flex-sdk-3.1.0@1.0.2
  • flex-sdk-3.2.0@1.1.1
  • flex-sdk-3.3.0@1.4.2
  • flex-sdk-3.4.0@1.0.0
  • flex-sdk-3.4.1@1.0.8
  • flex-sdk-3.5.0@1.0.7
  • flex-sdk-3.6.0@1.2.6
  • flex-sdk-4.0.0@1.3.2
  • flex-sdk-4.1.0@1.2.0
  • flex-sdk-4.5.0@1.1.8
  • flex-sdk-4.5.1@1.3.7
  • flex-sdk-4.6.0@1.5.6

Example Usage

# Explicit versions
npm install [email protected] --> npm install flex-sdk-3.0.1@*
npm install [email protected] --> npm install flex-sdk-3.0.0@*

# Implicit versions
npm install [email protected] --> npm install flex-sdk-3.0.1@*
npm install [email protected]   --> npm install flex-sdk-3.0.1@*
npm install [email protected]   --> npm install flex-sdk-3.6.0@*
npm install flexsdk@3     --> npm install flex-sdk-3.6.0@*
npm install flexsdk       --> npm install flex-sdk-4.6.0@*

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.