JavaScript Projects - An Idea

GetTriggerUnit-

DogEntrepreneur
Reaction score
129
Hey everyone! Recently, I've been working on really massive JavaScript based projects. And I have of course encountered the usual issue when handling big JavaScript project, maintaining and organizing code.

That brought me to think: is there a solution to maintain and organize code? Is there some sort of IDE or compiler that helps you doing that.
I'm thinking of features like compilation time defines, text macros, imports.

My first question is: is there a such tool which offers features of this kind?

Second question: if there is no such tool, would you be interested into it. Of course let me show how I see this:
Code:
//! define ABC alert('abc')
var $ = {};
//! import ajax.js
//! import dom.js
$.sayAbc = function () {
    /*! #ABC */
};
The define command would behave exactly as define in C/C++.
The import command would place the given file contents directly where the import command was.

I'm also thinking of text macros, like in vJass.

The compilation process would go through the steps of processing the commands and it would produce a raw output. Then, the minification process would produce a compressed output, ready for deployment.
This would allow to make very strong and lightweight web applications using the power of JavaScript. The project would be optimized since it has make the fewer HTTP requests and since it would take less bandwidth.

So basically, I want you guys' opinion on this.
 

phyrex1an

Staff Member and irregular helper
Reaction score
447
I'm using browserify that gives you the same module system as node.js has at the client side. You can use it as a command line tool too if you don't want to depend on node.js. Before that I simply combined all files at deployment to avoid having a single large file at development :p

You can use a C preprocessor if you want defines et al.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top