Skip to content

Commit 739095a

Browse files
authored
Merge pull request #432 from duncdrum/springcleaning-2020
Springcleaning 2020
2 parents 81644fb + 63b2a4b commit 739095a

File tree

201 files changed

+82609
-21902
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

201 files changed

+82609
-21902
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ target/
22
*.iml
33
.idea/
44
*.xpr
5+
tmp/
56

67
github-report.html
78
node_modules/*

Gulpfile.js

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ var paths = {
4343
output: 'src/main/xar-resources/resources/'
4444
},
4545
fonts: {
46-
output: 'src/main/xar-resources/resources/fonts/',
46+
output: 'src/main/xar-resources/resources/fonts/'
47+
},
48+
xml: {
49+
listings: 'src/main/xar-resources/data/*/listings/*.xml',
50+
articles: 'src/main/xar-resources/data/*/*.xml'
4751
}
4852
}
4953

@@ -85,6 +89,8 @@ var lazypipe = require('lazypipe')
8589
var rename = require('gulp-rename')
8690
var header = require('gulp-header')
8791
var pkg = require('./package.json')
92+
var muxml = require('gulp-muxml')
93+
8894

8995
// Scripts
9096
var standard = require('gulp-standard')
@@ -193,6 +199,24 @@ var lintScripts = function(done) {
193199
done()
194200
}
195201

202+
// pretty print all xml listings
203+
// articles not yet decided
204+
var prettyXml = function(done) {
205+
src(paths.xml.listings, { base: "./" })
206+
.pipe(muxml({
207+
stripComments: false,
208+
stripCdata: false,
209+
stripInstruction: false,
210+
saxOptions: {
211+
trim: true,
212+
normalize: true
213+
}
214+
}))
215+
.pipe(dest("./"))
216+
// Signal completion
217+
done()
218+
}
219+
196220
// Process, lint, and minify Sass files
197221
var buildStyles = function(done) {
198222
// Make sure this feature is activated before running
@@ -327,6 +351,7 @@ exports.default = series(
327351
buildStyles,
328352
buildSVGs,
329353
copyFiles,
330-
buildPack
354+
buildPack,
355+
prettyXml
331356
)
332357
)

ISSUE_TEMPLATE.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# eXist-db Documentation
22
[![Build Status](https://travis-ci.com/eXist-db/documentation.svg?branch=master)](https://travis-ci.com/eXist-db/documentation)
3-
[![Docbook version](https://img.shields.io/badge/docbook-5.0-19a5a4.svg)](http://docbook.org/xml/5.0/)
3+
[![Docbook version](https://img.shields.io/badge/docbook-5.1-19a5a4.svg)](http://docbook.org/xml/5.1/)
44
[![eXist-db version](https://img.shields.io/badge/eXist_db-5.2.0-blue.svg)](http://www.exist-db.org/exist/apps/homepage/index.html)
55

66
<img src="src/main/xar-resources/icon.png" align="left" width="15%"/>
@@ -38,12 +38,14 @@ Should you encounter documentation for features that are deprecated in the minim
3838

3939
3. Install this file via the Dashboard > Package Manager.
4040

41-
## (WIP) Testing
41+
## Testing
4242

4343
### Unit tests
4444
The full test-suite consists of validation, unit, and integration tests, it runs automatically on travis. To be able to run integration tests locally, contributors should run `npm i` to download and install [cypress.js](https://www.cypress.io). This is only required once. To execute the tests run the following commands:
45-
- To validate xml files run `mvn validate`,
46-
- to run the javascript tests `mvn test` (xQsuite coming soon). We do **not** support testing via node alone, aka `npm test`, use the maven command instead.
45+
- To validate article files run `mvn validate`,
46+
- Validation uses both the official `docbook.rng` and our own `exist-docs.rng` (experimental) schema.
47+
- The schema files are located at: `src/main/relaxng`
48+
- to run the javascript or XQSuite unit tests run: `mvn test`. We do **not** support testing via node alone, aka `npm test`, use the maven command instead.
4749
- To run the Integrations tests, however, use `npm run cypress`.
4850

4951
Both unit and integration tests, expect a running instance of exist with a copy of the documentation app installed reachable at `localhost:8080` and an empty admin password. It might be necessary to skip test execution during building from time to time, use: `mvn clean package -DskipTests`.

package-lock.json

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

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "exist-documentation",
3-
"version": "5.0.4-SNAPSHOT",
3+
"version": "5.1.1-SNAPSHOT",
44
"description": "Documentation package for eXist-db",
55
"scripts": {
66
"test": "standard 'src/test/**/*.js' && mocha src/test/mocha/ --recursive --exit",
@@ -39,6 +39,7 @@
3939
"gulp-cssnano": "^2.1.3",
4040
"gulp-flatmap": "^1.0.2",
4141
"gulp-header": "^2.0.9",
42+
"gulp-muxml": "^2.0.0",
4243
"gulp-optimize-js": "^1.1.0",
4344
"gulp-rename": "^2.0.0",
4445
"gulp-sass": "^4.0.2",

0 commit comments

Comments
 (0)