framer-cms-markdown 0.0.3 → 0.0.5
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.
- package/dist/src/framer-to-markdown/cli.js +1 -1
- package/dist/src/framer-to-markdown/export.js +4 -4
- package/dist/src/framer-to-markdown/index.js +3 -3
- package/dist/src/markdown-to-framer/cli.js +1 -1
- package/dist/src/markdown-to-framer/import.js +5 -5
- package/dist/src/markdown-to-framer/index.js +3 -3
- package/package.json +4 -1
- package/src/framer-to-markdown/cli.ts +1 -1
- package/src/framer-to-markdown/export.ts +5 -5
- package/src/framer-to-markdown/index.ts +4 -3
- package/src/markdown-to-framer/cli.ts +1 -1
- package/src/markdown-to-framer/import.ts +5 -5
- package/src/markdown-to-framer/index.ts +3 -3
- package/dist/src/framer-to-markdown/config.js +0 -1
- package/dist/src/framer-to-markdown/filename.js +0 -1
- package/dist/src/framer-to-markdown/format.js +0 -1
- package/dist/src/framer-to-markdown/framer-client.js +0 -1
- package/dist/src/framer-to-markdown/frontmatter.js +0 -1
- package/dist/src/framer-to-markdown/markdown.js +0 -1
- package/src/framer-to-markdown/config.ts +0 -4
- package/src/framer-to-markdown/filename.ts +0 -5
- package/src/framer-to-markdown/format.ts +0 -1
- package/src/framer-to-markdown/framer-client.ts +0 -6
- package/src/framer-to-markdown/frontmatter.ts +0 -4
- package/src/framer-to-markdown/markdown.ts +0 -5
- /package/dist/src/{framer-to-markdown → libs/framer}/__tests__/filename.spec.js +0 -0
- /package/dist/src/{framer-to-markdown → libs/framer}/__tests__/frontmatter.spec.js +0 -0
- /package/dist/src/{framer-to-markdown → libs/framer}/__tests__/markdown.spec.js +0 -0
- /package/src/{framer-to-markdown → libs/framer}/__tests__/filename.spec.ts +0 -0
- /package/src/{framer-to-markdown → libs/framer}/__tests__/frontmatter.spec.ts +0 -0
- /package/src/{framer-to-markdown → libs/framer}/__tests__/markdown.spec.ts +0 -0
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { resolveMarkdownFilename, slugify } from "
|
|
4
|
-
import { formatMarkdownDocument } from "
|
|
5
|
-
import { toFrontmatter } from "
|
|
6
|
-
import { htmlToMarkdown } from "
|
|
3
|
+
import { resolveMarkdownFilename, slugify } from "../libs/framer/filename.js";
|
|
4
|
+
import { formatMarkdownDocument } from "../libs/framer/format.js";
|
|
5
|
+
import { toFrontmatter } from "../libs/framer/frontmatter.js";
|
|
6
|
+
import { htmlToMarkdown } from "../libs/framer/markdown.js";
|
|
7
7
|
const SECTION_HTML_FIELD_PATTERN = /^Section\s+(\d+)\s+HTML$/i;
|
|
8
8
|
const BODY_FIELD_CANDIDATES = [
|
|
9
9
|
"content",
|
|
@@ -2,9 +2,9 @@ import path from "node:path";
|
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import yargs from "yargs";
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
|
-
import { loadConfig } from "
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { loadConfig } from "../libs/framer/config.js";
|
|
6
|
+
import { FramerClient } from "../libs/framer/framer-client.js";
|
|
7
|
+
import { exportItemsToMarkdown } from "./export.js";
|
|
8
8
|
export async function runCli(argv = hideBin(process.argv)) {
|
|
9
9
|
const args = await yargs(argv)
|
|
10
10
|
.scriptName("framer-to-markdown")
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import { slugify } from "../libs/framer/filename";
|
|
4
|
-
import { createFieldDataEntryInput, } from "../libs/framer/framer-client";
|
|
5
|
-
import { parseFrontmatterDocument } from "../libs/framer/frontmatter";
|
|
6
|
-
import { markdownToHtml, splitMarkdownIntoSections, } from "../libs/framer/markdown";
|
|
7
|
-
import { markdownFaqToJsonLd } from "./json-ld-faq";
|
|
3
|
+
import { slugify } from "../libs/framer/filename.js";
|
|
4
|
+
import { createFieldDataEntryInput, } from "../libs/framer/framer-client.js";
|
|
5
|
+
import { parseFrontmatterDocument } from "../libs/framer/frontmatter.js";
|
|
6
|
+
import { markdownToHtml, splitMarkdownIntoSections, } from "../libs/framer/markdown.js";
|
|
7
|
+
import { markdownFaqToJsonLd } from "./json-ld-faq.js";
|
|
8
8
|
const SECTION_HTML_FIELD_PATTERN = /^Section\s+(\d+)\s+HTML$/i;
|
|
9
9
|
const SECTION_TITLE_FIELD_PATTERN = /^Section\s+(\d+)\s+Title$/i;
|
|
10
10
|
export async function listMarkdownFiles(rootDir) {
|
|
@@ -2,9 +2,9 @@ import path from "node:path";
|
|
|
2
2
|
import process from "node:process";
|
|
3
3
|
import yargs from "yargs";
|
|
4
4
|
import { hideBin } from "yargs/helpers";
|
|
5
|
-
import { loadConfig } from "../libs/framer/config";
|
|
6
|
-
import { FramerClient, } from "../libs/framer/framer-client";
|
|
7
|
-
import { buildCollectionItemInput, readMarkdownDocuments } from "./import";
|
|
5
|
+
import { loadConfig } from "../libs/framer/config.js";
|
|
6
|
+
import { FramerClient, } from "../libs/framer/framer-client.js";
|
|
7
|
+
import { buildCollectionItemInput, readMarkdownDocuments } from "./import.js";
|
|
8
8
|
export async function runCli(argv = hideBin(process.argv)) {
|
|
9
9
|
const args = await yargs(argv)
|
|
10
10
|
.scriptName("markdown-to-framer")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "framer-cms-markdown",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "Sync's Framer CMS content from/to markdown",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -54,6 +54,9 @@
|
|
|
54
54
|
".ts",
|
|
55
55
|
".tsx"
|
|
56
56
|
],
|
|
57
|
+
"moduleNameMapper": {
|
|
58
|
+
"^(\\.{1,2}/.*)\\.js$": "$1"
|
|
59
|
+
},
|
|
57
60
|
"testEnvironment": "node",
|
|
58
61
|
"testTimeout": 20000,
|
|
59
62
|
"testMatch": [
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import fs from "node:fs/promises";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
|
-
import { resolveMarkdownFilename, slugify } from "
|
|
5
|
-
import { formatMarkdownDocument } from "
|
|
6
|
-
import
|
|
7
|
-
import { toFrontmatter } from "
|
|
8
|
-
import { htmlToMarkdown } from "
|
|
4
|
+
import { resolveMarkdownFilename, slugify } from "../libs/framer/filename.js";
|
|
5
|
+
import { formatMarkdownDocument } from "../libs/framer/format.js";
|
|
6
|
+
import { FramerCollectionItemExport } from "../libs/framer/framer-client.js";
|
|
7
|
+
import { toFrontmatter } from "../libs/framer/frontmatter.js";
|
|
8
|
+
import { htmlToMarkdown } from "../libs/framer/markdown.js";
|
|
9
9
|
|
|
10
10
|
export type ExportOptions = {
|
|
11
11
|
outputDir?: string;
|
|
@@ -4,9 +4,10 @@ import process from "node:process";
|
|
|
4
4
|
import yargs from "yargs";
|
|
5
5
|
import { hideBin } from "yargs/helpers";
|
|
6
6
|
|
|
7
|
-
import { loadConfig } from "
|
|
8
|
-
import {
|
|
9
|
-
|
|
7
|
+
import { loadConfig } from "../libs/framer/config.js";
|
|
8
|
+
import { FramerClient } from "../libs/framer/framer-client.js";
|
|
9
|
+
|
|
10
|
+
import { exportItemsToMarkdown } from "./export.js";
|
|
10
11
|
|
|
11
12
|
export type CliArgs = {
|
|
12
13
|
token?: string;
|
|
@@ -3,18 +3,18 @@ import path from "node:path";
|
|
|
3
3
|
|
|
4
4
|
import type { CollectionItemInput, Field } from "framer-api";
|
|
5
5
|
|
|
6
|
-
import { slugify } from "../libs/framer/filename";
|
|
6
|
+
import { slugify } from "../libs/framer/filename.js";
|
|
7
7
|
import {
|
|
8
8
|
createFieldDataEntryInput,
|
|
9
9
|
type FramerCollectionItemExport,
|
|
10
|
-
} from "../libs/framer/framer-client";
|
|
11
|
-
import { parseFrontmatterDocument } from "../libs/framer/frontmatter";
|
|
10
|
+
} from "../libs/framer/framer-client.js";
|
|
11
|
+
import { parseFrontmatterDocument } from "../libs/framer/frontmatter.js";
|
|
12
12
|
import {
|
|
13
13
|
markdownToHtml,
|
|
14
14
|
splitMarkdownIntoSections,
|
|
15
|
-
} from "../libs/framer/markdown";
|
|
15
|
+
} from "../libs/framer/markdown.js";
|
|
16
16
|
|
|
17
|
-
import { markdownFaqToJsonLd } from "./json-ld-faq";
|
|
17
|
+
import { markdownFaqToJsonLd } from "./json-ld-faq.js";
|
|
18
18
|
|
|
19
19
|
const SECTION_HTML_FIELD_PATTERN = /^Section\s+(\d+)\s+HTML$/i;
|
|
20
20
|
const SECTION_TITLE_FIELD_PATTERN = /^Section\s+(\d+)\s+Title$/i;
|
|
@@ -4,13 +4,13 @@ import process from "node:process";
|
|
|
4
4
|
import yargs from "yargs";
|
|
5
5
|
import { hideBin } from "yargs/helpers";
|
|
6
6
|
|
|
7
|
-
import { loadConfig } from "../libs/framer/config";
|
|
7
|
+
import { loadConfig } from "../libs/framer/config.js";
|
|
8
8
|
import {
|
|
9
9
|
FramerClient,
|
|
10
10
|
type FramerCollectionItemExport,
|
|
11
|
-
} from "../libs/framer/framer-client";
|
|
11
|
+
} from "../libs/framer/framer-client.js";
|
|
12
12
|
|
|
13
|
-
import { buildCollectionItemInput, readMarkdownDocuments } from "./import";
|
|
13
|
+
import { buildCollectionItemInput, readMarkdownDocuments } from "./import.js";
|
|
14
14
|
|
|
15
15
|
export type CliArgs = {
|
|
16
16
|
token?: string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { loadConfig, } from "../libs/framer/config";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { resolveMarkdownFilename, slugify, uniqueName, } from "../libs/framer/filename";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatMarkdownDocument } from "../libs/framer/format";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { createFieldDataEntryInput, FramerClient, } from "../libs/framer/framer-client";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { parseFrontmatterDocument, toFrontmatter, } from "../libs/framer/frontmatter";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { htmlToMarkdown, markdownToHtml, splitMarkdownIntoSections, } from "../libs/framer/markdown";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { formatMarkdownDocument } from "../libs/framer/format";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|