deconst / strider-deconst-control

Deconst control repository build plugin for Strider CD
MIT License
1 stars 2 forks source link

Invoke Grunt for each Gruntfile in the control repository workspace #4

Closed smashwilson closed 8 years ago

smashwilson commented 8 years ago

It'll have to be in a Docker container, because this is user-submitted code; we can do the same temporary API key scheme that I'm planning to do for PR content builds.

smashwilson commented 8 years ago

@ktbartholomew: I recall that you had designs on reorganizing the control repository to make the separation between sites cleaner. Was that going to involve separate Gruntfiles too?

If it is I can do a filesystem walk to find Gruntfiles anywhere in the workspace and run Grunt separately for each. If not I can simplify things a bit and just run one at the root. Up to you.

ktbartholomew commented 8 years ago

It would definitely involve multiple Gruntfiles (one per site), but could also support other build tools like Gulp as well. It's all still in the thought experiment stage, so I'm not 100% sure what I'll end up with yet.

It might be safer to standardize on an npm build task that could then call the appropriate build task(s) from Grunt or Gulp?

smashwilson commented 8 years ago

It might be safer to standardize on an npm build task that could then call the appropriate build task(s) from Grunt or Gulp?

:+1: Yeah, that sounds like an excellent idea.

smashwilson commented 8 years ago

The asset preparer container will be invoked on each workspace subdirectory that contains a package.json file that includes a deconst-control-build command in its scripts:

{
  "scripts": {
    "deconst-control-build": "grunt build"
  }
}

This should be pretty resilient to any control repository reorganizations that we do.