From: Dan S. <dy...@fu...> - 2000-12-03 22:27:10
|
This weekend I took on the task of creating a "build" system for DynAPI. First part involved writing my own JavaScript whitespace/comment removal script (in Perl). It's pretty much complete and as good or better than any others I've seen. I'm calling it JSPack and will release this as a separate program that must be downloaded in order to "build" the DynAPI. It not only compresses JS code, it also packages the files together. And this will be used to create js packages for the DynAPI. For example, it will create the files dynapi.api.js, dynapi.gui.js... which contain all the classes in that subdirectory. I have to add one more feature to my script that determines the order that the objects should be added to the Package. For example, ScrollPane extends off of ViewPort, so in the dynapi.gui.js file, viewport.js must be added first. Therefore I plan to add files to the /lib/dynapi/ directories that state the order of the files. These will be named .jspack and will be a simple list of the js files in the order they are to be added to a package. My JSPack program will take care of the rest. Right now JSPack does not parse the JavaScript, so it will not go through each of your lines and fix and incorrect or missing semicolon. There for it is essential that all files in the DynAPI have semi's on each line, as well in the following case: f = function() { }; // absolutely needed Second part is the Makefile. Up until now we've just been editing our files in /js/. But now we can use a separate directory /src/. This is where we edit our files. Our JavaScripts can contain comments, and do not have to be bunched up, because the Makefile will use the /src/ directory, compress all the code, and produce js packages, and jar files, and output it to /js/. So the /js/ directory will then contain a compressed release of our code. In order to build the DynAPi you need to be using unix/linux or have Cygwin installed in Windows, along with Perl and the JDK (for Jarring the files). You need to place JSPack in your path, and then type: make in the /dynapi/ source tree. This runs the commands in the Makefile which does everything needed to produce the /js/ tree. I'm going through all of the existing JS code and putting the necessary semi colons, and will have everything ready to use in another day or 2. A first run-through of building the DynAPI produced a Jar file which 16KB!!!! (yes the entire DynAPI with the existing widgets can be compressed a lot). We can also use GZip to compress the files for use in IE 5, these will be a bit smaller than the Jar files. I don't believe there is any compression we can do for IE 4 though (other than whitespace removal). over and out, Dan |
From: Robert R. <rra...@ya...> - 2000-12-03 23:45:15
|
Sounds great, when CVS is up in running, we can package the project using a cron job from the sourceforge server, so people can download daily updates. Currently, sourceforge already creates daily snapshots, but your build system can be set up on the server to better package the project. -- // Robert Rainwater On 12/3/2000, 10:52:29 PM, Dan wrote regarding "[Dynapi-Dev] DynAPI Makefile/code compression almost complete": > This weekend I took on the task of creating a "build" system for DynAPI. > First part involved writing my own JavaScript whitespace/comment removal script (in Perl). It's pretty much complete and as good or better than any others I've seen. I'm calling it JSPack and > will release this as a separate program that must be downloaded in order to "build" the DynAPI. > It not only compresses JS code, it also packages the files together. And this will be used to create js packages for the DynAPI. For example, it will create the files dynapi.api.js, > dynapi.gui.js... which contain all the classes in that subdirectory. I have to add one more feature to my script that determines the order that the objects should be added to the Package. For > example, ScrollPane extends off of ViewPort, so in the dynapi.gui.js file, viewport.js must be added first. Therefore I plan to add files to the /lib/dynapi/ directories that state the order of > the files. These will be named .jspack and will be a simple list of the js files in the order they are to be added to a package. My JSPack program will take care of the rest. > Right now JSPack does not parse the JavaScript, so it will not go through each of your lines and fix and incorrect or missing semicolon. There for it is essential that all files in the DynAPI have > semi's on each line, as well in the following case: > f = function() { > }; // absolutely needed > Second part is the Makefile. Up until now we've just been editing our files in /js/. But now we can use a separate directory /src/. This is where we edit our files. Our JavaScripts can contain > comments, and do not have to be bunched up, because the Makefile will use the /src/ directory, compress all the code, and produce js packages, and jar files, and output it to /js/. > So the /js/ directory will then contain a compressed release of our code. > In order to build the DynAPi you need to be using unix/linux or have Cygwin installed in Windows, along with Perl and the JDK (for Jarring the files). You need to place JSPack in your path, and > then type: > make > in the /dynapi/ source tree. This runs the commands in the Makefile which does everything needed to produce the /js/ tree. > I'm going through all of the existing JS code and putting the necessary semi colons, and will have everything ready to use in another day or 2. A first run-through of building the DynAPI produced > a Jar file which 16KB!!!! (yes the entire DynAPI with the existing widgets can be compressed a lot). > We can also use GZip to compress the files for use in IE 5, these will be a bit smaller than the Jar files. I don't believe there is any compression we can do for IE 4 though (other than whitespace > removal). > over and out, > Dan > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Cameron H. <ca...@bi...> - 2000-12-05 10:31:56
|
This is probably a good way of splitting the code into different browser versions. If you put equivant of #IFDEF (or whatever, it's been a long time since I touched C!) in the source Javascript, you could compile browser specific versions from the one source distribution. At least then, all the code is in one place, and browser specific versions are developed together, not seperately. Cameron. > -----Original Message----- > From: dyn...@li... > [mailto:dyn...@li...]On Behalf Of Dan Steinman > Sent: 04 December 2000 03:52 > To: dyn...@li... > Subject: [Dynapi-Dev] DynAPI Makefile/code compression almost complete > > > This weekend I took on the task of creating a "build" system for DynAPI. > > First part involved writing my own JavaScript whitespace/comment > removal script (in Perl). It's pretty much complete and as good > or better than any others I've seen. I'm calling it JSPack and > will release this as a separate program that must be downloaded > in order to "build" the DynAPI. > > It not only compresses JS code, it also packages the files > together. And this will be used to create js packages for the > DynAPI. For example, it will create the files dynapi.api.js, > dynapi.gui.js... which contain all the classes in that > subdirectory. I have to add one more feature to my script that > determines the order that the objects should be added to the > Package. For example, ScrollPane extends off of ViewPort, so in > the dynapi.gui.js file, viewport.js must be added first. > Therefore I plan to add files to the /lib/dynapi/ directories > that state the order of the files. These will be named .jspack > and will be a simple list of the js files in the order they are > to be added to a package. My JSPack program will take care of the rest. > > Right now JSPack does not parse the JavaScript, so it will not go > through each of your lines and fix and incorrect or missing > semicolon. There for it is essential that all files in the > DynAPI have semi's on each line, as well in the following case: > > f = function() { > }; // absolutely needed > > Second part is the Makefile. Up until now we've just been > editing our files in /js/. But now we can use a separate > directory /src/. This is where we edit our files. Our > JavaScripts can contain comments, and do not have to be bunched > up, because the Makefile will use the /src/ directory, compress > all the code, and produce js packages, and jar files, and output > it to /js/. > > So the /js/ directory will then contain a compressed release of our code. > > In order to build the DynAPi you need to be using unix/linux or > have Cygwin installed in Windows, along with Perl and the JDK > (for Jarring the files). You need to place JSPack in your path, > and then type: > > make > > in the /dynapi/ source tree. This runs the commands in the > Makefile which does everything needed to produce the /js/ tree. > > I'm going through all of the existing JS code and putting the > necessary semi colons, and will have everything ready to use in > another day or 2. A first run-through of building the DynAPI > produced a Jar file which 16KB!!!! (yes the entire DynAPI with > the existing widgets can be compressed a lot). > > We can also use GZip to compress the files for use in IE 5, these > will be a bit smaller than the Jar files. I don't believe there > is any compression we can do for IE 4 though (other than > whitespace removal). > > over and out, > Dan > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Alexey M. <ma...@ca...> - 2000-12-05 14:07:12
|
> versions. If you put equivant of #IFDEF (or whatever, it's been a long time > code is in one place, and browser specific versions are developed together, It is interesting idea. I thinks it could be done just with a "grep" (grep.exe) and sed :) ---src.js--- code.... #IE sghd #NN uuuuu ------------ cat src.js | grep -v "^#IE" | sed s/"^#NN"//g >out.js But! It would be hard to create the codes :-/ If implementation ideology of DynLayer in IE and NN would be different. (for example - use of <layer (or = new Layer())for NN as more stable , than </div>). This one better to keep in different files. Malx |
From: Brandon M. <bnd...@ho...> - 2000-12-05 16:41:04
|
YIKES! That would be a serious pain to devlop! Testing would really be hard. Think of all the stuff that would have to be stripped out and added back in. We might as well then develop seperate distributions. Ouch! Keeping everything in a specific heirchy, I think, is a better solution. ----- Original Message ----- From: "Cameron Hart" <ca...@bi...> To: <dyn...@li...> Sent: Tuesday, December 05, 2000 5:31 AM Subject: RE: [Dynapi-Dev] DynAPI Makefile/code compression almost complete > This is probably a good way of splitting the code into different browser > versions. If you put equivant of #IFDEF (or whatever, it's been a long time > since I touched C!) in the source Javascript, you could compile browser > specific versions from the one source distribution. At least then, all the > code is in one place, and browser specific versions are developed together, > not seperately. > > Cameron. > > > -----Original Message----- > > From: dyn...@li... > > [mailto:dyn...@li...]On Behalf Of Dan Steinman > > Sent: 04 December 2000 03:52 > > To: dyn...@li... > > Subject: [Dynapi-Dev] DynAPI Makefile/code compression almost complete > > > > > > This weekend I took on the task of creating a "build" system for DynAPI. > > > > First part involved writing my own JavaScript whitespace/comment > > removal script (in Perl). It's pretty much complete and as good > > or better than any others I've seen. I'm calling it JSPack and > > will release this as a separate program that must be downloaded > > in order to "build" the DynAPI. > > > > It not only compresses JS code, it also packages the files > > together. And this will be used to create js packages for the > > DynAPI. For example, it will create the files dynapi.api.js, > > dynapi.gui.js... which contain all the classes in that > > subdirectory. I have to add one more feature to my script that > > determines the order that the objects should be added to the > > Package. For example, ScrollPane extends off of ViewPort, so in > > the dynapi.gui.js file, viewport.js must be added first. > > Therefore I plan to add files to the /lib/dynapi/ directories > > that state the order of the files. These will be named .jspack > > and will be a simple list of the js files in the order they are > > to be added to a package. My JSPack program will take care of the rest. > > > > Right now JSPack does not parse the JavaScript, so it will not go > > through each of your lines and fix and incorrect or missing > > semicolon. There for it is essential that all files in the > > DynAPI have semi's on each line, as well in the following case: > > > > f = function() { > > }; // absolutely needed > > > > Second part is the Makefile. Up until now we've just been > > editing our files in /js/. But now we can use a separate > > directory /src/. This is where we edit our files. Our > > JavaScripts can contain comments, and do not have to be bunched > > up, because the Makefile will use the /src/ directory, compress > > all the code, and produce js packages, and jar files, and output > > it to /js/. > > > > So the /js/ directory will then contain a compressed release of our code. > > > > In order to build the DynAPi you need to be using unix/linux or > > have Cygwin installed in Windows, along with Perl and the JDK > > (for Jarring the files). You need to place JSPack in your path, > > and then type: > > > > make > > > > in the /dynapi/ source tree. This runs the commands in the > > Makefile which does everything needed to produce the /js/ tree. > > > > I'm going through all of the existing JS code and putting the > > necessary semi colons, and will have everything ready to use in > > another day or 2. A first run-through of building the DynAPI > > produced a Jar file which 16KB!!!! (yes the entire DynAPI with > > the existing widgets can be compressed a lot). > > > > We can also use GZip to compress the files for use in IE 5, these > > will be a bit smaller than the Jar files. I don't believe there > > is any compression we can do for IE 4 though (other than > > whitespace removal). > > > > over and out, > > Dan > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |
From: Dan S. <dy...@fu...> - 2000-12-05 21:47:17
|
I just have to clean it up a bit and I'll have it ready to use this evening. It's really quite a simple system. I'm not sure exactly what you want by splitting the versions up. I mean, there's ways to do that, but why bother? Right now it's just an easy way to compress and combine files, it does nothing more. And we'll use it until we decide that a more sophisticated system is needed. Dan On Tue, Dec 05, 2000 at 10:31:34AM -0000, Cameron Hart wrote: > This is probably a good way of splitting the code into different browser > versions. If you put equivant of #IFDEF (or whatever, it's been a long time > since I touched C!) in the source Javascript, you could compile browser > specific versions from the one source distribution. At least then, all the > code is in one place, and browser specific versions are developed together, > not seperately. > > Cameron. > > > -----Original Message----- > > From: dyn...@li... > > [mailto:dyn...@li...]On Behalf Of Dan Steinman > > Sent: 04 December 2000 03:52 > > To: dyn...@li... > > Subject: [Dynapi-Dev] DynAPI Makefile/code compression almost complete > > > > > > This weekend I took on the task of creating a "build" system for DynAPI. > > > > First part involved writing my own JavaScript whitespace/comment > > removal script (in Perl). It's pretty much complete and as good > > or better than any others I've seen. I'm calling it JSPack and > > will release this as a separate program that must be downloaded > > in order to "build" the DynAPI. > > > > It not only compresses JS code, it also packages the files > > together. And this will be used to create js packages for the > > DynAPI. For example, it will create the files dynapi.api.js, > > dynapi.gui.js... which contain all the classes in that > > subdirectory. I have to add one more feature to my script that > > determines the order that the objects should be added to the > > Package. For example, ScrollPane extends off of ViewPort, so in > > the dynapi.gui.js file, viewport.js must be added first. > > Therefore I plan to add files to the /lib/dynapi/ directories > > that state the order of the files. These will be named .jspack > > and will be a simple list of the js files in the order they are > > to be added to a package. My JSPack program will take care of the rest. > > > > Right now JSPack does not parse the JavaScript, so it will not go > > through each of your lines and fix and incorrect or missing > > semicolon. There for it is essential that all files in the > > DynAPI have semi's on each line, as well in the following case: > > > > f = function() { > > }; // absolutely needed > > > > Second part is the Makefile. Up until now we've just been > > editing our files in /js/. But now we can use a separate > > directory /src/. This is where we edit our files. Our > > JavaScripts can contain comments, and do not have to be bunched > > up, because the Makefile will use the /src/ directory, compress > > all the code, and produce js packages, and jar files, and output > > it to /js/. > > > > So the /js/ directory will then contain a compressed release of our code. > > > > In order to build the DynAPi you need to be using unix/linux or > > have Cygwin installed in Windows, along with Perl and the JDK > > (for Jarring the files). You need to place JSPack in your path, > > and then type: > > > > make > > > > in the /dynapi/ source tree. This runs the commands in the > > Makefile which does everything needed to produce the /js/ tree. > > > > I'm going through all of the existing JS code and putting the > > necessary semi colons, and will have everything ready to use in > > another day or 2. A first run-through of building the DynAPI > > produced a Jar file which 16KB!!!! (yes the entire DynAPI with > > the existing widgets can be compressed a lot). > > > > We can also use GZip to compress the files for use in IE 5, these > > will be a bit smaller than the Jar files. I don't believe there > > is any compression we can do for IE 4 though (other than > > whitespace removal). > > > > over and out, > > Dan > > > > _______________________________________________ > > Dynapi-Dev mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev > > _______________________________________________ > Dynapi-Dev mailing list > Dyn...@li... > http://lists.sourceforge.net/mailman/listinfo/dynapi-dev |