Added a grunt build process #105

Merged
ColinEberhardt merged 6 commits from build-process into master 2015-08-11 23:19:20 -07:00
ColinEberhardt commented 2015-08-11 13:23:49 -07:00 (Migrated from github.com)

Added a more complete build process

As part of #101 :

I've created a more complete build process using Grunt, it performs the following steps:

  • Lints the code via ESLint (the ESLint version was a bit out of date, and had lots of failures, I've done a quick upgrade but have had to turn off quite a few rules in order to make progress)
  • Runs the browser tests via Karma. I've added the Karma configuration directly to the gruntfile, this just tidies things up a bit. Also, I've removed the HTML test files, these are a duplication / maintenance issue from my perspective!
  • Wraps up Layout.js into a universal module (UMD), via a simple grunt task that performs inclusion. This is a bit messy, and doesn't scale well if you ever want to split the code up into smaller sub-modules, but is an improvement on what we currently have.
  • Uses uglify to minify the JavaScript.

The build output sits in the dist folder which is added to git. I'm in two minds about this, typically I'd want to have the build output distributed via npm or a GitHub release, however, this project has transpiled output that is already part of the repo, so this doesn't feel like a pollution.

Open question:

  • Should the templated / generated C / Java also be moved into dist? This might make it clearer for consumers of this project? e.g. dist/js, dist/java ...

For my next step I want to sort out the build, currently it is part JavaScript / grunt / karma and part make. The Travis build should run everything!

Fixes #102 #103

On another note, having the output minified, I can now submit to CDNJS :-)

Added a more complete build process As part of #101 : I've created a more complete build process using Grunt, it performs the following steps: - Lints the code via ESLint (the ESLint version was a bit out of date, and had lots of failures, I've done a quick upgrade but have had to turn off quite a few rules in order to make progress) - Runs the browser tests via Karma. I've added the Karma configuration directly to the gruntfile, this just tidies things up a bit. Also, I've removed the HTML test files, these are a duplication / maintenance issue from my perspective! - Wraps up `Layout.js` into a universal module (UMD), via a simple grunt task that performs inclusion. This is a bit messy, and doesn't scale well if you ever want to split the code up into smaller sub-modules, but is an improvement on what we currently have. - Uses uglify to minify the JavaScript. The build output sits in the `dist` folder which is added to git. I'm in two minds about this, typically I'd want to have the build output distributed via npm or a GitHub release, however, this project has transpiled output that is already part of the repo, so this doesn't feel like a pollution. Open question: - Should the templated / generated C / Java also be moved into dist? This might make it clearer for consumers of this project? e.g. `dist/js`, `dist/java` ... For my next step I want to sort out the build, currently it is part JavaScript / grunt / karma and part make. The Travis build should run everything! Fixes #102 #103 On another note, having the output minified, I can now submit to CDNJS :-)
vjeux commented 2015-08-11 14:01:16 -07:00 (Migrated from github.com)

Sounds good, feel free to merge when you are ready :)

Sounds good, feel free to merge when you are ready :)
ColinEberhardt commented 2015-08-11 14:25:22 -07:00 (Migrated from github.com)

Thanks, I don't have merge privileges, do you want to merge this in?

Thanks, I don't have merge privileges, do you want to merge this in?
vjeux commented 2015-08-11 14:28:47 -07:00 (Migrated from github.com)

Woops, forgot to hit save. Now should be good

Woops, forgot to hit save. Now should be good
ColinEberhardt commented 2015-08-11 23:20:08 -07:00 (Migrated from github.com)

Thanks, I'm almost done with unifying the Java and C builds into a single grunt build, feels much better :-)

Thanks, I'm almost done with unifying the Java and C builds into a single grunt build, feels much better :-)
paramaggarwal commented 2015-08-28 10:28:43 -07:00 (Migrated from github.com)

Thanks for this @ColinEberhardt. I remember playing with css-layout a few months back and it was difficult to get it running. These grunt tasks made it super easy to get a dev setup going.

Thanks for this @ColinEberhardt. I remember playing with css-layout a few months back and it was difficult to get it running. These grunt tasks made it super easy to get a dev setup going.
ColinEberhardt commented 2015-08-28 10:32:43 -07:00 (Migrated from github.com)

Thanks for the feedback, glad to hear this helped :-)

On Fri, Aug 28, 2015 at 6:28 pm, facebook/css-layout
reply@reply.github.com
wrote:
Thanks for this @ColinEberhardt [https://github.com/ColinEberhardt] . I remember playing with css-layout a few months back and it was difficult to
get it running. These grunt tasks made it super easy to get up and running.


Reply to this email directly or view it on GitHub
[https://github.com/facebook/css-layout/pull/105#issuecomment-135839507] .[https://github.com/notifications/beacon/ABDBfiHqU4syuvTH1kU7VnxnsMKT-fveks5osJHOgaJpZM4FpwNq.gif]

Thanks for the feedback, glad to hear this helped :-) On Fri, Aug 28, 2015 at 6:28 pm, facebook/css-layout reply@reply.github.com wrote: Thanks for this @ColinEberhardt [https://github.com/ColinEberhardt] . I remember playing with css-layout a few months back and it was difficult to get it running. These grunt tasks made it super easy to get up and running. — Reply to this email directly or view it on GitHub [https://github.com/facebook/css-layout/pull/105#issuecomment-135839507] .[https://github.com/notifications/beacon/ABDBfiHqU4syuvTH1kU7VnxnsMKT-fveks5osJHOgaJpZM4FpwNq.gif]
Sign in to join this conversation.
No description provided.