Cache node_modules #8

Merged
merged 18 commits into from Nov 14, 2013

Conversation

Projects
None yet
7 participants

This merges in the changes from https://github.com/ddollar/heroku-buildpack-nodejs, which caches the node_modules between deploys. I didn't time it, but it makes deploys SIGNIFICANTLY faster.

davidjrice and others added some commits Feb 26, 2013

@davidjrice davidjrice Preserve ENV vars CPATH and CPPPATH (composable buildpacks) 537c16c
@ryanbrainard ryanbrainard cat npm-debug.log on exit 9846540
@zeke zeke Merge pull request #34 from ryanbrainard/cat-npm-debug-log
Cat npm-debug.log on exit
06f629c
@zeke zeke add CONTRIBUTING.md 68a8047
@zeke zeke remove extra newline fc8df59
@zeke zeke update 'no version specified' devcenter url 9fe5546
@zeke zeke Merge pull request #30 from davidjrice/preserve-env-vars
Preserve ENV vars CPATH and CPPPATH (composable buildpacks)
51fd8ec
@zeke zeke improve documentation in README 43d01bb
@zeke zeke add a readme section for hackers 9d37105
@zeke zeke DRY up the hacking docs 305c472
@zeke zeke ignore .DS_Store 4593210
@zeke zeke use npm 1.3.x by default c05e23b
@ddollar ddollar comments fd7fdbb
@ddollar ddollar cache node_modules 48ae63f
@ddollar ddollar only cache if there is a node_modules dir d440038
@ddollar ddollar always pass a cache dir d32791e
@ddollar ddollar test node_modules caching f7fa3d0
@bkeepers bkeepers Merge node_modules caching from ddollar
* ddollar/master:
  test node_modules caching
  always pass a cache dir
  only cache if there is a node_modules dir
  cache node_modules
  comments
  use npm 1.3.x by default
  ignore .DS_Store
  DRY up the hacking docs
  add a readme section for hackers
  improve documentation in README
  update 'no version specified' devcenter url
  remove extra newline
  add CONTRIBUTING.md
  cat npm-debug.log on exit
  Preserve ENV vars CPATH and CPPPATH (composable buildpacks)

Conflicts:
	README.md
7fa98e4
Owner

searls commented Nov 14, 2013

This seems super. Was thinking of doing the same myself and I should have thought to check heroku

On Wed, Nov 13, 2013 at 8:44 PM, Brandon Keepers notifications@github.com
wrote:

This merges in the changes from https://github.com/ddollar/heroku-buildpack-nodejs, which caches the node_modules between deploys. I didn't time it, but it makes deploys SIGNIFICANTLY faster.
You can merge this Pull Request by running:
git pull https://github.com/bkeepers/heroku-buildpack-lineman cache-modules
Or you can view, comment on it, or merge it online at:
testdouble#8
-- Commit Summary --

  • Preserve ENV vars CPATH and CPPPATH (composable buildpacks)
  • cat npm-debug.log on exit
  • Merge pull request #34 from ryanbrainard/cat-npm-debug-log
  • add CONTRIBUTING.md
  • remove extra newline
  • update 'no version specified' devcenter url
  • Merge pull request #30 from davidjrice/preserve-env-vars
  • improve documentation in README
  • add a readme section for hackers
  • DRY up the hacking docs
  • ignore .DS_Store
  • use npm 1.3.x by default
  • comments
  • cache node_modules
  • only cache if there is a node_modules dir
  • always pass a cache dir
  • test node_modules caching
  • Merge node_modules caching from ddollar
    -- File Changes --
    M .gitignore (1)
    A CONTRIBUTING.md (74)
    M bin/compile (35)
    M bin/test (17)
    A test/node-modules-caching/package.json (13)
    -- Patch Links --
    https://github.com/testdouble/heroku-buildpack-lineman/pull/8.patch
    https://github.com/testdouble/heroku-buildpack-lineman/pull/8.diff

@searls searls added a commit that referenced this pull request Nov 14, 2013

@searls searls Merge pull request #8 from bkeepers/cache-modules
Cache node_modules
c5f51ea

@searls searls merged commit c5f51ea into linemanjs:master Nov 14, 2013

Owner

searls commented Nov 14, 2013

Tested this out with the blog

Cold push:

real    2m13.696s
user    0m0.032s
sys 0m0.044s

Warm push:

real    1m38.309s
user    0m0.025s
sys 0m0.024s

Installing bundler & sass is probably the slowest aspect of the whole ordeal

Interestingly, the warm push had its slug size cut in half (from 50MB to 25MB)

Member

