humalis 1.2.0 → 1.3.1
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/README.en.md +8 -1
- package/README.md +8 -1
- package/dist/analyse/analyse.js +6 -7
- package/dist/analyse/css.js +28 -0
- package/dist/cibles/commun/mouvement.js +29 -0
- package/dist/cibles/commun/reperes.js +70 -0
- package/dist/cibles/mobile/projet.js +6 -0
- package/dist/cibles/statique/page.js +25 -11
- package/dist/cibles/statique/projet.js +6 -1
- package/dist/cibles/web/css-ecran.js +19 -1
- package/dist/cibles/web/ecran.js +11 -5
- package/dist/cibles/web/langue.js +3 -0
- package/dist/cibles/web/projet.js +10 -5
- package/dist/cli.js +14 -3
- package/dist/fichiers.js +21 -1
- package/dist/navigateur.js +90 -62
- package/dist/outils/developpement.js +3 -1
- package/dist/outils/version.js +15 -0
- package/dist/parser/miseEnPage.js +1 -1
- package/dist/vocabulaire/table-ecran.js +6 -0
- package/docs/guide.en.md +41 -0
- package/docs/guide.md +39 -0
- package/llms.txt +2 -1
- package/package.json +1 -1
package/dist/fichiers.js
CHANGED
|
@@ -5,6 +5,7 @@ import { ErreurSyntaxique } from './parser/erreurs.js';
|
|
|
5
5
|
import { lireCsv } from './donnees/csv.js';
|
|
6
6
|
import { lireJson } from './donnees/json.js';
|
|
7
7
|
import { analyserSens } from './analyse/analyse.js';
|
|
8
|
+
import { verifierCss } from './analyse/css.js';
|
|
8
9
|
import { construireRepresentation } from './ri/construire.js';
|
|
9
10
|
/**
|
|
10
11
|
* Plusieurs fichiers (trou G4) : les lignes du k-ième fichier utilisé sont
|
|
@@ -158,7 +159,26 @@ export function compilerProjet(principal, lire, sourcePrincipale) {
|
|
|
158
159
|
}
|
|
159
160
|
if (diagnostics.some((d) => d.gravite === 'erreur'))
|
|
160
161
|
return fin();
|
|
161
|
-
const
|
|
162
|
+
const classesCss = new Set();
|
|
163
|
+
let cssIllisible = false;
|
|
164
|
+
for (const bloc of programme.styles) {
|
|
165
|
+
const resultat = verifierCss(bloc.css, bloc.ligne + 1);
|
|
166
|
+
for (const nom of resultat.classes)
|
|
167
|
+
classesCss.add(nom);
|
|
168
|
+
diagnostics.push(...resultat.diagnostics);
|
|
169
|
+
}
|
|
170
|
+
for (const fichier of programme.fichiersStyle) {
|
|
171
|
+
const contenu = lire(joindre(base, fichier.chemin));
|
|
172
|
+
if (contenu === undefined) {
|
|
173
|
+
cssIllisible = true;
|
|
174
|
+
continue;
|
|
175
|
+
}
|
|
176
|
+
const resultat = verifierCss(contenu, 1, fichier.chemin.replace(/^\.\//, ''));
|
|
177
|
+
for (const nom of resultat.classes)
|
|
178
|
+
classesCss.add(nom);
|
|
179
|
+
diagnostics.push(...resultat.diagnostics);
|
|
180
|
+
}
|
|
181
|
+
const analyse = analyserSens(programme, cssIllisible ? undefined : classesCss);
|
|
162
182
|
diagnostics.push(...analyse.diagnostics);
|
|
163
183
|
if (diagnostics.some((d) => d.gravite === 'erreur'))
|
|
164
184
|
return fin();
|