reorg files for faster dev time.

This commit is contained in:
Pilot 2020-12-01 20:14:49 -05:00 committed by pilot
parent ca79cd2d86
commit 43a15bd6b5
6 changed files with 33 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
*.log
node_modules
*.js
dist/

27
.vscode/launch.json vendored Normal file
View File

@ -0,0 +1,27 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"sourceMaps": true,
"smartStep": true,
"request": "launch",
"name": "Launch Program",
"skipFiles": [
"<node_internals>/**",
"${workspaceFolder}/node_modules/**"
],
"cwd": "${workspaceFolder}",
"runtimeExecutable": "yarn",
"runtimeArgs": ["run", "test"],
"program": "${workspaceFolder}/dist/2020-day-01.js",
"outFiles": [
"${workspaceFolder}/dist/**/*.js"
],
"console": "integratedTerminal"
}
]
}

View File

@ -7,7 +7,7 @@
},
"type": "module",
"scripts": {
"test": "mocha 2020-*.js",
"test": "mocha",
"pretest": "tsc"
}
}

View File

@ -3,7 +3,7 @@ import { readFileSync } from 'fs';
import 'mocha';
let input = readFileSync('./input-01.txt', 'utf-8')
let input = readFileSync('./input/2020-day-01.txt', 'utf-8')
.split('\n')
.map(l => parseInt(l.trim(), 10));

View File

@ -12,10 +12,10 @@
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' 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": "./dist", /* 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. */