qc-trousse-sdg 1.4.1 → 1.4.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/README.md +5 -0
- package/index.html +6 -0
- package/package.json +2 -2
- package/plugins/buildSvelteTests.js +36 -0
- package/public/js/qc-doc-sdg.js +4023 -4820
- package/rollup.config.js +5 -0
- package/src/sdg/qc-sdg-test.js +1 -1
- package/tests/buildSvelteTestsIgnore.json +4 -0
- package/tests/{button.spec.ts → button-baseline.spec.ts} +2 -2
- package/tests/choice-group-baseline.spec.ts +20 -0
- package/tests/choice-group-svelte.spec.ts +20 -0
- package/tests/{icon.spec.ts → icon-baseline.spec.ts} +1 -9
- package/tests/icon-svelte.spec.ts +11 -0
- package/tests/piv-header-baseline.spec.ts +11 -0
- package/tests/piv-header-svelte.spec.ts +11 -0
- package/tests/{textfield.spec.ts → textfield-baseline.spec.ts} +1 -10
- package/tests/textfield-svelte.spec.ts +1 -1
- package/tests/toggle-switch-baseline.spec.ts +11 -0
- package/tests/toggle-switch-svelte.spec.ts +11 -0
- package/tests/choice-group.spec.ts +0 -36
- package/tests/pivHeader.spec.ts +0 -22
- package/tests/toggle-switch.spec.ts +0 -20
- /package/src/sdg/bases/Icon/Test/{IconEmbeddedTest.html → IconSvelteTest.html} +0 -0
- /package/src/sdg/bases/Icon/Test/{iconTest.html → iconBaselineTest.html} +0 -0
- /package/src/sdg/components/Button/Test/{buttonTest.html → buttonBaselineTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{checkboxTest.html → checkboxBaselineTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{checkboxEmbeddedTest.html → checkboxSvelteTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{radiosTest.html → radiosBaselineTest.html} +0 -0
- /package/src/sdg/components/ChoiceGroup/Test/{radiosEmbeddedTest.html → radiosSvelteTest.html} +0 -0
- /package/src/sdg/components/DropdownList/Test/{DropdownListEmbeddedTest.svelte → DropdownListSvelteTest.svelte} +0 -0
- /package/src/sdg/components/DropdownList/Test/{dropdownListEmbeddedTest.html → dropdownListSvelteTest.html} +0 -0
- /package/src/sdg/components/PivHeader/Test/{pivHeaderTest.html → pivHeaderBaselineTest.html} +0 -0
- /package/src/sdg/components/PivHeader/Test/{pivHeaderEmbeddedTest.html → pivHeaderSvelteTest.html} +0 -0
- /package/src/sdg/components/TextField/Test/{textFieldTest.html → textFieldBaselineTest.html} +0 -0
- /package/src/sdg/components/TextField/Test/{textFieldEmbeddedTest.html → textFieldSvelteTest.html} +0 -0
- /package/src/sdg/components/ToggleSwitch/Test/{toggleSwitchTest.html → toggleSwitchBaselineTest.html} +0 -0
- /package/src/sdg/components/ToggleSwitch/Test/{toggleSwitchEmbeddedTest.html → toggleSwitchSvelteTest.html} +0 -0
- /package/tests/{dropdown-list.spec.ts → dropdown-list-baseline.spec.ts} +0 -0
package/README.md
CHANGED
|
@@ -300,6 +300,11 @@ Dans la version 1.3.0, il suffit d'importer `qc-sdg-lib.scss` pour bénéficier
|
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
## Historique
|
|
303
|
+
- 1.4.2:
|
|
304
|
+
- Correction de bugs :
|
|
305
|
+
- https://github.com/Quebecca/qc_trousse_sdg/issues/20
|
|
306
|
+
- https://github.com/Quebecca/qc_trousse_sdg/issues/19
|
|
307
|
+
- Ajout de tests PW pour les composants Svelte.
|
|
303
308
|
- 1.4.1:
|
|
304
309
|
- Correction de bugs :
|
|
305
310
|
- https://github.com/Quebecca/qc_trousse_sdg/issues/16
|
package/index.html
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "qc-trousse-sdg",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2",
|
|
4
4
|
"description": "Trousse de développement du Système de design gouvernemental du Québec",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"preversion": "./scripts/check-release-note.sh",
|
|
9
9
|
"version": "./scripts/compile-doc.sh",
|
|
10
10
|
"build": "rollup -c --bundleConfigAsCjs",
|
|
11
|
-
"start": "sirv
|
|
11
|
+
"start": "sirv .",
|
|
12
12
|
"rewrite-bootstrap": "gulp rewriteBs",
|
|
13
13
|
"build-images-scss-map": "node ./scripts/buildImagesMap.js"
|
|
14
14
|
},
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
import glob from 'glob';
|
|
4
|
+
|
|
5
|
+
function buildSvelteTests({input, ignorePathsFile}) {
|
|
6
|
+
return {
|
|
7
|
+
name: "build-svelte-tests",
|
|
8
|
+
buildStart() {
|
|
9
|
+
const testsRoot = path.resolve(input);
|
|
10
|
+
const resolvedIgnorePathsFile = ignorePathsFile ? `${testsRoot}/${ignorePathsFile}` : null;
|
|
11
|
+
const ignorePaths = resolvedIgnorePathsFile ?
|
|
12
|
+
JSON.parse(fs.readFileSync(resolvedIgnorePathsFile, 'utf-8'))
|
|
13
|
+
: [];
|
|
14
|
+
|
|
15
|
+
const partialPaths = glob.sync('**/*-baseline.spec.ts', {
|
|
16
|
+
cwd: testsRoot,
|
|
17
|
+
absolute: true,
|
|
18
|
+
ignore: ignorePaths
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
partialPaths.forEach(partialPath => {
|
|
22
|
+
this.addWatchFile(partialPath);
|
|
23
|
+
|
|
24
|
+
let testCode = fs.readFileSync(partialPath, 'utf-8');
|
|
25
|
+
|
|
26
|
+
testCode = testCode.replace(/Baseline\.test\.html/g, "Svelte.test.html");
|
|
27
|
+
testCode = testCode.replace(/baseline/g, "svelte");
|
|
28
|
+
|
|
29
|
+
const outputPath = partialPath.replace(/-baseline\.spec\.ts/g, "-svelte.spec.ts");
|
|
30
|
+
fs.writeFileSync(outputPath, testCode, 'utf-8');
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default buildSvelteTests;
|