From fe66dc1a1d5557ff51d443a4435555e6821890c0 Mon Sep 17 00:00:00 2001 From: Geoff Pleiss Date: Fri, 26 Dec 2014 20:41:21 -0800 Subject: [PATCH] feat(styleguide): add copy button to code tables [#79279548] --- gulpfile.js | 10 ++++++ .../markup_table_template.html.erb | 3 ++ hologram/doc_assets/_header.html | 3 +- package.json | 3 +- src/styleguide/styleguide.js | 33 +++++++++++++++++++ src/styleguide/styleguide.scss | 24 ++++++++++++++ 6 files changed, 74 insertions(+), 2 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 55fb31599..8dd3f9c2e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -189,6 +189,7 @@ gulp.task('_otherAssets', [ '_copySourceSansPro', '_copyStyleguideAssets', '_copyStaticfile', + '_copyZeroClipboard', ]); gulp.task('_cleanOtherAssets', function(done) { @@ -199,6 +200,7 @@ gulp.task('_cleanOtherAssets', function(done) { 'build/styleguide/*.js', 'build/styleguide/github.css', 'build/Staticfile', + 'build/zeroclipboard', ], {force: true}, done); }); @@ -237,6 +239,14 @@ gulp.task('_copyStaticfile', ['_cleanOtherAssets'], function() { .pipe(gulp.dest('./build/')); }); +gulp.task('_copyZeroClipboard', ['_cleanOtherAssets'], function() { + return gulp.src([ + 'node_modules/zeroclipboard/dist/ZeroClipboard.js', + 'node_modules/zeroclipboard/dist/ZeroClipboard.swf', + ]) + .pipe(gulp.dest('./build/zeroclipboard/')); +}); + gulp.task('_testAssets', [ diff --git a/hologram/code_example_templates/markup_table_template.html.erb b/hologram/code_example_templates/markup_table_template.html.erb index ac6e033c7..fc835eafd 100644 --- a/hologram/code_example_templates/markup_table_template.html.erb +++ b/hologram/code_example_templates/markup_table_template.html.erb @@ -16,6 +16,9 @@ + <% end %> diff --git a/hologram/doc_assets/_header.html b/hologram/doc_assets/_header.html index c1755a013..e3e12a1a5 100644 --- a/hologram/doc_assets/_header.html +++ b/hologram/doc_assets/_header.html @@ -10,8 +10,9 @@ - + +