Skip to content

Commit 3ab3dec

Browse files
committed
Release 1.1.2
1 parent bc6baed commit 3ab3dec

File tree

7 files changed

+7828
-4
lines changed

7 files changed

+7828
-4
lines changed

dist/tutorial.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/tutorial.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/output/json-formula-specification-1.1.2.html

Lines changed: 7806 additions & 0 deletions
Large diffs are not rendered by default.
1.25 MB
Binary file not shown.

doc/scripts/makeDocs.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ convertOne() {
5353
filename=$(basename -- "$1")
5454
extension="${filename##*.}"
5555
filename="${filename%.*}"
56+
DOCDATE="$(date +%F)"
5657
BASE_NAME=$filename
5758
echo "BaseName = $BASE_NAME"
5859

@@ -74,6 +75,7 @@ convertOne() {
7475
-a data-uri \
7576
-a revnumber="${VERSION}" \
7677
-a USING_DOCKER \
78+
-a docdate="${DOCDATE}" \
7779
-o "${OUTPUT_NAME}-${VERSION}".html "${BASE_NAME}".adoc
7880

7981
# Create the PDF version
@@ -89,6 +91,7 @@ convertOne() {
8991
-a USING_DOCKER \
9092
-a pdf-theme="${BASE_NAME}"-theme.yml \
9193
-a pdf-fontsdir="fonts" \
94+
-a docdate="${DOCDATE}" \
9295
-o "${OUTPUT_NAME}-${VERSION}".pdf "${BASE_NAME}".adoc
9396
}
9497

doc/scripts/modFunctionsADoc.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,17 @@ import fs from 'fs';
1414
import path from 'path';
1515
import { fileURLToPath } from 'url';
1616

17+
// This script modifies the functions.adoc file after it's been converted
18+
// from markdown
19+
1720
const docDir = path.dirname(fileURLToPath(import.meta.url));
1821
const adocFile = path.join(docDir, '..', 'functions.adoc');
1922

2023
const version = process.argv[1] || '1.0';
2124

2225
const functions = fs.readFileSync(adocFile).toString();
2326

24-
const updatedFunctions = functions
27+
let updatedFunctions = functions
2528
// The asciidoc has lines that look like:
2629
// link:#datetime[datetime]
2730
// transform to:
@@ -39,4 +42,16 @@ const updatedFunctions = functions
3942
.replace(/^(\[.*cols.*\])$/gm, 'Parameters::\n+\n$1')
4043
.replace(/``([^']+)''/g, '"$1"');
4144

45+
// Now generate a list of links functions
46+
// sort of like a mini TOC
47+
48+
const fnlist = updatedFunctions.match(/^== .*$/gm);
49+
50+
if (fnlist !== null) {
51+
const links = fnlist.map(f => {
52+
const name = f.replace(/^==\s+/, '');
53+
return `<<_${name.toLowerCase()}, ${name}>>`;
54+
});
55+
updatedFunctions = `${links.join(' ')}\n\n${updatedFunctions}`;
56+
}
4257
fs.writeFileSync(adocFile, updatedFunctions);

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@adobe/json-formula",
3-
"version": "1.1.1",
3+
"version": "1.1.2",
44
"description": "json-formula Grammar and implementation",
55
"main": "src/json-formula.js",
66
"type": "module",

0 commit comments

Comments
 (0)