1 | ;
|
2 | var __importDefault = (this && this.__importDefault) || function (mod) {
|
3 | return (mod && mod.__esModule) ? mod : { "default": mod };
|
4 | };
|
5 | Object.defineProperty(exports, "__esModule", { value: true });
|
6 | const Doer_1 = __importDefault(require("./Doer"));
|
7 | /**
|
8 | * A base class for language parsers
|
9 | *
|
10 | * A language `Parser` generates a JSON-LD `SoftwarePackage` instance based on the
|
11 | * contents of a directory. It is responsible for determining which packages the application
|
12 | * needs, resolving the dependencies of those packages (both system and language packages) and
|
13 | * turning those into a JSON-LD `SoftwarePackage` instance.
|
14 | *
|
15 | * If the `Parser` finds a corresponding requirements file for the language (e.g. `requirements.txt` for Python),
|
16 | * then it uses that to determine the language packages to install. If no requirements file is found,
|
17 | * it scans for source code files for package import statements (e.g. `library(package)` in `.R` files),
|
18 | * generates a package list from those statements and creates a requirements file.
|
19 | */
|
20 | class Parser extends Doer_1.default {
|
21 | }
|
22 | exports.default = Parser;
|