Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit 50f8399

Browse files
authored
Merge pull request #8 from justcoded/develop
Develop
2 parents 68140f0 + 12122b9 commit 50f8399

4 files changed

Lines changed: 26 additions & 4 deletions

File tree

helpers/notifier.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ module.exports = {
1212

1313
console.log(`\u{1b}[31m[ ${title} ]\u{1b}[0m`);
1414
console.log(`\u{1b}[33m${error}\u{1b}[0m`);
15+
console.log(error);
1516

1617
return callback ? callback() : null;
1718
},

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
"gulp-sass": "4.0.2",
4343
"gulp-sourcemaps": "2.6.5",
4444
"htmlhint-stylish": "1.0.3",
45-
"node-notifier": "6.0.0",
45+
"node-notifier": "7.0.0",
4646
"postcss-import": "12.0.1",
4747
"postcss-sort-media-queries": "1.4.23",
48-
"rollup": "2.2.0",
48+
"rollup": "2.7.1",
4949
"rollup-plugin-babel": "4.4.0",
5050
"sass": "1.26.3"
5151
},

tasks/build-js-vendors.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,32 @@ module.exports = function () {
2626
babel(),
2727
],
2828
onwarn(warning, warn) {
29+
// skip certain warnings
30+
if (
31+
warning.code === 'UNUSED_EXTERNAL_IMPORT'
32+
|| warning.code === 'THIS_IS_UNDEFINED'
33+
|| warning.code === 'NON_EXISTENT_EXPORT'
34+
)
35+
return;
36+
2937
throw new Error(warning.message);
3038
},
3139
});
3240

3341
const tempJs = await bundle.write({
3442
file: `./${global.folder.temp}/js/${global.file.vendorJsTemp}`,
35-
format: 'iife',
43+
format: 'esm',
3644
name: 'vendor',
3745
sourcemap: false,
3846
});
3947
const tempJsFileName = tempJs.output[0].fileName;
4048

41-
gulp.src(filesExist([...vendorFiles, `./${global.folder.temp}/js/${tempJsFileName}`]))
49+
gulp.src(
50+
filesExist([
51+
...vendorFiles,
52+
`./${global.folder.temp}/js/${tempJsFileName}`,
53+
]),
54+
)
4255
.pipe(concat(global.file.vendorJs))
4356
.pipe(gulp.dest(`../${global.folder.build}/js`));
4457
} catch (error) {

tasks/build-js.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ module.exports = function () {
2121
babel(),
2222
],
2323
onwarn(warning, warn) {
24+
// skip certain warnings
25+
if (
26+
warning.code === 'UNUSED_EXTERNAL_IMPORT'
27+
|| warning.code === 'THIS_IS_UNDEFINED'
28+
|| warning.code === 'NON_EXISTENT_EXPORT'
29+
)
30+
return;
31+
2432
throw new Error(warning.message);
2533
},
2634
});

0 commit comments

Comments
 (0)