mirror of
https://github.com/snobu/destreamer.git
synced 2026-02-19 04:49:42 +00:00
Merge 278e73c319 into 516ca54ff1
This commit is contained in:
18
bin/destreamer
Normal file
18
bin/destreamer
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
/* tslint:disable */
|
||||||
|
// check if we're running in dev mode
|
||||||
|
var devMode = require('fs').existsSync(`${__dirname}/../src`);
|
||||||
|
// or want to "force" running the compiled version with --compiled-build
|
||||||
|
var wantsCompiled = process.argv.indexOf('--compiled-build') >= 0;
|
||||||
|
|
||||||
|
if (wantsCompiled || !devMode) {
|
||||||
|
// this runs from the compiled javascript source
|
||||||
|
require(`${__dirname}/../build/src/destreamer`).run(process.argv);
|
||||||
|
} else {
|
||||||
|
// this runs from the typescript source (for dev only)
|
||||||
|
// hook into ts-node so we can run typescript on the fly
|
||||||
|
require('ts-node').register({ project: `${__dirname}/../tsconfig.json` });
|
||||||
|
// run the CLI with the current process arguments
|
||||||
|
require(`${__dirname}/../src/destreamer`).run(process.argv);
|
||||||
|
}
|
||||||
4692
package-lock.json
generated
4692
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,9 @@
|
|||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"description": "Save Microsoft Stream videos for offline enjoyment.",
|
"description": "Save Microsoft Stream videos for offline enjoyment.",
|
||||||
"main": "build/src/destreamer.js",
|
"main": "build/src/destreamer.js",
|
||||||
"bin": "build/src/destreamer.js",
|
"bin": {
|
||||||
|
"destreamer": "bin/destreamer"
|
||||||
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "echo Transpiling TypeScript to JavaScript... && node node_modules/typescript/bin/tsc && echo Destreamer was built successfully.",
|
"build": "echo Transpiling TypeScript to JavaScript... && node node_modules/typescript/bin/tsc && echo Destreamer was built successfully.",
|
||||||
"test": "mocha build/test",
|
"test": "mocha build/test",
|
||||||
@@ -26,7 +28,8 @@
|
|||||||
"@typescript-eslint/parser": "^4.9.0",
|
"@typescript-eslint/parser": "^4.9.0",
|
||||||
"eslint": "^7.14.0",
|
"eslint": "^7.14.0",
|
||||||
"mocha": "^8.2.1",
|
"mocha": "^8.2.1",
|
||||||
"tmp": "^0.2.1"
|
"tmp": "^0.2.1",
|
||||||
|
"ts-node": "^10.4.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tedconf/fessonia": "^2.1.2",
|
"@tedconf/fessonia": "^2.1.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user