@m00rl0ck/simple-builder 1.0.2 → 1.0.4

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.
package/dev-server.js CHANGED
@@ -95,33 +95,6 @@ function triggerReload() {
95
95
  });
96
96
  }
97
97
 
98
- // ======================
99
- // šŸ‘€ WATCH
100
- // ======================
101
-
102
- function watch() {
103
- const SRC_DIR = path.join(ROOT, 'src');
104
-
105
- build();
106
-
107
- fs.watch(SRC_DIR, { recursive: true }, () => {
108
- console.log('šŸ”„ Rebuilding...');
109
- build();
110
- triggerReload();
111
- });
112
- }
113
-
114
- // ======================
115
- // šŸ‘€ BUILD
116
- // ======================
117
- export function build({ watch }) {
118
- if (!!watch) {
119
- return watch();
120
- } else {
121
- return build();
122
- }
123
- }
124
-
125
98
  // ======================
126
99
  // šŸš€ SERVER
127
100
  // ======================
package/index.js CHANGED
@@ -117,7 +117,11 @@ function watch() {
117
117
  // šŸš€ BUILD
118
118
  // ======================
119
119
 
120
- export function build() {
120
+ export function build({ watch }) {
121
+ if (watch) {
122
+ return watch();
123
+ }
124
+
121
125
  console.log(`\nšŸš€ Build started (${isProd ? 'production' : 'development'})`);
122
126
 
123
127
  cleanDist();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m00rl0ck/simple-builder",
3
- "version": "1.0.2",
4
- "description": "Zero-dependency JS bundler with dev server and minifier",
3
+ "version": "1.0.4",
4
+ "description": "Zero-dependency JS and CSS bundler with dev server and minifier",
5
5
  "type": "module",
6
6
  "main": "index.js",
7
7
  "bin": {