Skip to content

Commit 05478a4

Browse files
castastrophemwcz
authored andcommitted
Add rollup task to all gulpfiles in elements (#128)
* Add rollup task to all gulpfiles in elements * Add shell require to rh-overpass * Update package.json with shell install * Update build task to use series * Move default task into series * More gulpfile updates and some changes to rh-icon as a result of the gulpfile changes * adding map files * remove rollup from npm build script
1 parent 481b41b commit 05478a4

38 files changed

+5727
-5592
lines changed

elements/rh-button/gulpfile.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const stripCssComments = require("strip-css-comments");
88
const trim = require("trim");
99
const decomment = require("decomment");
1010
const sass = require("node-sass");
11+
const shell = require("gulp-shell");
1112

1213
gulp.task("compile", () => {
1314
return gulp
@@ -26,10 +27,6 @@ gulp.task("compile", () => {
2627
.pipe(gulp.dest("./"));
2728
});
2829

29-
gulp.task("watch", () => {
30-
return gulp.watch("./src/*", gulp.series("merge", "compile"));
31-
});
32-
3330
gulp.task("merge", () => {
3431
return gulp
3532
.src("./src/rh-button.js")
@@ -88,6 +85,14 @@ ${html}\`;
8885
.pipe(gulp.dest("./"));
8986
});
9087

91-
gulp.task("default", gulp.series("merge", "compile"));
88+
gulp.task("watch", () => {
89+
return gulp.watch("./src/*", gulp.series("build"));
90+
});
91+
92+
gulp.task("bundle", shell.task("../../node_modules/.bin/rollup -c"));
93+
94+
gulp.task("build", gulp.series("merge", "compile", "bundle"));
95+
96+
gulp.task("default", gulp.series("build"));
9297

93-
gulp.task("dev", gulp.series("merge", "compile", "watch"));
98+
gulp.task("dev", gulp.series("build", "watch"));

elements/rh-button/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
"main": "index.js",
1414
"scripts": {
15-
"build": "../../node_modules/.bin/gulp && ../../node_modules/.bin/rollup -c && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}'",
15+
"build": "../../node_modules/.bin/gulp && ../../node_modules/.bin/prettier --ignore-path ../../.prettierignore --write '**/*.{js,json}'",
1616
"dev": "../../node_modules/.bin/gulp dev",
1717
"test": "../../node_modules/.bin/wct --configFile ../../wct.conf.json node_modules/@rhelements/rh-button/test/"
1818
},

elements/rh-button/rh-button.js

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elements/rh-button/rh-button.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elements/rh-button/rh-button.umd.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elements/rh-button/rh-button.umd.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

elements/rh-card/gulpfile.js

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const stripCssComments = require("strip-css-comments");
88
const trim = require("trim");
99
const decomment = require("decomment");
1010
const sass = require("node-sass");
11+
const shell = require("gulp-shell");
1112

1213
gulp.task("compile", () => {
1314
return gulp
@@ -26,10 +27,6 @@ gulp.task("compile", () => {
2627
.pipe(gulp.dest("./"));
2728
});
2829

29-
gulp.task("watch", () => {
30-
return gulp.watch("./src/*", gulp.series("merge", "compile"));
31-
});
32-
3330
gulp.task("merge", () => {
3431
return gulp
3532
.src("./src/rh-card.js")
@@ -88,6 +85,14 @@ ${html}\`;
8885
.pipe(gulp.dest("./"));
8986
});
9087

91-
gulp.task("default", gulp.series("merge", "compile"));
88+
gulp.task("watch", () => {
89+
return gulp.watch("./src/*", ["build"]);
90+
});
91+
92+
gulp.task("bundle", shell.task("../../node_modules/.bin/rollup -c"));
93+
94+
gulp.task("build", gulp.series("merge", "compile", "bundle"));
95+
96+
gulp.task("default", gulp.series("build"));
9297

93-
gulp.task("dev", gulp.series("merge", "compile", "watch"));
98+
gulp.task("dev", gulp.series("build", "watch"));

0 commit comments

Comments
 (0)