-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify semantics and usage of copying and script inclusion #16
Conversation
…s and files (files = copied & replaced paths with top level scripts that are each a script inclusion)
Cool! Here's the one design choice I was wrestling with where we came chose different options and maybe is worth discussion: |
tasks/jasmine-chromeapp.js
Outdated
|
||
function addFiles(files, to, tagFilter) { | ||
var tags = ''; | ||
/* copyFiles is adapted from: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems like it might make sense in a separate file. it's a rather involved method that could be used more generally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure how to do that; there's dependencies on the grunt
object within that code. Ideas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have a new file that does a module.exports = function(grunt)
similar to how this one is structured?
or require('grunt')
might work, since it looks like the dependence is mostly on static things like .util
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
module.exports = function(grunt) doesn't work (grunt is not defined except for top level required things, maybe grunt magic on its module registration), but require('grunt')
does. Done.
Good idea w.r.t. support for |
Summary of changes:
cwd
andexpand
are now supported, as well as other features like copy only if timestamps change (sadly couldn't use directly; grunt isn't very modular for code usage as far as I can see).files
parameter are now copied into a directory calledfiles
(instead of being copied into a directory calledscripts
)paths
in the options, and requiring it to be present, we now specify the scripts that get added to the HTML in ascripts
parameter.files
section of config for a target #15)TESTED:
@soycode @willscott @bemasc @trevj