Browse Source

Clean up server files. Add build task

Tatiana Inama 6 years ago
parent
commit
1c867e0061
8 changed files with 6 additions and 276 deletions
  1. 1 1
      .gitignore
  2. 0 1
      scraper/bugs.json
  3. 0 1
      scraper/fish.json
  4. 0 126
      scraper/index.js
  5. 0 143
      scraper/index.ts
  6. 2 1
      scraper/package.json
  7. 1 1
      scraper/server.ts
  8. 2 2
      scraper/tsconfig.json

+ 1 - 1
.gitignore

@@ -9,7 +9,7 @@ node_modules
 /coverage
 
 # production
-/build
+*/build
 
 # misc
 .DS_Store

File diff suppressed because it is too large
+ 0 - 1
scraper/bugs.json


File diff suppressed because it is too large
+ 0 - 1
scraper/fish.json


File diff suppressed because it is too large
+ 0 - 126
scraper/index.js


File diff suppressed because it is too large
+ 0 - 143
scraper/index.ts


+ 2 - 1
scraper/package.json

@@ -5,7 +5,8 @@
   "main": "index.js",
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1",
-    "start": "nodemon"
+    "start": "nodemon",
+    "build": "rm -rf ./build & tsc"
   },
   "author": "Tatiana Inama",
   "license": "ISC",

+ 1 - 1
scraper/server.ts

@@ -1,6 +1,6 @@
 import express from 'express';
 import dotenv from 'dotenv'
-import { saveImage, scrapeCritters, CONFIG, storeData } from './src/scraper';
+import { saveImage, scrapeCritters, CONFIG, storeData } from './scraper';
 
 const app: express.Application = express();
 

+ 2 - 2
scraper/tsconfig.json

@@ -12,8 +12,8 @@
     // "declarationMap": true,                /* Generates a sourcemap for each corresponding '.d.ts' file. */
     // "sourceMap": true,                     /* Generates corresponding '.map' file. */
     // "outFile": "./",                       /* Concatenate and emit output to single file. */
-    // "outDir": "./",                        /* Redirect output structure to the directory. */
-    // "rootDir": "./",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
+    "outDir": "./build",                      /* Redirect output structure to the directory. */
+    "rootDir": "./src",                       /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
     // "composite": true,                     /* Enable project compilation */
     // "tsBuildInfoFile": "./",               /* Specify file to store incremental compilation information */
     // "removeComments": true,                /* Do not emit comments to output. */