Skip to content

Commit 2ed013f

Browse files
committed
refactor: remove bower-specific config files and gulp tasks; add corresponding NPM dependencies
1 parent 98a47ba commit 2ed013f

File tree

5 files changed

+13
-75
lines changed

5 files changed

+13
-75
lines changed

packages/uikit-workshop/.bowerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

packages/uikit-workshop/bower.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

packages/uikit-workshop/gulpfile.js

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ var gulp = require('gulp');
88
var gulpLoadPlugins = require('gulp-load-plugins');
99
var plugins = gulpLoadPlugins({ scope: ['devDependencies'] });
1010
plugins.del = require('del');
11-
plugins.mainBowerFiles = require('main-bower-files');
1211

1312
/* copy the dist folder into the designated public folder */
1413
function copyPublic(suffix) {
@@ -19,11 +18,6 @@ function copyPublic(suffix) {
1918
}
2019
}
2120

22-
/* clean tasks */
23-
gulp.task('clean:bower', function(cb) {
24-
return plugins.del(['dist/styleguide/bower_components/*'], cb);
25-
});
26-
2721
gulp.task('clean:css', function(cb) {
2822
return plugins.del(['dist/styleguide/css/*'], cb);
2923
});
@@ -40,16 +34,6 @@ gulp.task('clean:js', function(cb) {
4034
return plugins.del(['dist/styleguide/js/*'], cb);
4135
});
4236

43-
/* core tasks */
44-
gulp.task('build:bower', ['clean:bower'], function() {
45-
return gulp
46-
.src(plugins.mainBowerFiles())
47-
.pipe(plugins.rename({ suffix: '.min' }))
48-
.pipe(plugins.uglify())
49-
.pipe(gulp.dest('dist/styleguide/bower_components'))
50-
.pipe(copyPublic('styleguide/bower_components'));
51-
});
52-
5337
gulp.task('build:css', function() {
5438
return plugins
5539
.rubySass('src/sass/pattern-lab.scss', {
@@ -143,10 +127,9 @@ gulp.task('build:js-pattern', ['build:js-viewer'], function() {
143127

144128
gulp.task(
145129
'default',
146-
['build:bower', 'build:css', 'build:html', 'build:js-pattern'],
130+
['build:css', 'build:html', 'build:js-pattern'],
147131
function() {
148132
if (args.watch !== undefined) {
149-
gulp.watch(['src/bower_components/**/*'], ['build:bower']);
150133
gulp.watch(
151134
['src/sass/pattern-lab.scss', 'src/sass/scss/**/*'],
152135
['build:css']

packages/uikit-workshop/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,19 @@
3535
"gulp-uglify": "1.1.0",
3636
"gulp-util": "3.0.0",
3737
"imagemin-pngcrush": "0.1.0",
38-
"main-bower-files": "1.0.2",
3938
"yargs": "1.2.6"
4039
},
4140
"publishConfig": {
4241
"access": "public"
4342
},
4443
"dependencies": {
45-
"bower": "1.8.2"
44+
"clipboard": "^2.0.1",
45+
"jquery": "^3.3.1",
46+
"prism": "^4.1.2",
47+
"typeahead.js": "^0.11.1",
48+
"hogan.js": "^3.0.2",
49+
"scriptjs": "^2.5.8",
50+
"wolfy87-eventemitter": "^5.2.4",
51+
"fg-loadjs": "^1.0.0"
4652
}
4753
}

packages/uikit-workshop/src/html/index.html

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
<body class="pl-c-body">
1212

13-
@@include('./partials/header.html')
14-
15-
@@include('./partials/iframe.html')
16-
13+
@@include('./partials/header.html')
14+
15+
@@include('./partials/iframe.html')
16+
1717
@@include('./partials/modal.html')
1818

1919
<!-- mustache templates -->
@@ -64,20 +64,6 @@
6464

6565
<script src="annotations/annotations.js"></script>
6666

67-
<!-- load Pattern Lab external library js -->
68-
<script src="styleguide/bower_components/jquery.min.js"></script>
69-
<script src="styleguide/bower_components/hogan-3.0.2.min.js"></script>
70-
<script src="styleguide/bower_components/prism.min.js"></script>
71-
<script src="styleguide/bower_components/jwerty.min.js"></script>
72-
<script src="styleguide/bower_components/typeahead.bundle.min.js"></script>
73-
<script src="styleguide/bower_components/EventEmitter.min.js"></script>
74-
<script src="styleguide/bower_components/script.min.js"></script>
75-
76-
<!-- set-up the dispatcher -->
77-
<script>
78-
var Dispatcher = new EventEmitter();
79-
</script>
80-
8167
<!-- load the Pattern Lab viewer js -->
8268
<script src="styleguide/js/patternlab-viewer.js"></script>
8369

0 commit comments

Comments
 (0)