Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
update(docs): component demos use copied demo assets
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Feb 6, 2015
1 parent 73a2720 commit d70094d
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions scripts/gulp-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,21 @@ exports.humanizeCamelCase = function(str) {
* Copy all the demo assets to the dist directory
* NOTE: this excludes the modules demo .js,.css, .html files
*/
exports.copyDemoAssets = function(name, srcDir, distDir) {
gulp.src(srcDir + name + '/demo*/')
.pipe(through2.obj());
exports.copyDemoAssets = function(component, srcDir, distDir) {
gulp.src(srcDir + component + '/demo*/')
.pipe(through2.obj( copyAssetsFor ));

function copyAssetsFor( demo, enc, next){
var demoID = component + "/" + path.basename(demo.path);
var demoDir = demo.path + "/**/*";

function pipe(demoFolder,enc,next){
var demoID = name + "/" + path.basename(demoFolder.path);
var demoDir = demoFolder.path + "/**/*";

var notJS = '!' + demoDir + '.js';
var notCSS = '!' + demoDir + '.css';
var notHTML= '!' + demoDir + '.html';

gulp.src([demoDir, notJS, notCSS, notHTML])
.pipe(gulp.dest(distDir + demoID));
}
var notJS = '!' + demoDir + '.js';
var notCSS = '!' + demoDir + '.css';
var notHTML= '!' + demoDir + '.html';

gulp.src([demoDir, notJS, notCSS, notHTML])
.pipe(gulp.dest(distDir + demoID));
}
};

// Gives back a pipe with an array of the parsed data from all of the module's demos
Expand Down

0 comments on commit d70094d

Please sign in to comment.