adapt-authoring-docs 1.2.0 → 1.2.2
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/docsify/docsify.js +11 -25
- package/package.json +2 -15
package/docsify/docsify.js
CHANGED
|
@@ -75,19 +75,6 @@ export default async function docsify (app, configs, outputdir, defaultPages) {
|
|
|
75
75
|
} catch (e) {}
|
|
76
76
|
})
|
|
77
77
|
}))
|
|
78
|
-
/**
|
|
79
|
-
* Set options
|
|
80
|
-
*/
|
|
81
|
-
const options = {
|
|
82
|
-
name: '<img class="logo" src="assets/logo-outline-colour.png" />Adapt authoring tool<h2>Developer guides</h2>',
|
|
83
|
-
repo: 'https://github.com/adapt-security/adapt-authoring',
|
|
84
|
-
themeColor: '#36cde8',
|
|
85
|
-
loadSidebar: true,
|
|
86
|
-
loadNavbar: false,
|
|
87
|
-
autoHeader: true,
|
|
88
|
-
coverpage: false,
|
|
89
|
-
homepage: false
|
|
90
|
-
}
|
|
91
78
|
/**
|
|
92
79
|
* Copy files
|
|
93
80
|
*/
|
|
@@ -96,20 +83,19 @@ export default async function docsify (app, configs, outputdir, defaultPages) {
|
|
|
96
83
|
await fs.copy(resolvePath('./js'), `${dir}/js`)
|
|
97
84
|
await fs.copy(resolvePath('./styles'), `${dir}/styles`)
|
|
98
85
|
|
|
99
|
-
if (defaultPages.manualCover) {
|
|
100
|
-
await fs.copy(defaultPages.manualCover, `${dir}/cover.md`)
|
|
101
|
-
options.coverpage = 'cover.md'
|
|
102
|
-
delete titleMap[path.basename(defaultPages.manualCover)]
|
|
103
|
-
}
|
|
104
|
-
if (defaultPages.manualIndex) {
|
|
105
|
-
await fs.copy(defaultPages.manualIndex, `${dir}/home.md`)
|
|
106
|
-
options.homepage = 'home.md'
|
|
107
|
-
delete titleMap[path.basename(defaultPages.manualIndex)]
|
|
108
|
-
}
|
|
109
86
|
// add Docsify options
|
|
110
87
|
const f = `${dir}/js/adapt.js`
|
|
111
|
-
const
|
|
112
|
-
await fs.writeFile(f,
|
|
88
|
+
const contents = (await fs.readFile(f)).toString()
|
|
89
|
+
await fs.writeFile(f, contents.replace('OPTIONS', JSON.stringify({
|
|
90
|
+
name: '<img class="logo" src="assets/logo-outline-colour.png" />Adapt authoring tool<h2>Developer guides</h2>',
|
|
91
|
+
repo: 'https://github.com/adapt-security/adapt-authoring',
|
|
92
|
+
themeColor: '#36cde8',
|
|
93
|
+
loadSidebar: true,
|
|
94
|
+
loadNavbar: false,
|
|
95
|
+
autoHeader: true,
|
|
96
|
+
coverpage: defaultPages.manualCover ? path.basename(defaultPages.manualCover) : false,
|
|
97
|
+
homepage: defaultPages.manualIndex ? path.basename(defaultPages.manualIndex) : false
|
|
98
|
+
})))
|
|
113
99
|
|
|
114
100
|
await Promise.allSettled(Object.entries(titleMap).map(([filename, v]) => fs.copy(v.path, `${dir}/${filename}`)))
|
|
115
101
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "adapt-authoring-docs",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Tools for auto-generating documentation for the Adapt authoring tool",
|
|
5
5
|
"homepage": "https://github.com/adapt-security/adapt-authoring-docs",
|
|
6
6
|
"license": "GPL-3.0",
|
|
@@ -24,14 +24,9 @@
|
|
|
24
24
|
"adapt-authoring-core": "github:adapt-security/adapt-authoring-core"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
28
27
|
"@semantic-release/git": "^10.0.1",
|
|
29
|
-
"@semantic-release/github": "^12.0.2",
|
|
30
|
-
"@semantic-release/npm": "^13.1.2",
|
|
31
|
-
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
32
28
|
"conventional-changelog-eslint": "^6.0.0",
|
|
33
29
|
"semantic-release": "^25.0.2",
|
|
34
|
-
"semantic-release-replace-plugin": "^1.2.7",
|
|
35
30
|
"standard": "^17.1.0"
|
|
36
31
|
},
|
|
37
32
|
"release": {
|
|
@@ -50,15 +45,7 @@
|
|
|
50
45
|
],
|
|
51
46
|
"@semantic-release/npm",
|
|
52
47
|
"@semantic-release/github",
|
|
53
|
-
|
|
54
|
-
"@semantic-release/git",
|
|
55
|
-
{
|
|
56
|
-
"assets": [
|
|
57
|
-
"package.json"
|
|
58
|
-
],
|
|
59
|
-
"message": "Chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
60
|
-
}
|
|
61
|
-
]
|
|
48
|
+
"@semantic-release/git"
|
|
62
49
|
]
|
|
63
50
|
}
|
|
64
51
|
}
|