Skip to content

Commit

Permalink
initial outline towards TS application
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeseese committed Mar 1, 2020
1 parent 26084db commit c0e6177
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
lib/
download/
dump/
node_modules/
Expand Down
2 changes: 1 addition & 1 deletion src/downloader.js → js/downloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ global.epic_api = (global.epic_api === undefined) ? require("./epic_api.js") : g
const prompt = require("prompt");
const cheerio = require("cheerio");
const menu = require("console-menu");
const dotenv = require("dotenv").config();
require("dotenv").config();

// Takes an HTML form from cheerio.serializeArray() and converts it to an object suitable for the "request" module
function SerializeLoginFormArray(form) {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"name": "ue4-mp-downloader",
"version": "2.0.0",
"description": "Downloads owned assets from the UE4 marketplace from a shell.",
"main": "src/index.js",
"bin": {
"ue4-mp-downloader": "src/ue4-mp-downloader.js"
},
"scripts": {
"build": "tsc",
"start": "node src/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand All @@ -21,13 +21,16 @@
"dotenv": "^8.2.0",
"fs": "0.0.1-security",
"jquery": "^3.2.1",
"mem": ">=4.0.0",
"mkdirp": "^0.5.1",
"open": "7.0.2",
"progress": "^2.0.0",
"prompt": "^1.0.0",
"request": "^2.81.0",
"rimraf": "^2.6.1",
"yargs": "^8.0.2",
"mem": ">=4.0.0"
"yargs": "^8.0.2"
},
"devDependencies": {
"typescript": "^3.8.3"
}
}
38 changes: 38 additions & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"compilerOptions": {
/* Basic Options */
"target": "ES2017", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */
"declaration": true, /* Generates corresponding '.d.ts' file. */
"declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
"outDir": "lib", /* Redirect output structure to the directory. */
"rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */

/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */

/* Additional Checks */
"noUnusedLocals": true, /* Report errors on unused locals. */
"noUnusedParameters": true, /* Report errors on unused parameters. */
"noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
"noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
"skipLibCheck": true, /* If transitive dependencies have typing errors, ignore them. */

/* Module Resolution Options */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"resolveJsonModule": true,

/* Source Map Options */
"inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */

/* Experimental Options */
"experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
"emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */

"typeRoots": [ "./types", "./node_modules/@types" ],
},
"include": [
"src/**/*.json",
"src/**/*.ts"
]
}
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1081,6 +1081,11 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0:
resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64"
integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=

typescript@^3.8.3:
version "3.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==

uri-js@^4.2.2:
version "4.2.2"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
Expand Down

0 comments on commit c0e6177

Please sign in to comment.