@gouvfr/dsfr-roller 1.0.59 → 1.0.62
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gouvfr/dsfr-roller",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.62",
|
|
4
4
|
"description": "Le module `dsfr-roller` permet de publier le site de documentation du Système de Design de l’État - DSFR",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Système de Design de l'État",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
],
|
|
57
57
|
"main": "./index.js",
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@gouvfr/dsfr-forge": "=1.0.
|
|
59
|
+
"@gouvfr/dsfr-forge": "=1.0.62",
|
|
60
60
|
"@gouvfr/dsfr-publisher": "npm:@gouvfr/dsfr@1.14.2",
|
|
61
61
|
"deepmerge": "^4.3.1",
|
|
62
62
|
"ejs": "^3.1.10",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ROLLER_MODULE, BANNER } from '../constants.js';
|
|
2
|
-
import { copyDir, getPackagePath
|
|
2
|
+
import { copyDir, getPackagePath } from '@gouvfr/dsfr-forge';
|
|
3
3
|
import { ScriptCompiler, StyleCompiler } from '@gouvfr/dsfr-alchemist'
|
|
4
4
|
import path from 'path'
|
|
5
5
|
import fs from 'fs'
|
package/src/node/node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Renderable } from '../core/renderable.js';
|
|
2
2
|
import { nodeFactory } from './node-factory.js';
|
|
3
|
-
import {
|
|
3
|
+
import { normalize, TagAttributes } from '@gouvfr/dsfr-forge';
|
|
4
4
|
class Node extends Renderable {
|
|
5
5
|
constructor (data, tagName = null, isSelfClosing = false, hasNormalizedId = false) {
|
|
6
6
|
super(data);
|
|
@@ -27,7 +27,7 @@ class Stylesheets extends Renderable {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
async render () {
|
|
30
|
-
const stylesheets = await
|
|
30
|
+
const stylesheets = await Array.fromAsync(this._stylesheets, async stylesheet => await stylesheet.render());
|
|
31
31
|
return stylesheets.join('\n');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -34,7 +34,7 @@ class Scripts extends Renderable {
|
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
async render () {
|
|
37
|
-
const scripts = await
|
|
37
|
+
const scripts = await Array.fromAsync(this._scripts, async script => await script.render());
|
|
38
38
|
return scripts.join('\n');
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -26,7 +26,7 @@ class Storybook extends Element {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
setIframeTheme() {
|
|
29
|
-
const theme = document.documentElement.getAttribute('data-fr-theme')
|
|
29
|
+
const theme = document.documentElement.getAttribute('data-fr-theme') || 'light';
|
|
30
30
|
const url = new URL(window.location.origin + this.iframe.dataset.src);
|
|
31
31
|
url.searchParams.set('globals', `theme:${theme}`);
|
|
32
32
|
this.iframe.src = url.toString();
|