node-build-script icon indicating copy to clipboard operation
node-build-script copied to clipboard

appcache generation

Open mklabs opened this issue 12 years ago • 3 comments

through confess -> https://github.com/jamesgpearce/confess

the built-in qunit task is probably a good example on how to write a grunt task that drives a phantomjs instance.

confess also comes with two super hot task in addition to the appcache one:

  • performance: basic performance analysis of the site -> this could be done at the beginning and at the end of the scripts, could be handy to have a comparison and actual impact of running the script, and see the progression.
  • cssproperties: can list which CSS properties are being used by the page (and I guess that a complementary task to remove any non used css properties would be quite handy.)

there would be three additional tasks (or maybe a single one with 3 subtargets), three basic facades to the underlying phantomjs/confess combo:

  • grunt appcache: -> phantomjs confess.js appcache
  • grunt performance: -> phantomjs confess.js performance
  • grunt cssprops: -> phantomjs confess.js cssproperties (edit: nope)
  • and a cssclean? -> do the diff of what is actually used in the page and remove relevant part of the style sheets. (edit: nope)

mklabs avatar Apr 21 '12 13:04 mklabs

cssprops only captures what is in use at that early state.. so if i haven't triggered some modal dialog, it'll think i don't need those CSS properties or whatever... so i think we could leave that aspect out. :)

:+1: to the rest

paulirish avatar Apr 23 '12 22:04 paulirish

Thanks for the heads up Paul. It's true that a dialog without its CSS wouldn't be that great.. :) No csspros / cssclean task then, we'll focus on the appcache / perf one.

mklabs avatar Apr 24 '12 19:04 mklabs

Based on h5bp/ant-build-script#59 discussion, maybe the manifest task won't be implemented into the node-build-script, directly.

But I really do want the grunt tasks for confess, so I'll probably work on this in a separate plugin (unless someone else already has a good start on this) and think about a way to integrate with the build script.

mklabs avatar May 06 '12 19:05 mklabs