flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harbs <harbs.li...@gmail.com>
Subject Re: FlexJS creating new typedefs
Date Sun, 31 Jul 2016 14:08:56 GMT
I get nothing.

Here’s what I tried. Maybe I’m using it wrong…

Harbss-MacBook-Pro:build harbs$ /Users/harbs/Documents/Apache\ Flex\ Dist/FlexJSNightly/js/bin/externc
-external /Users/harbs/Desktop/extern\ test/js/opentype.js -as-root /Users/harbs/Desktop/extern\
test/as\ out 
Using Falcon codebase: /Users/harbs/Documents/Apache Flex Dist/FlexJSNightly/js/bin/../..
Using Flex SDK: /Users/harbs/Documents/Apache Flex Dist/FlexJSNightly/js/bin/../..
Jul 31, 2016 4:48:06 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: [opentype]:5633: WARNING - unreachable code
        for (; pos < limit; pos++) {

Jul 31, 2016 4:48:06 PM com.google.javascript.jscomp.LoggerErrorManager printSummary
WARNING: 0 error(s), 1 warning(s)
1.954506 seconds

On Jul 31, 2016, at 9:20 AM, Alex Harui <aharui@adobe.com> wrote:

> On 7/30/16, 10:59 PM, "Harbs" <harbs.lists@gmail.com> wrote:
>> What’s the best way of going about creating new typedefs for a JS library
>> which doesn’t have JSDoc type definitions?
>> I’d like to create typedefs for OpenTypeJS[1] but there’s no comments to
>> help.
>> The only two ways I can think of are:
>> 1. Go into the JS code and manually add comments for everything (and then
>> do a pull request). Then use externc to produce a swc.
>> 2. Create ActionScript stubs for all the functions and use compc to
>> create a swc.
>> Is there another option (or tool to make it easier) that I’m missing?
>> Which of these two approaches makes more sense?
> What do you get when you run externc?  Can the results be post-processed?
> IMO, option #1 is the theoretical best.  If you can convince the OpenType
> folks to switch to Google's JSDoc then you get any future changes for free
> (assuming they are accurate).
> Option #2 will let you compile and debug so if you are in a hurry and
> OpenType doesn't change much, AS Stubs might be quickest, but in
> production you still need a JS file in externs format for the GCC
> optimizer.  ExternC has a -jsroot option to generate an externs format .js
> file from js source with JSDoc.  See the CreateJS build.
> Note that the Ant and Maven builds allow for patching of the downloaded
> source.  For CreateJS, we do a fair amount of find/replace to automate
> creating a better set of .js files for externc to consume.
> HTH,
> -Alex
>> [1]https://github.com/nodebox/opentype.js/

View raw message