@m00rl0ck/simple-builder 1.0.6 → 1.0.9

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
@@ -111,10 +111,12 @@ const server = http.createServer((req, res) => {
111
111
  // ▶️ START
112
112
  // ======================
113
113
 
114
- export function renServer({ isProd }) {
114
+ function runServer({ isProd }) {
115
115
  build({ watch: true, isProd })
116
116
 
117
117
  server.listen(PORT, () => {
118
118
  console.log(`\n🚀 Dev server running: http://localhost:${PORT}\n`);
119
119
  });
120
120
  }
121
+
122
+ export { build, runServer };
package/index.js CHANGED
@@ -96,7 +96,7 @@ function buildHTML(isProd) {
96
96
  // 👀 WATCH MODE
97
97
  // ======================
98
98
 
99
- function watch() {
99
+ function watchBuild() {
100
100
  console.log('👀 Watch mode ON...\n');
101
101
 
102
102
  fs.watch(SRC_DIR, { recursive: true }, (eventType, filename) => {
@@ -116,7 +116,7 @@ function watch() {
116
116
 
117
117
  export function build({ watch, isProd }) {
118
118
  if (!!watch) {
119
- return watch();
119
+ return watchBuild();
120
120
  }
121
121
 
122
122
  console.log(`\n🚀 Build started (${isProd} ? 'production' : 'development')`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m00rl0ck/simple-builder",
3
- "version": "1.0.6",
3
+ "version": "1.0.9",
4
4
  "description": "Zero-dependency JS and CSS bundler with dev server and minifier",
5
5
  "type": "module",
6
6
  "main": "index.js",