hytopia 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/bin/scripts.js +18 -0
  2. package/package.json +4 -4
package/bin/scripts.js ADDED
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env node
2
+
3
+ const fs = require('fs');
4
+ const path = require('path');
5
+ const command = process.argv[2];
6
+
7
+ if (command === 'init') {
8
+ const srcDir = path.join(__dirname, '..', 'boilerplate');
9
+ const destDir = process.cwd();
10
+
11
+ fs.cpSync(srcDir, destDir, { recursive: true });
12
+
13
+ console.log('🚀 Hytopia project initialized successfully!');
14
+ console.log('💡 Start your development server with `bun --watch index.ts`!');
15
+ return;
16
+ }
17
+
18
+ console.log('Unknown command: ' + command);
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "hytopia",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "The HYTOPIA SDK makes it easy for developers to create multiplayer games on the HYTOPIA platform using JavaScript or TypeScript.",
5
5
  "main": "server.js",
6
+ "bin": {
7
+ "hytopia": "bin/scripts.js"
8
+ },
6
9
  "directories": {
7
10
  "doc": "docs",
8
11
  "example": "examples"
9
12
  },
10
- "scripts": {
11
- "init": "cp -r boilerplate/* ."
12
- },
13
13
  "repository": {
14
14
  "type": "git",
15
15
  "url": "git+https://github.com/hytopiagg/sdk.git"