-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated generate-enums script to generate TS enums
- Loading branch information
1 parent
2b810a2
commit 233cc14
Showing
229 changed files
with
6,506 additions
and
298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
const FS = require('fs'); | ||
const Path = require('path'); | ||
|
||
deleteDirectory(Path.join(__dirname, '..', 'dist')); | ||
|
||
function deleteDirectory(dirName) { | ||
if (!FS.existsSync(dirName)) { | ||
return; | ||
} | ||
|
||
FS.readdirSync(dirName).forEach((filename) => { | ||
let filePath = Path.join(dirName, filename); | ||
|
||
let stat = FS.statSync(filePath); | ||
if (stat.isDirectory()) { | ||
deleteDirectory(filePath); | ||
} else { | ||
FS.unlinkSync(filePath); | ||
} | ||
}); | ||
|
||
FS.rmdirSync(dirName); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
const {EventEmitter} = require('events'); | ||
import {EventEmitter} from 'events'; | ||
|
||
const HandlerManager = require('./classes/HandlerManager.js'); | ||
import {HandlerManager} from './classes/HandlerManager'; | ||
|
||
/** | ||
* I admit, this is a pretty unorthodox pattern, but this is the only way I've found to define a class across multiple | ||
* files while also making sure that IDE intellisense can figure out which methods belong to the final class. | ||
* | ||
* Inheritance follows filenames sorted alphabetically with numbers first. | ||
*/ | ||
class SteamUserBase extends EventEmitter {} | ||
class SteamUserBase extends EventEmitter { | ||
_handlerManager: HandlerManager; | ||
} | ||
|
||
SteamUserBase.prototype._handlerManager = new HandlerManager(); | ||
|
||
module.exports = SteamUserBase; | ||
export default SteamUserBase; |
Oops, something went wrong.