@rr0/cms 0.1.11 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,5 @@
1
1
  export * from "./Book.js";
2
2
  export * from "./BookContentVisitor.js";
3
3
  export * from "./BookDirectoryStep.js";
4
- export * from "./BookImport.js";
5
4
  export * from "./BookService.js";
6
5
  export * from "./Chapters.js";
@@ -1,6 +1,5 @@
1
1
  export * from "./Book.js";
2
2
  export * from "./BookContentVisitor.js";
3
3
  export * from "./BookDirectoryStep.js";
4
- export * from "./BookImport.js";
5
4
  export * from "./BookService.js";
6
5
  export * from "./Chapters.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@rr0/cms",
3
3
  "type": "module",
4
4
  "author": "rr0@rr0.org",
5
- "version": "0.1.11",
5
+ "version": "0.1.12",
6
6
  "description": "Content Management System",
7
7
  "exports": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
@@ -1 +0,0 @@
1
- export {};
@@ -1,27 +0,0 @@
1
- import { ConsoleLogger } from "ssg-api";
2
- import { CLI } from "../util/cli/CLI.js";
3
- import { BookService } from "./BookService.js";
4
- import { PeopleService } from "../people/PeopleService.js";
5
- import { AllDataService } from "../data/AllDataService.js";
6
- import { PeopleFactory } from "../people/PeopleFactory.js";
7
- import { RR0EventFactory } from "../event/RR0EventFactory.js";
8
- import { TypedDataFactory } from "../data/TypedDataFactory.js";
9
- import path from "path";
10
- const logger = new ConsoleLogger("rr0-books");
11
- const args = new CLI().getArgs();
12
- const fileName = args.import;
13
- const dry = args.dry === "true";
14
- const peopleFactory = new PeopleFactory(new RR0EventFactory());
15
- const eventFactory = new RR0EventFactory();
16
- const bookFactory = new TypedDataFactory(eventFactory, "book");
17
- const dataService = new AllDataService([bookFactory, peopleFactory]);
18
- const outDir = "out";
19
- const config = {
20
- getOutputPath(context) {
21
- return path.join(outDir, context.file.name);
22
- }
23
- };
24
- const books = new BookService(logger, dry, new PeopleService(dataService, peopleFactory), config);
25
- books.import(fileName).then((result) => {
26
- logger.log("Wrote", result.length, "books");
27
- });