We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42892
    • 44 Posts
    Hi all smiley

    I am playing around with Grunt(gulp or whatever) at the moment, and I was wondering if somebody has already build him/her self a Grunt Task to build the build scripts for a transport package.

    The thing is that I find it a real pain to maintain the build file with every change I make on my extra and I am shure that it is possible to automate this task. So if someone has already made an approach to this I would like to learn from it smiley

    Thanks already and have a productive day!

    :)
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      There's Bob Ray's MyComponent, which does a very good job once you get the config file figured out. Then there's the ThemePackager which is very nice, as well as the venerable PackMan.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 34926
        • 87 Posts
        If you *really* wanted to do this in Grunt use something like grunt wget or curl to send a HTTP request to the build script. Alternatively you could run PHP via the CLI with something like shell.

        It would be exactly the same as running the build script in your browser/terminal and wouldn't really save any time though...
          • 3749
          • 24,544 Posts
          MyComponent takes a little getting used to, but it has a universal build.transport.php file that you never have to change unless your package contains objects it won't handle (like Form Customization rules, or Access Policies). Even then, you can usually just create a resolver for those objects, list the resolver in the project config file, and leave the build.transport.php file alone.

          MyComponent also has some really handy built-in aids for things like properties and lexicon strings that you won't find in Grunt. It also will import changes in your code files into your MODX dev. site and export changes to your project in the MODX dev. site to the build and code files.
            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 42892
            • 44 Posts
            I think I didn't make my self clear enough. I was looking for a Grunt/Gulp/npm Task that generates my an individual build.transport.php file and everything in the _build directory.

            I hope to finde something like this, but the approach of BobRay is nice already. I will try this out for shure, so thanks Bob! smiley

            Quote from: BobRay at Jul 14, 2014, 11:56 PM
            MyComponent takes a little getting used to, but it has a universal build.transport.php file that you never have to change unless your package contains objects it won't handle (like Form Customization rules, or Access Policies). Even then, you can usually just create a resolver for those objects, list the resolver in the project config file, and leave the build.transport.php file alone.