@tmbr/bundler 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/cli.js +33 -0
  2. package/package.json +3 -2
package/cli.js CHANGED
@@ -7,6 +7,7 @@ const qrcode = require('qrcode-terminal');
7
7
  const chalk = require('chalk');
8
8
  const bs = require('browser-sync').create();
9
9
  const renderError = require('./error');
10
+ // const webfontsGenerator = require('webfonts-generator'); // OPTIONAL ICON FONT BUILDER UNCOMMENT TO USE
10
11
 
11
12
  const cwd = process.cwd();
12
13
  const package = require(`${cwd}/package.json`);
@@ -30,6 +31,38 @@ const assets = (options = {}) => ({
30
31
  },
31
32
  });
32
33
 
34
+ // OPTIONAL ICON FONT BUILDER. CREATE /ICONS FOLDER AND UNCOMMENT TO USE
35
+ // ADD SVG FILES INTO FOLDER AND ADD TO FILES LIST BELOW
36
+ // ADD TO INDEX.SCSS: @import "../fonts/tmbr-icons.css";
37
+ // webfontsGenerator({
38
+ // files: [
39
+ // './icons/angle-left.svg',
40
+ // ],
41
+ // dest: './fonts/',
42
+ // fontName: 'tmbr-icons',
43
+ // templateOptions: {
44
+ // baseClass: 'icon',
45
+ // classPrefix: 'icon-'
46
+ // },
47
+ // types: ['woff2', 'woff', 'svg']
48
+ // }, function(error) {
49
+ // if (error) {
50
+ // console.log('Fail!', error);
51
+ // } else {
52
+ // console.log('Icon Font Built');
53
+ // }
54
+ // });
55
+
56
+ const errors = (options = {}) => ({
57
+ name: 'errors',
58
+ setup(build) {
59
+ build.onEnd(result => {
60
+ error = result.errors[0];
61
+ error && bs.reload();
62
+ });
63
+ },
64
+ });
65
+
33
66
  const errors = (options = {}) => ({
34
67
  name: 'errors',
35
68
  setup(build) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tmbr/bundler",
3
3
  "author": "TMBR (https://wearetmbr.com/)",
4
- "version": "1.2.2",
4
+ "version": "1.3.0",
5
5
  "license": "MIT",
6
6
  "repository": "https://github.com/TMBR/tmbr-bundler",
7
7
  "description": "WordPress development toolkit built on esbuild and browser-sync",
@@ -14,6 +14,7 @@
14
14
  "esbuild": "^0.14.47",
15
15
  "esbuild-sass-plugin": "^2.2.6",
16
16
  "html-entities": "^2.3.2",
17
- "qrcode-terminal": "^0.12.0"
17
+ "qrcode-terminal": "^0.12.0",
18
+ "webfonts-generator": "^0.4.0"
18
19
  }
19
20
  }