frontend-hamroun 1.1.35 → 1.1.37
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/package.json
CHANGED
@@ -6,19 +6,14 @@
|
|
6
6
|
"scripts": {
|
7
7
|
"dev": "node server.js",
|
8
8
|
"build": "node esbuild.config.js",
|
9
|
-
"lint": "eslint src --ext ts,tsx
|
10
|
-
"lint:fix": "eslint src --ext ts,tsx --fix"
|
9
|
+
"lint": "eslint src --ext ts,tsx"
|
11
10
|
},
|
12
11
|
"dependencies": {
|
13
12
|
"frontend-hamroun": "latest"
|
14
13
|
},
|
15
14
|
"devDependencies": {
|
16
|
-
"typescript": "^5.0.0",
|
17
15
|
"esbuild": "^0.19.2",
|
18
|
-
"
|
19
|
-
"
|
20
|
-
"eslint": "^8.45.0",
|
21
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
22
|
-
"live-server": "^1.2.2"
|
16
|
+
"sirv-cli": "^2.0.2",
|
17
|
+
"typescript": "^5.0.0"
|
23
18
|
}
|
24
19
|
}
|
@@ -1,27 +1,24 @@
|
|
1
1
|
import { spawn } from 'child_process';
|
2
|
-
import
|
2
|
+
import sirv from 'sirv';
|
3
|
+
import http from 'http';
|
3
4
|
|
4
5
|
// Start esbuild in watch mode
|
5
6
|
const esbuild = spawn('node', ['esbuild.config.js', '--watch'], {
|
6
7
|
stdio: 'inherit'
|
7
8
|
});
|
8
9
|
|
9
|
-
//
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
open: true,
|
15
|
-
wait: 1000,
|
16
|
-
logLevel: 2
|
17
|
-
};
|
10
|
+
// Create simple static server
|
11
|
+
const serve = sirv('.', {
|
12
|
+
dev: true,
|
13
|
+
single: true
|
14
|
+
});
|
18
15
|
|
19
|
-
|
16
|
+
const server = http.createServer(serve);
|
17
|
+
server.listen(3000);
|
18
|
+
console.log('Server running at http://localhost:3000');
|
20
19
|
|
21
|
-
// Handle process termination
|
22
|
-
// eslint-disable-next-line no-undef
|
23
20
|
process.on('SIGTERM', () => {
|
24
21
|
esbuild.kill();
|
25
|
-
|
22
|
+
server.close();
|
26
23
|
process.exit();
|
27
24
|
});
|