Skip to content

Commit b907399

Browse files
committed
rebuild
1 parent 2b3a948 commit b907399

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

dist/action.js

+11-7
Original file line numberDiff line numberDiff line change
@@ -28645,6 +28645,8 @@ const make_slug = make_session_slug_processor({
2864528645
separator: "-",
2864628646
});
2864728647

28648+
const months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
28649+
2864828650
async function transform_blog(
2864928651
blogs,
2865028652
project,
@@ -28654,15 +28656,15 @@ async function transform_blog(
2865428656
const final_blog = (
2865528657
await Promise.all(
2865628658
blogs.map((doc, i) => {
28657-
const match = /^(\d+-\d+-\d+)-(.+)\.md$/.exec(blogs[i].name);
28659+
const match = /^(\d{4})-(\d{2})-(\d{2})-(.+)\.md$/.exec(blogs[i].name);
2865828660
if (!match)
2865928661
throw new Error(`Invalid filename for blog: '${blogs[i].name}'`);
2866028662

28661-
const [, pubdate, slug] = match;
28662-
const date = new Date(`${pubdate} EDT`);
28663+
const [, y, m, d, slug] = match;
28664+
2866328665
dates.push({
28664-
pretty: date.toDateString(),
28665-
numeric: pubdate,
28666+
pretty: `${months[+m - 1]} ${+d} ${y}`,
28667+
numeric: `${y}-${m}-${d}`,
2866628668
});
2866728669

2866828670
return format({
@@ -28811,6 +28813,7 @@ async function transform_examples(
2881128813
}
2881228814

2881328815
async function process_tutorial(
28816+
dir,
2881428817
content,
2881528818
seen_slugs,
2881628819
project,
@@ -28848,10 +28851,10 @@ async function process_tutorial(
2884828851
const _example = {
2884928852
name: vfile.data.section_title,
2885028853
slug: slug,
28851-
2885228854
};
2885328855

2885428856
full.push({
28857+
dir: `${dir}/${name}`,
2885528858
..._example,
2885628859
initial: initial.map(get_files),
2885728860
complete: completed ? completed.map(get_files) : [],
@@ -28874,9 +28877,10 @@ async function transform_tutorial(
2887428877

2887528878
const full = [];
2887628879
const list = await Promise.all(
28877-
examples.map(async ({ content }) => {
28880+
examples.map(async ({ name, content }) => {
2887828881
const [files, meta] = extract_meta(content);
2887928882
const [example_full, example_list] = await process_tutorial(
28883+
name,
2888028884
files,
2888128885
seen_slugs,
2888228886
project,

dist/cli.js

+11-7
Original file line numberDiff line numberDiff line change
@@ -27408,6 +27408,8 @@ const make_slug = make_session_slug_processor({
2740827408
separator: "-",
2740927409
});
2741027410

27411+
const months = 'Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec'.split(' ');
27412+
2741127413
async function transform_blog(
2741227414
blogs,
2741327415
project,
@@ -27417,15 +27419,15 @@ async function transform_blog(
2741727419
const final_blog = (
2741827420
await Promise.all(
2741927421
blogs.map((doc, i) => {
27420-
const match = /^(\d+-\d+-\d+)-(.+)\.md$/.exec(blogs[i].name);
27422+
const match = /^(\d{4})-(\d{2})-(\d{2})-(.+)\.md$/.exec(blogs[i].name);
2742127423
if (!match)
2742227424
throw new Error(`Invalid filename for blog: '${blogs[i].name}'`);
2742327425

27424-
const [, pubdate, slug] = match;
27425-
const date = new Date(`${pubdate} EDT`);
27426+
const [, y, m, d, slug] = match;
27427+
2742627428
dates.push({
27427-
pretty: date.toDateString(),
27428-
numeric: pubdate,
27429+
pretty: `${months[+m - 1]} ${+d} ${y}`,
27430+
numeric: `${y}-${m}-${d}`,
2742927431
});
2743027432

2743127433
return format({
@@ -27574,6 +27576,7 @@ async function transform_examples(
2757427576
}
2757527577

2757627578
async function process_tutorial(
27579+
dir,
2757727580
content,
2757827581
seen_slugs,
2757927582
project,
@@ -27611,10 +27614,10 @@ async function process_tutorial(
2761127614
const _example = {
2761227615
name: vfile.data.section_title,
2761327616
slug: slug,
27614-
2761527617
};
2761627618

2761727619
full.push({
27620+
dir: `${dir}/${name}`,
2761827621
..._example,
2761927622
initial: initial.map(get_files),
2762027623
complete: completed ? completed.map(get_files) : [],
@@ -27637,9 +27640,10 @@ async function transform_tutorial(
2763727640

2763827641
const full = [];
2763927642
const list = await Promise.all(
27640-
examples.map(async ({ content }) => {
27643+
examples.map(async ({ name, content }) => {
2764127644
const [files, meta] = extract_meta(content);
2764227645
const [example_full, example_list] = await process_tutorial(
27646+
name,
2764327647
files,
2764427648
seen_slugs,
2764527649
project,

0 commit comments

Comments
 (0)