I'd like to be able to execute custom_rhino.jar with the -c (compress)
command, but instead of passing in a single JavaScript file, I would pass in
the path to a folder. custom_rhino would then scan through that folder, and
subdirectories, and compress all files ending in ".js".

I could probably hack this together myself, but I think it would be a useful
addition for the entire community, especially when added to people's Ant
build tasks to automate the compression of entire folders of production
code.

Who here is the responsible for the Dojo modifications to Rhino? If you
don't have the time to implement it yourself, I can do it if you give me the
code and a pointer or two. It should be pretty trivial really.

Thanks

Shane
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://dojotoolkit.org/pipermail/dojo-contributors/attachments/20070321/c4ba6ca8/attachment.html

Search Discussions

  • Adam L. Peller at Mar 21, 2007 at 3:45 pm
    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c (compress)
    command, but instead of passing in a single JavaScript file, I would pass in
    the path to a folder. custom_rhino would then scan through that folder, and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be a useful
    addition for the entire community, especially when added to people's Ant
    build tasks to automate the compression of entire folders of production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If you
    don't have the time to implement it yourself, I can do it if you give me the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
  • James Burke at Mar 21, 2007 at 3:56 pm
    Also note that I've heard of some complaints that the compressing
    doesn't work right if you try compressing more than one file at a
    time, something about maybe some internal state in the custom rhino
    not being reset. I haven't actually tried it, but you might watch out
    for it.

    Also, you can look in buildscripts/buildUtil.js, inside
    buildUtil.optimizeJs(). It calls the compression routines in
    JavaScript. I was thinking of expanding this to allow doing multiple
    files at a time (using something like buildUtil.getFilteredFileList()
    to get the list of files). However, I haven't tried this yet, and was
    concerned about the previous reports of internal state reset issues.

    James
    On 3/21/07, Adam L. Peller wrote:
    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c (compress)
    command, but instead of passing in a single JavaScript file, I would pass in
    the path to a folder. custom_rhino would then scan through that folder, and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be a useful
    addition for the entire community, especially when added to people's Ant
    build tasks to automate the compression of entire folders of production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If you
    don't have the time to implement it yourself, I can do it if you give me the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
  • Jesse Kuhnert at Mar 21, 2007 at 4:02 pm
    I'm all for having the changes made directly to rhino. If it currently
    handles a single file input (with no control over the output ) it
    should be equally capable of handling detecting a dir vs file via new
    File("input").isDirectory() . .(or stdin )

    If you do make changes be sure to update the diff file of course.
    (though I don't think I speak with any authority as this is typically
    Alex stuff isn't it? )

    I can probably make the changes real quick if you don't want to / or
    are leary of all the pita diff'ing / etc.. Let me know. (I'm also a
    little paranoid of touching trunk right now as I've not kept track of
    things enough to know where things go )
    On 3/21/07, James Burke wrote:
    Also note that I've heard of some complaints that the compressing
    doesn't work right if you try compressing more than one file at a
    time, something about maybe some internal state in the custom rhino
    not being reset. I haven't actually tried it, but you might watch out
    for it.

    Also, you can look in buildscripts/buildUtil.js, inside
    buildUtil.optimizeJs(). It calls the compression routines in
    JavaScript. I was thinking of expanding this to allow doing multiple
    files at a time (using something like buildUtil.getFilteredFileList()
    to get the list of files). However, I haven't tried this yet, and was
    concerned about the previous reports of internal state reset issues.

    James
    On 3/21/07, Adam L. Peller wrote:
    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c (compress)
    command, but instead of passing in a single JavaScript file, I would pass in
    the path to a folder. custom_rhino would then scan through that folder, and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be a useful
    addition for the entire community, especially when added to people's Ant
    build tasks to automate the compression of entire folders of production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If you
    don't have the time to implement it yourself, I can do it if you give me the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Jesse Kuhnert
    Tapestry/Dojo team member/developer

    Open source based consulting work centered around
    dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
  • Shane O'Sullivan at Mar 22, 2007 at 6:01 am
    Yes, this is what Ant is for, but I'm having problems with it. I have to
    admit that my knowledge of Ant is a bit sketchy at best, but I can't seem to
    figure out how to apply a Java command to a set of files identified by a
    <fileset> or <patternset> tag. Performing a javac or regex command on them
    is simple, but it doesn't seem to be possible for a <java> command - correct
    me if I'm wrong here.

    Also, each time a <java> command is executed by Ant, with fork="true", as
    far as i know another JVM is started up. This is a pretty heavy cost if
    you're going to be applying this command to hundreds of files. It would be
    much quicker to launch the JVM once and have it iterate over the directory
    of files.

    What James said about the issue with the compressor where it only works
    once, and he is correct. I've tried integrating it into my DojoBuilder
    application, and I haven't been successful. The second time I try to
    compress a file it throws a load of exceptions. Because of this I have to
    access it through an Ant task with fork="true" to run it in a separate JVM.

    So, what do people think? Is anyone willing/able to take this on? At the
    very least it would be a good idea to clean up the compressor so that others
    can wrap it in other code and execute it multiple times, rather than forcing
    you to compress just one file and shut down the JVM.

    Thanks,

    Shane
    On 21/03/07, Adam L. Peller wrote:

    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c (compress)
    command, but instead of passing in a single JavaScript file, I would pass in
    the path to a folder. custom_rhino would then scan through that folder, and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be a useful
    addition for the entire community, especially when added to people's Ant
    build tasks to automate the compression of entire folders of production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If you
    don't have the time to implement it yourself, I can do it if you give me the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://dojotoolkit.org/pipermail/dojo-contributors/attachments/20070322/b8ab1ba2/attachment.html
  • Jesse Kuhnert at Mar 22, 2007 at 6:22 am
    Yeah, unless Alex (or someone else) weighs in with reasons to not do
    it I can do it this weekend. (i hope that's soon enough)
    On 3/22/07, Shane O'Sullivan wrote:
    Yes, this is what Ant is for, but I'm having problems with it. I have to
    admit that my knowledge of Ant is a bit sketchy at best, but I can't seem to
    figure out how to apply a Java command to a set of files identified by a
    <fileset> or <patternset> tag. Performing a javac or regex command on them
    is simple, but it doesn't seem to be possible for a <java> command - correct
    me if I'm wrong here.

    Also, each time a <java> command is executed by Ant, with fork="true", as
    far as i know another JVM is started up. This is a pretty heavy cost if
    you're going to be applying this command to hundreds of files. It would be
    much quicker to launch the JVM once and have it iterate over the directory
    of files.

    What James said about the issue with the compressor where it only works
    once, and he is correct. I've tried integrating it into my DojoBuilder
    application, and I haven't been successful. The second time I try to
    compress a file it throws a load of exceptions. Because of this I have to
    access it through an Ant task with fork="true" to run it in a separate JVM.

    So, what do people think? Is anyone willing/able to take this on? At the
    very least it would be a good idea to clean up the compressor so that others
    can wrap it in other code and execute it multiple times, rather than forcing
    you to compress just one file and shut down the JVM.

    Thanks,

    Shane

    On 21/03/07, Adam L. Peller wrote:
    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c (compress)
    command, but instead of passing in a single JavaScript file, I would
    pass in
    the path to a folder. custom_rhino would then scan through that folder,
    and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be a
    useful
    addition for the entire community, especially when added to people's Ant
    build tasks to automate the compression of entire folders of production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If you
    don't have the time to implement it yourself, I can do it if you give me
    the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Jesse Kuhnert
    Tapestry/Dojo team member/developer

    Open source based consulting work centered around
    dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
  • Shane O'Sullivan at Mar 22, 2007 at 6:26 am
    Jesse, that's great! Thanks a lot - I think a lot of people will find this
    useful. I'll update DojoBuilder with it as soon as you're done, and it
    should vastly speed up the compression of the entire tree of JS files (It
    can already do that but very slowly). We'll also be integrating it into the
    Ant build process of our products at my company, as I believe a lot of other
    people probably will.

    thanks

    Shane
    On 22/03/07, Jesse Kuhnert wrote:

    Yeah, unless Alex (or someone else) weighs in with reasons to not do
    it I can do it this weekend. (i hope that's soon enough)
    On 3/22/07, Shane O'Sullivan wrote:
    Yes, this is what Ant is for, but I'm having problems with it. I have to
    admit that my knowledge of Ant is a bit sketchy at best, but I can't seem to
    figure out how to apply a Java command to a set of files identified by a
    <fileset> or <patternset> tag. Performing a javac or regex command on them
    is simple, but it doesn't seem to be possible for a <java> command - correct
    me if I'm wrong here.

    Also, each time a <java> command is executed by Ant, with fork="true", as
    far as i know another JVM is started up. This is a pretty heavy cost if
    you're going to be applying this command to hundreds of files. It would be
    much quicker to launch the JVM once and have it iterate over the directory
    of files.

    What James said about the issue with the compressor where it only works
    once, and he is correct. I've tried integrating it into my DojoBuilder
    application, and I haven't been successful. The second time I try to
    compress a file it throws a load of exceptions. Because of this I have to
    access it through an Ant task with fork="true" to run it in a separate JVM.
    So, what do people think? Is anyone willing/able to take this on? At the
    very least it would be a good idea to clean up the compressor so that others
    can wrap it in other code and execute it multiple times, rather than forcing
    you to compress just one file and shut down the JVM.

    Thanks,

    Shane

    On 21/03/07, Adam L. Peller wrote:
    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c
    (compress)
    command, but instead of passing in a single JavaScript file, I would
    pass in
    the path to a folder. custom_rhino would then scan through that
    folder,
    and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be
    a
    useful
    addition for the entire community, especially when added to people's
    Ant
    build tasks to automate the compression of entire folders of
    production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If
    you
    don't have the time to implement it yourself, I can do it if you
    give me
    the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Jesse Kuhnert
    Tapestry/Dojo team member/developer

    Open source based consulting work centered around
    dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://dojotoolkit.org/pipermail/dojo-contributors/attachments/20070322/ba910bc2/attachment-0001.html
  • Jesse Kuhnert at Mar 25, 2007 at 4:13 pm
    I'm a little behind still on getting ready for a conference on wed, so
    I may have to hold off on doing this myself until next weekend. (or
    you can do it yourself of course) Sorry.
    On 3/22/07, Shane O'Sullivan wrote:
    Jesse, that's great! Thanks a lot - I think a lot of people will find this
    useful. I'll update DojoBuilder with it as soon as you're done, and it
    should vastly speed up the compression of the entire tree of JS files (It
    can already do that but very slowly). We'll also be integrating it into the
    Ant build process of our products at my company, as I believe a lot of other
    people probably will.

    thanks

    Shane

    On 22/03/07, Jesse Kuhnert wrote:
    Yeah, unless Alex (or someone else) weighs in with reasons to not do
    it I can do it this weekend. (i hope that's soon enough)
    On 3/22/07, Shane O'Sullivan wrote:
    Yes, this is what Ant is for, but I'm having problems with it. I have
    to
    admit that my knowledge of Ant is a bit sketchy at best, but I can't
    seem to
    figure out how to apply a Java command to a set of files identified by a
    <fileset> or <patternset> tag. Performing a javac or regex command on
    them
    is simple, but it doesn't seem to be possible for a <java> command -
    correct
    me if I'm wrong here.

    Also, each time a <java> command is executed by Ant, with fork="true",
    as
    far as i know another JVM is started up. This is a pretty heavy cost if
    you're going to be applying this command to hundreds of files. It would
    be
    much quicker to launch the JVM once and have it iterate over the
    directory
    of files.

    What James said about the issue with the compressor where it only works
    once, and he is correct. I've tried integrating it into my DojoBuilder
    application, and I haven't been successful. The second time I try to
    compress a file it throws a load of exceptions. Because of this I have
    to
    access it through an Ant task with fork="true" to run it in a separate
    JVM.
    So, what do people think? Is anyone willing/able to take this on? At
    the
    very least it would be a good idea to clean up the compressor so that
    others
    can wrap it in other code and execute it multiple times, rather than
    forcing
    you to compress just one file and shut down the JVM.

    Thanks,

    Shane

    On 21/03/07, Adam L. Peller wrote:
    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c
    (compress)
    command, but instead of passing in a single JavaScript file, I would
    pass in
    the path to a folder. custom_rhino would then scan through that
    folder,
    and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be
    a
    useful
    addition for the entire community, especially when added to people's
    Ant
    build tasks to automate the compression of entire folders of
    production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If
    you
    don't have the time to implement it yourself, I can do it if you
    give me
    the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Jesse Kuhnert
    Tapestry/Dojo team member/developer

    Open source based consulting work centered around
    dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Jesse Kuhnert
    Tapestry/Dojo team member/developer

    Open source based consulting work centered around
    dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
  • James Burke at Apr 2, 2007 at 5:26 pm
    I just did a modification to the custom_rhino.jar (and updated the
    diff file) to allow compressing more than one file within a process. I
    basically cleared the internal state of the compression so that it
    would not freak out on multiple calls.

    I did not change the jar file to accept a directory (I do not
    understand Rhino well enough), but I did modify the ant build file so
    that you can specify compressing all the files in the dojo src/
    directory. Pass a -Dstrip_and_compress=true when using the
    strip-resource-comments target and instead of comment stripping it
    will also compress the files.

    I updated the info on strip-resource-comments to describe this new option:
    http://dojotoolkit.org/node/19

    This change is in the 0.4 branch, the trunk and the 0.9 trunk. You can
    find the changesets by looking at the comments in this bug:
    http://trac.dojotoolkit.org/ticket/2047

    More info on the change to custom_rhino.jar: I modified
    Context.compressScript() to reset the static members in TokenMapper,
    and added a way to new up a new TokenMapper for Decompiler.tm. Not the
    prettiest thing, but seems to work.

    James
    On 3/25/07, Jesse Kuhnert wrote:
    I'm a little behind still on getting ready for a conference on wed, so
    I may have to hold off on doing this myself until next weekend. (or
    you can do it yourself of course) Sorry.
    On 3/22/07, Shane O'Sullivan wrote:
    Jesse, that's great! Thanks a lot - I think a lot of people will find this
    useful. I'll update DojoBuilder with it as soon as you're done, and it
    should vastly speed up the compression of the entire tree of JS files (It
    can already do that but very slowly). We'll also be integrating it into the
    Ant build process of our products at my company, as I believe a lot of other
    people probably will.

    thanks

    Shane

    On 22/03/07, Jesse Kuhnert wrote:
    Yeah, unless Alex (or someone else) weighs in with reasons to not do
    it I can do it this weekend. (i hope that's soon enough)
    On 3/22/07, Shane O'Sullivan wrote:
    Yes, this is what Ant is for, but I'm having problems with it. I have
    to
    admit that my knowledge of Ant is a bit sketchy at best, but I can't
    seem to
    figure out how to apply a Java command to a set of files identified by a
    <fileset> or <patternset> tag. Performing a javac or regex command on
    them
    is simple, but it doesn't seem to be possible for a <java> command -
    correct
    me if I'm wrong here.

    Also, each time a <java> command is executed by Ant, with fork="true",
    as
    far as i know another JVM is started up. This is a pretty heavy cost if
    you're going to be applying this command to hundreds of files. It would
    be
    much quicker to launch the JVM once and have it iterate over the
    directory
    of files.

    What James said about the issue with the compressor where it only works
    once, and he is correct. I've tried integrating it into my DojoBuilder
    application, and I haven't been successful. The second time I try to
    compress a file it throws a load of exceptions. Because of this I have
    to
    access it through an Ant task with fork="true" to run it in a separate
    JVM.
    So, what do people think? Is anyone willing/able to take this on? At
    the
    very least it would be a good idea to clean up the compressor so that
    others
    can wrap it in other code and execute it multiple times, rather than
    forcing
    you to compress just one file and shut down the JVM.

    Thanks,

    Shane

    On 21/03/07, Adam L. Peller wrote:
    Shane, isn't this the kind of thing ant is for? Wouldn't it make more
    sense to write an ant task to filter the *.js files and run through
    custom_rhino?

    A mod I was thinking of was to allow custom_rhino to run from stdin,
    which would allow processing through pipes. Hopefully, that would
    enable the developer to write ant or shell scripts to do just about
    anything.

    The custom_rhino code is available in the repo, I believe as a diff
    file. Look under buildscripts/lib

    -Adam
    On 3/21/07, Shane O'Sullivan wrote:
    I'd like to be able to execute custom_rhino.jar with the -c
    (compress)
    command, but instead of passing in a single JavaScript file, I would
    pass in
    the path to a folder. custom_rhino would then scan through that
    folder,
    and
    subdirectories, and compress all files ending in ".js".

    I could probably hack this together myself, but I think it would be
    a
    useful
    addition for the entire community, especially when added to people's
    Ant
    build tasks to automate the compression of entire folders of
    production
    code.

    Who here is the responsible for the Dojo modifications to Rhino? If
    you
    don't have the time to implement it yourself, I can do it if you
    give me
    the
    code and a pointer or two. It should be pretty trivial really.

    Thanks

    Shane

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Jesse Kuhnert
    Tapestry/Dojo team member/developer

    Open source based consulting work centered around
    dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

    --
    Jesse Kuhnert
    Tapestry/Dojo team member/developer

    Open source based consulting work centered around
    dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
    _______________________________________________
    dojo-contributors mailing list
    dojo-contributors@dojotoolkit.org
    http://dojotoolkit.org/mailman/listinfo/dojo-contributors

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdojo-contributors @
categoriesdojo
postedMar 21, '07 at 8:49a
activeApr 2, '07 at 5:26p
posts9
users4
websitedojotoolkit.org

People

Translate

site design / logo © 2022 Grokbase