grunt-html-snapshot icon indicating copy to clipboard operation
grunt-html-snapshot copied to clipboard

Save Snapshots into Folder Structrue

Open pburgmer opened this issue 11 years ago • 6 comments

It would be nice to be able to save the snapshots into a folder structure instead of a flat list. A nested folder structure makes it easier to write a url rewrite rule.

Example: Hash-Bang-Url: #!/company/management Flat snapshot file: snapshot___company_management.html Nested folder snapshot file: snapshot/company/managment.html

At the moment you're able to configure 'snapshotPath' and 'fileNamePrefix'. But within 'snapshotPath' folder all snapshot files a saved with _ as replacement for slashes in the hash bang url. One more option to configure the grunt task not to replace the slashes of the hash bang url should be enough to get it working with folder structures. Then, together with 'snapshotPath' and 'fileNamePrefix' you're able to get a structure shown in the example.

pburgmer avatar Jul 02 '13 08:07 pburgmer

+1 would you like to create a PR?

cburgdorf avatar Jul 03 '13 21:07 cburgdorf

Hopefully I find time to code it this weekend ...

pburgmer avatar Jul 04 '13 10:07 pburgmer

Great! Looking forward to it!

cburgdorf avatar Jul 04 '13 12:07 cburgdorf

+1

reneras avatar Jul 28 '13 11:07 reneras

+1

amercier avatar Oct 20 '13 16:10 amercier

+1

wcandillon avatar Nov 01 '13 03:11 wcandillon