jasonkarns commented Nov 14, 2013

How bad do we need Sass? (I really just want LESS)

On Wed, Nov 13, 2013 at 8:56 PM, Justin Searls notifications@github.comwrote:

Tested this out with the blog

Cold push:

real 2m13.696s
user 0m0.032s
sys 0m0.044s

Warm push:

real 1m38.309s
user 0m0.025s
sys 0m0.024s

Installing bundler & sass is probably the slowest aspect of the whole
ordeal

Interestingly, the warm push had its slug size cut in half (from 50MB to
25MB)


Reply to this email directly or view it on GitHubhttps://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453378
.

Owner

searls commented Nov 14, 2013

If your project doesn't have Sass enabled, the heroku buildpack is smart
enough to not install it and it won't slow you down at all.

On Wed, Nov 13, 2013 at 9:02 PM, Jason Karns notifications@github.comwrote:

How bad do we need Sass? (I really just want LESS)

On Wed, Nov 13, 2013 at 8:56 PM, Justin Searls notifications@github.comwrote:

Tested this out with the blog

Cold push:

real 2m13.696s
user 0m0.032s
sys 0m0.044s

Warm push:

real 1m38.309s
user 0m0.025s
sys 0m0.024s

Installing bundler & sass is probably the slowest aspect of the whole
ordeal

Interestingly, the warm push had its slug size cut in half (from 50MB to
25MB)


Reply to this email directly or view it on GitHub<
https://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453378>

.


Reply to this email directly or view it on GitHubhttps://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453655
.

Member

jasonkarns commented Nov 14, 2013

Yeah, I mean I want to switch double-takes from Sass to LESS 😄

On Wed, Nov 13, 2013 at 9:04 PM, Justin Searls notifications@github.comwrote:

If your project doesn't have Sass enabled, the heroku buildpack is smart
enough to not install it and it won't slow you down at all.

On Wed, Nov 13, 2013 at 9:02 PM, Jason Karns notifications@github.comwrote:

How bad do we need Sass? (I really just want LESS)

On Wed, Nov 13, 2013 at 8:56 PM, Justin Searls notifications@github.comwrote:

Tested this out with the blog

Cold push:

real 2m13.696s
user 0m0.032s
sys 0m0.044s

Warm push:

real 1m38.309s
user 0m0.025s
sys 0m0.024s

Installing bundler & sass is probably the slowest aspect of the whole
ordeal

Interestingly, the warm push had its slug size cut in half (from 50MB
to
25MB)


Reply to this email directly or view it on GitHub<

https://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453378>

.


Reply to this email directly or view it on GitHub<
https://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453655>

.


Reply to this email directly or view it on GitHubhttps://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453730
.

Without sass I'm getting 1m02.84s

bkeepers deleted the bkeepers:cache-modules branch Nov 14, 2013

Owner

searls commented Nov 14, 2013

If you can find an alternative with helpers as nice as bourbon's for
retina-images, transforms, and animations, I'm down. So far I haven't seen
anything in Less-or-Stylus-world that's as nice.

On Wed, Nov 13, 2013 at 9:09 PM, Jason Karns notifications@github.comwrote:

Yeah, I mean I want to switch double-takes from Sass to LESS 😄

On Wed, Nov 13, 2013 at 9:04 PM, Justin Searls notifications@github.comwrote:

If your project doesn't have Sass enabled, the heroku buildpack is smart
enough to not install it and it won't slow you down at all.

On Wed, Nov 13, 2013 at 9:02 PM, Jason Karns notifications@github.comwrote:

How bad do we need Sass? (I really just want LESS)

On Wed, Nov 13, 2013 at 8:56 PM, Justin Searls <
notifications@github.com>wrote:

Tested this out with the blog

Cold push:

real 2m13.696s
user 0m0.032s
sys 0m0.044s

Warm push:

real 1m38.309s
user 0m0.025s
sys 0m0.024s

Installing bundler & sass is probably the slowest aspect of the
whole
ordeal

Interestingly, the warm push had its slug size cut in half (from
50MB
to
25MB)


Reply to this email directly or view it on GitHub<

https://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453378>

.


Reply to this email directly or view it on GitHub<

https://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453655>

.


Reply to this email directly or view it on GitHub<
https://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453730>

.


Reply to this email directly or view it on GitHubhttps://github.com/testdouble/heroku-buildpack-lineman/pull/8#issuecomment-28453898
.

Yeah, I mean I want to switch double-takes from Sass to LESS

I highly recommend stylus with nib. It's what SASS and LESS wished they were. I'm using it on bkeepers/github-notifications#21 and absolutely love it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment