Git Product home page Git Product logo

Comments (9)

gskinner avatar gskinner commented on July 23, 2024

We are currently using google closure for compiling / minifying the EaselJS source.

from easeljs.

kevmoo avatar kevmoo commented on July 23, 2024

Ooo...

Thoughts about using the Closure object model? -> http://code.google.com/closure/compiler/docs/js-for-compiler.html

You get a lot more love when you define types as closure requires. You can use their libraries, their vector types, etc.

Very very nice.

from easeljs.

mikechambers avatar mikechambers commented on July 23, 2024

Thanks for pointing this out. As Grant mentions, we currently use Google Closure for compiling and minification, and are converting docs over to Yui Doc format. Doing a quick scan, it looks like they are pretty compatible.

Once I finish the doc conversion, I will work on making sure that it is compatible with Google Closures annotation tags.

More infon on Yui Doc on our wiki:
https://github.com/gskinner/EaselJS/wiki/Documentation

from easeljs.

kevmoo avatar kevmoo commented on July 23, 2024

...and to double down.

As a user of Easel, one can just include the git repo as a submodule.

Then when I build my app w/ Easel, the compiler only includes the bits of Easel I use, which makes everything much smaller.

from easeljs.

kevmoo avatar kevmoo commented on July 23, 2024

To be clear: using closure's doc format is not enough.

You need to move from
(function(window){ var p = x.Foo.prototype; ... }

to

goog.provide("Foo");
Foo.prototype.method = function() {};

from easeljs.

kevmoo avatar kevmoo commented on July 23, 2024

...and I'm happy to help. :-)

from easeljs.

mikechambers avatar mikechambers commented on July 23, 2024

Wont that require that anyone that uses EaselJS use the Google library stuff?

mike

from easeljs.

kevmoo avatar kevmoo commented on July 23, 2024

Not at all, which really rocks.

There is a bit of work flagging your public surface area, but once that's done you get a completely contained library

...with whatever features of google closure JS you use (but only the features you use) baked in

If a user wants to just use your js file, great. No issues.

If a user wants to build against the Easel Sources w/ their own Closure project, then the above benefits (only include what they use, etc) come along.

from easeljs.

kevmoo avatar kevmoo commented on July 23, 2024

Imagine you want to change the type of an API to be more specific...you get build errors on your samples if they don't comply with the new requirement.

...but you don't have to build as you're hacking if you don't want...the code works just great un-compiled.

It's magic. Makes me love JS.

...and it plugs in nicely with Coffee Script (http://jashkenas.github.com/coffee-script/) too

from easeljs.

Related Issues (20)

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.