Static resource bundle support

Issue #131 resolved
Scott Wells repo owner created an issue

Splitting this off from issue #74. More and more users are asking for this specific functionality, e.g.:

I believe that having flexible directory structure built into the plugin would be very helpful but handling static resource of zip/archive format is a feature in much greater need. When using JavaScript Frameworks to develop custom Salesforce Front-End pages, zipped files are the best alternative to handle a complex structure and is frequently used among developers. I personaly have used it extensively in order to move away from Visual Force and use the latest Web Frameworks out there such as AngularJs, NodeJs, RequireJs, and Bootstrap without much interference from the Salesforce platform limitations. Flexible directory can already be done with third part software such as DSynchronize while modifying zipped Static Resources only works with MavensMate Resource Bundle. Since Jetbrains Intellij is a much superior IDE than Sublime, if Illuminated Cloud offered the same benefits plus more that of MavensMate, there would be no reason for Force.com developers to stick with MavensMate besides for the fact that it is free.

Comments (11)

  1. Scott Wells reporter

    I've now started on this feature and wanted to describe the overall approach here. There are basically four aspects to the implementation:

    Configuration

    Add a deployment configuration option to enable/disable deploy-on-save for static resources when bundle contents are modified in the IDE.

    Static resource to bundle conversion (and vice versa) - Complete

    Add a context menu item to archive type static resource files, Convert To Static Resource Bundle. When selected, the static resource is extracted into a directory with the same name as the static resource file excluding the ".resource" extension and the original static resource file is removed. The ".resource-meta.xml" file is retained as a peer of this new directory.

    Add a context menu item to static resource bundle directories, Convert To Static Resource. When selected, the directory is added recursively to an archive with the same name as the directory adding a ".resource" extension and the directory is removed.

    Deployment - Complete

    When files are modified, added, or removed within a static resource bundle directory and Illuminated Cloud is configured for deploy-on-save behavior for static resources, the corresponding archive type static resource is created and used for deployment.

    When a bulk deployment is requested, the corresponding archive type static resources are created for all static resource bundle directories that should be included in the deployment.

    Retrieval - Complete

    When static resources are retrieved into a temporary directory, Illuminated Cloud will determine whether any are managed as bundles in the local project. For those that are managed as bundles, they will be extracted in the temporary directory before comparison.

  2. Scott Wells reporter

    This is now feature complete aside from the configuration option which I will implement this evening. I plan to test it heavily over the weekend and release it on Monday alongside some other small items.

  3. Jonathan Toland

    This is presently broken for me. I regularly update src/ from Salesforce using MM. At that point I'm able to compare against git with my tool of choice. Because your backing directory is in src/staticresources/ it also gets blown away. I can accept my workflow is suboptimal. But my project should work regardless of editor especially from a collaborative perspective. May I recommend either moving the backing directory to resource-bundles/{bundle-name}.resource/ like MM or at least make it configurable.

  4. Jonathan Toland

    Let me know whether this ought to be a separate issue. Much lower hanging fruit than the other directory one.

  5. Scott Wells reporter

    Let's breaking this into a separate issue since this one is resolved based on the current design.

  6. Log in to comment