On my search for a tool that allows me to easily work with a plugin split into components I just came across a cool tool called JSCombiner, made by Ardee Aram:
It allows you to select a folder and have the js files within that folder merged into a new file. If you keep the program running in the background, it will also listen for changes to these files & update the main plugin.
Features:
Requirements:
To run JSCombiner you must have the following installed:
Link:
bitbucket.org
Download Anyone Variant:
I've also made a special version that is less flexible, but faster for my workflow. The download is attached to this post.
This makes it vastly faster and less tedious to use.
Features (Anyone Variant):
EDIT: I've uploaded a second alternative version. This one is more clear in the naming scheme.
Drop it into your "plugins" folder, rename it to the name of your plugin, make a subfolder named after your plugin, throw your plugin or plugins into the subfolder, it will automatically generate a JS file with the same name.
Anyone Variant Instructions (v1):
1. Make sure you have the required software installed (Java Runtime 1.7.0 or higher - and jRuby)
2. In the folder where you want your Main Plugin to be, create a new folder and name it after your plugin file's name. Add a "_" in front of the folder name, and add as suffix "sub components":
ANY_Core => _ANY_Core sub components
3. Put the sub component js files into this new folder - ensure they're sorted in Alphabetical priority.
4. Place the *.rb file into the main folder and rename it to the plugin filename.
5. Launch the *.rb file. It will merge the files of the subfolder automatically and listen for changes. You can either exit out, or leave it running if you want to keep modifying the main file automatically based on component changes.
Repeat the above steps for every single main plugin file. Every one of them should have their own *.rb file.
Final Words:
And that's it.
What a useful tool by Ardee Aram. I merely optimized the workflow for RPGM plugin development.
This is the solution I came up with to have a very easily manageable component system for my plugins, so it's less of a headache to scroll through thousands upon thousands of lines of code. The tool will automatically ensure the main file is up to date, so I can just work on the components and never bother with manually merging all the JS files.
I hope this makes your life easier. Cheers.
It allows you to select a folder and have the js files within that folder merged into a new file. If you keep the program running in the background, it will also listen for changes to these files & update the main plugin.
Features:
- Merge Plugins Components in Alphabetical order into Main Plugin
- Listen for changed & update Main Plugin
Requirements:
To run JSCombiner you must have the following installed:
- Java Runtime Environment >= 1.7.0 (jRuby has a bundled distribution)
- jRuby http://jruby.org/ (best use version 9.2.19.0 - later versions sometimes have an error)
Link:
Bitbucket
bitbucket.org
Download Anyone Variant:
I've also made a special version that is less flexible, but faster for my workflow. The download is attached to this post.
This makes it vastly faster and less tedious to use.
Features (Anyone Variant):
- Instant Component loading
- No setup process
EDIT: I've uploaded a second alternative version. This one is more clear in the naming scheme.
Drop it into your "plugins" folder, rename it to the name of your plugin, make a subfolder named after your plugin, throw your plugin or plugins into the subfolder, it will automatically generate a JS file with the same name.
Anyone Variant Instructions (v1):
1. Make sure you have the required software installed (Java Runtime 1.7.0 or higher - and jRuby)
2. In the folder where you want your Main Plugin to be, create a new folder and name it after your plugin file's name. Add a "_" in front of the folder name, and add as suffix "sub components":
ANY_Core => _ANY_Core sub components
3. Put the sub component js files into this new folder - ensure they're sorted in Alphabetical priority.
4. Place the *.rb file into the main folder and rename it to the plugin filename.
5. Launch the *.rb file. It will merge the files of the subfolder automatically and listen for changes. You can either exit out, or leave it running if you want to keep modifying the main file automatically based on component changes.
Repeat the above steps for every single main plugin file. Every one of them should have their own *.rb file.
Final Words:
And that's it.
What a useful tool by Ardee Aram. I merely optimized the workflow for RPGM plugin development.
This is the solution I came up with to have a very easily manageable component system for my plugins, so it's less of a headache to scroll through thousands upon thousands of lines of code. The tool will automatically ensure the main file is up to date, so I can just work on the components and never bother with manually merging all the JS files.
I hope this makes your life easier. Cheers.