djcas9 / komanda

The IRC Client For Developers
http://komanda.io
MIT License
1.78k stars 75 forks source link

Allow user to specify build targets #149

Closed 0xazure closed 10 years ago

0xazure commented 10 years ago

I wanted to be able to control the platforms for which builds were created when running grunt build. The current behaviour is to build for all targets (win, mac, linux32, linux64), but this is both time-consuming and I didn't find it very useful since I only use the one build for the platform I'm on.

Instead, let's seed the nodewebkit task with data we've already generated from parseBuildPlatforms() so that we only build the specified platforms. This also means that now, by default, running grunt build will only build for the current system (i.e. if you're on Windows and you run grunt build, you'll only end up with a Windows build and no others).

In order to build for all platforms, you need to explicitly specify grunt build --platforms=all.

I'm still not quite happy with the formatting of the build instructions, so if anyone has any suggestions I'd be interested in hearing them.

tyscorp commented 10 years ago

How about grunt build:<platform> with the current platform as default?

0xazure commented 10 years ago

That syntax makes a heck of a lot more sense. I'll have another go at it.

0xazure commented 10 years ago

Not sure how I missed seeing the task:param syntax, but it's much more intuitive. I'm still kind of new to Grunt, so that might by why.

The build task command now looks like grunt build:<platform> where <platform> is all | [win,mac,linux32,linux64] and defaults to the current platform (process.platform specifically).

Let me know what you think.

tyscorp commented 10 years ago

Looks great! Thanks for contributing.

eugene-bulkin commented 10 years ago

Just wanted to chime in and thank you for this because it makes the build process faster for lazy people like me!