Actualise les configurations npm et vscode

Launch.json s'appuie sur package.json pour lancer les scripts, en utilisant src/ comme cwd.
Package.json utilise les bonnes conventions pour appeler les modules installés localements.
WIP: L'accès aux jeux de tests ne fonctionne pas encore
This commit is contained in:
2023-05-14 13:36:33 +02:00
parent 1e341a353a
commit d665e1f12e
4 changed files with 1139 additions and 19 deletions

View File

@@ -24,7 +24,7 @@ variables:
- npm install - npm install
- npm run start - npm run start
- cat ../${ENTRY_FOLDER}/${PACKAGE_NAME}/theme.json - cat ../${ENTRY_FOLDER}/${PACKAGE_NAME}/theme.json
- node src/test_manifest_job/node_modules/mocha/bin/_mocha --require mocha-steps --colors src/test_manifest_job/wpp_checker.js - npm run test
artifacts: artifacts:
paths: paths:
- ${ENTRY_FOLDER}/${PACKAGE_NAME}/theme.json - ${ENTRY_FOLDER}/${PACKAGE_NAME}/theme.json

43
.vscode/launch.json vendored
View File

@@ -1,30 +1,41 @@
{ {
// Utilisez IntelliSense pour en savoir plus sur les attributs possibles.
// Pointez pour afficher la description des attributs existants.
// Pour plus d'informations, visitez : https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "dev-test Valid_set",
"cwd": "${workspaceFolder}/src",
"type": "node", "type": "node",
"request": "launch", "request": "launch",
"name": "Tester avec Valid_set", "runtimeExecutable": "npm",
"skipFiles": [ "runtimeArgs": [
"<node_internals>/**" "run",
], "dev-test"
"program": "${workspaceFolder}/src/test_manifest_job/node_modules/mocha/bin/_mocha",
"args": [
"${workspaceFolder}/src/test_manifest_job/wpp_checker.js",
"--require mocha-steps",
"--colors",
], ],
"env": { "env": {
"ENTRY_FOLDER": "test", "ENTRY_FOLDER": "test",
"PACKAGE_NAME": "valid_set" "PACKAGE_NAME": "valid_set"
}, },
"internalConsoleOptions": "openOnSessionStart", "skipFiles": [
"console": "integratedTerminal", "<node_internals>/**"
"cwd": "${workspaceFolder}", ],
"autoAttachChildProcesses": true, },
{
"name": "dev-start Valid_set",
"cwd": "${workspaceFolder}/src",
"type": "node",
"request": "launch",
"runtimeExecutable": "npm",
"runtimeArgs": [
"run",
"dev-start"
],
"env": {
"ENTRY_FOLDER": "test",
"PACKAGE_NAME": "valid_set"
},
"skipFiles": [
"<node_internals>/**"
],
} }
] ]
} }

1109
src/package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,12 @@
{ {
"name": "wpp-checker", "name": "build-manifest",
"version": "1.0.0", "version": "1.0.0",
"description": "Generate the manifest file of the project, based on metadata contained in the pictures.", "description": "Generate the manifest file of the project, based on metadata contained in the pictures.",
"main": "build-manifest.js", "main": "build-manifest.js",
"scripts": { "scripts": {
"dev-start": "", "dev-start": "",
"start": "", "start": "",
"dev-test": "src/test_manifest_job/node_modules/mocha/bin/_mocha --require mocha-steps --colors src/test_manifest_job/wpp_checker.js", "dev-test": "mocha --require mocha-steps --colors manifest.spec.js",
"test": "" "test": ""
}, },
"author": "Simon", "author": "Simon",