Skip to content

Commit 0dfb218

Browse files
committed
chore: removed copyPublic function and calls from uikit-workshop's gulpfile
1 parent 07d2b6e commit 0dfb218

File tree

1 file changed

+8
-26
lines changed

1 file changed

+8
-26
lines changed

packages/uikit-workshop/gulpfile.js

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,12 @@ const { buildCriticalCSS } = require('./penthouse');
1111
// @todo: uncomment once cache-busting strategy in place.
1212
// const workboxBuild = require('workbox-build');
1313

14-
1514
/* load the plugins */
1615
const gulpLoadPlugins = require('gulp-load-plugins');
1716
const plugins = gulpLoadPlugins({ scope: ['devDependencies'] });
1817
plugins.del = require('del');
1918
plugins.mainBowerFiles = require('main-bower-files');
2019

21-
/* copy the dist folder into the designated public folder */
22-
function copyPublic(suffix) {
23-
if (args['copy-dist'] !== undefined) {
24-
return gulp.dest(args['copy-dist'] + '/' + suffix);
25-
} else {
26-
return plugins.util.noop();
27-
}
28-
}
29-
3020
/* clean tasks */
3121
gulp.task('clean', function(cb) {
3222
return plugins.del(['dist'], cb);
@@ -38,8 +28,7 @@ gulp.task('build:bower', ['clean'], function() {
3828
.src(plugins.mainBowerFiles())
3929
.pipe(plugins.rename({ suffix: '.min' }))
4030
.pipe(plugins.uglify())
41-
.pipe(gulp.dest('dist/styleguide/bower_components'))
42-
.pipe(copyPublic('styleguide/bower_components'));
31+
.pipe(gulp.dest('dist/styleguide/bower_components'));
4332
});
4433

4534
gulp.task('build:css', ['clean'], function() {
@@ -79,8 +68,7 @@ gulp.task('build:css', ['clean'], function() {
7968
inline: ['remote'],
8069
})
8170
)
82-
.pipe(gulp.dest('dist/styleguide/css'))
83-
.pipe(copyPublic('styleguide/css'));
71+
.pipe(gulp.dest('dist/styleguide/css'));
8472
});
8573

8674
gulp.task(
@@ -99,8 +87,7 @@ gulp.task('copy:js', ['clean'], function() {
9987
'node_modules/whendefined/dist/whendefined.min.js',
10088
'node_modules/fg-loadjs/loadJS.js',
10189
])
102-
.pipe(gulp.dest('dist/styleguide/js'))
103-
.pipe(copyPublic(''));
90+
.pipe(gulp.dest('dist/styleguide/js'));
10491
});
10592

10693
gulp.task(
@@ -110,8 +97,7 @@ gulp.task(
11097
return gulp
11198
.src('src/html/index.html')
11299
.pipe(plugins.fileInclude({ prefix: '@@', basepath: '@file' }))
113-
.pipe(gulp.dest('dist'))
114-
.pipe(copyPublic(''));
100+
.pipe(gulp.dest('dist'));
115101
}
116102
);
117103

@@ -124,8 +110,7 @@ gulp.task('build:html', ['clean', 'criticalcss', 'prebuild:html'], function() {
124110
compress: true,
125111
})
126112
)
127-
.pipe(gulp.dest('dist'))
128-
.pipe(copyPublic(''));
113+
.pipe(gulp.dest('dist'));
129114
});
130115

131116
gulp.task('build:images', ['clean'], function() {
@@ -138,8 +123,7 @@ gulp.task('build:images', ['clean'], function() {
138123
use: [plugins.pngcrush()],
139124
})
140125
)
141-
.pipe(gulp.dest('dist/styleguide/images'))
142-
.pipe(copyPublic('styleguide/images'));
126+
.pipe(gulp.dest('dist/styleguide/images'));
143127
});
144128

145129
gulp.task('build:js-viewer', ['clean'], function() {
@@ -157,8 +141,7 @@ gulp.task('build:js-viewer', ['clean'], function() {
157141
.pipe(gulp.dest('dist/styleguide/js'))
158142
.pipe(plugins.rename({ suffix: '.min' }))
159143
.pipe(plugins.uglify())
160-
.pipe(gulp.dest('dist/styleguide/js'))
161-
.pipe(copyPublic('styleguide/js'));
144+
.pipe(gulp.dest('dist/styleguide/js'));
162145
});
163146

164147
gulp.task('build:js-pattern', ['clean', 'build:js-viewer'], function() {
@@ -182,8 +165,7 @@ gulp.task('build:js-pattern', ['clean', 'build:js-viewer'], function() {
182165
.pipe(gulp.dest('dist/styleguide/js'))
183166
.pipe(plugins.rename({ suffix: '.min' }))
184167
.pipe(plugins.uglify())
185-
.pipe(gulp.dest('dist/styleguide/js'))
186-
.pipe(copyPublic('styleguide/js'));
168+
.pipe(gulp.dest('dist/styleguide/js'));
187169
});
188170

189171
// @todo: re-enable once cache busting strategy in place

0 commit comments

Comments
 (0)