-
Notifications
You must be signed in to change notification settings - Fork 55
script plugin
Mickael Daniel edited this page Apr 7, 2012
·
2 revisions
This plugin runs, in the default setup, with the following configuration:
dom: {
files : ['*.html'],
options : {
dir: process.cwd(),
output: 'js/bundle.min.js'
},
'script[data-build]' : h5bp.plugins.script
},
Does the following:
- Iterates through each script in order and concats them
- On the very last iteration (last script tags in jQuery collection), concat'd files are minified.
- The single minified content string is written to
options.output
or to thedata-build
attribute of last script tag. - Every script in the collection but the last one get removed. Last one
is updated so that the src attribute is
src=path/to/output
-
dir base directory to work from
-
output default output destination, if not defined through
data-build
.