Skip to content

Commit 87dd04e

Browse files
committed
chore: remove old JS build scripts from Gulp; add missing deps to package.json
1 parent 2ed013f commit 87dd04e

File tree

2 files changed

+23
-63
lines changed

2 files changed

+23
-63
lines changed

packages/uikit-workshop/gulpfile.js

Lines changed: 8 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -81,61 +81,12 @@ gulp.task('build:images', ['clean:images'], function() {
8181
.pipe(copyPublic('styleguide/images'));
8282
});
8383

84-
gulp.task('build:js-viewer', ['clean:js'], function() {
85-
return gulp
86-
.src(['src/js/*.js', '!src/js/modal-styleguide.js'])
87-
.pipe(plugins.jshint('.jshintrc'))
88-
.pipe(plugins.jshint.reporter('default'))
89-
.pipe(
90-
plugins.resolveDependencies({ pattern: /\* @requires [\s-]*(.*?\.js)/g })
91-
)
92-
.on('error', function(err) {
93-
console.log(err.message);
94-
})
95-
.pipe(plugins.concat('patternlab-viewer.js'))
96-
.pipe(gulp.dest('dist/styleguide/js'))
97-
.pipe(plugins.rename({ suffix: '.min' }))
98-
.pipe(plugins.uglify())
99-
.pipe(gulp.dest('dist/styleguide/js'))
100-
.pipe(copyPublic('styleguide/js'));
101-
});
102-
103-
gulp.task('build:js-pattern', ['build:js-viewer'], function() {
104-
// 'src/js/annotations-pattern.js','src/js/code-pattern.js','src/js/info-panel.js'
105-
return gulp
106-
.src([
107-
'src/js/postmessage.js',
108-
'src/js/panels-shared.js',
109-
'src/js/clipboard.min.js',
110-
'src/js/modal-styleguide.js',
111-
])
112-
.pipe(plugins.jshint('.jshintrc'))
113-
.pipe(plugins.jshint.reporter('default'))
114-
.pipe(
115-
plugins.resolveDependencies({ pattern: /\* @requires [\s-]*(.*?\.js)/g })
116-
)
117-
.on('error', function(err) {
118-
console.log(err.message);
119-
})
120-
.pipe(plugins.concat('patternlab-pattern.js'))
121-
.pipe(gulp.dest('dist/styleguide/js'))
122-
.pipe(plugins.rename({ suffix: '.min' }))
123-
.pipe(plugins.uglify())
124-
.pipe(gulp.dest('dist/styleguide/js'))
125-
.pipe(copyPublic('styleguide/js'));
126-
});
127-
128-
gulp.task(
129-
'default',
130-
['build:css', 'build:html', 'build:js-pattern'],
131-
function() {
132-
if (args.watch !== undefined) {
133-
gulp.watch(
134-
['src/sass/pattern-lab.scss', 'src/sass/scss/**/*'],
135-
['build:css']
136-
);
137-
gulp.watch(['src/html/*'], ['build:html']);
138-
gulp.watch(['src/js/*'], ['build:js-pattern']);
139-
}
84+
gulp.task('default', ['build:css', 'build:html'], function() {
85+
if (args.watch !== undefined) {
86+
gulp.watch(
87+
['src/sass/pattern-lab.scss', 'src/sass/scss/**/*'],
88+
['build:css']
89+
);
90+
gulp.watch(['src/html/*'], ['build:html']);
14091
}
141-
);
92+
});

packages/uikit-workshop/package.json

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"version": "1.0.0-alpha.7",
44
"description": "Front-end assets and templates for the default Pattern Lab workshop view",
55
"main": "gulpfile.js",
6-
"scripts": {},
6+
"scripts": {
7+
"build": "gulp && npx webpack-cli --config webpack.config.js --progress"
8+
},
79
"authors": [
810
{
911
"name": "Brad Frost",
@@ -35,19 +37,26 @@
3537
"gulp-uglify": "1.1.0",
3638
"gulp-util": "3.0.0",
3739
"imagemin-pngcrush": "0.1.0",
38-
"yargs": "1.2.6"
40+
"yargs": "1.2.6",
41+
"uglifyjs-webpack-plugin": "^1.2.7",
42+
"webpack": "4.16.3",
43+
"@babel/core": "^7.0.0-beta.55",
44+
"babel-loader": "^8.0.0-beta.4",
45+
"@babel/preset-env": "^7.0.0-beta.55"
3946
},
4047
"publishConfig": {
4148
"access": "public"
4249
},
4350
"dependencies": {
4451
"clipboard": "^2.0.1",
52+
"fg-loadjs": "^1.0.0",
53+
"hogan.js": "^3.0.2",
4554
"jquery": "^3.3.1",
55+
"mousetrap": "^1.6.2",
4656
"prism": "^4.1.2",
47-
"typeahead.js": "^0.11.1",
48-
"hogan.js": "^3.0.2",
57+
"prismjs": "^1.15.0",
4958
"scriptjs": "^2.5.8",
50-
"wolfy87-eventemitter": "^5.2.4",
51-
"fg-loadjs": "^1.0.0"
59+
"typeahead.js": "^0.11.1",
60+
"wolfy87-eventemitter": "^5.2.4"
5261
}
5362
}

0 commit comments

Comments
 (0)