grunt-usemin-flatcopy
Export step and blockReplacement for usemin usage, to perform a copy of several files in a single flat folder
Getting Started
If you haven't used grunt before, be sure to check out the Getting Started guide, as it explains how to create a gruntfile as well as install and use grunt plugins, especially grunt-usemin. Once you're familiar with that process, install this plugin with this command:
This plugin uses the step grunt-contrib-copy
for grunt-usemin and need it to be installed.
npm i grunt-usemin --save-devnpm i grunt-contrib-copy --save-devnpm i grunt-usemin-flatcopy --save-dev
What does it do ?
It turns:
<!-- build:flatcopyType my/unique/path/to --><!-- endbuild -->
into
In Gruntfile.js:
grunt;grunt; var flatcopy = ; grunt;
It supports following syntaxes:
<!-- build:<type> <path> -->
... HTML Markup, list of script / link tags.
<!-- endbuild -->
<!-- build:<type>(<alternative_source_path>) <path> -->
... HTML Markup, list of script / link tags.
<!-- endbuild -->
// <alternative_source_path> could be a simple path (containing ** or * )
// or even a group of them like '{<path1>,<path2>}'