-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from AgenceBio/maud/changement_structure
Changement structure des données et du module
- Loading branch information
Showing
14 changed files
with
281 additions
and
45,495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,3 +102,9 @@ dist | |
|
||
# TernJS port file | ||
.tern-port | ||
|
||
# Custom build output | ||
data/cpf.json | ||
data/cepages.json | ||
dist/ | ||
*.d.ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,7 @@ | ||
/** | ||
* Built with `npm run build` | ||
* | ||
* @type {Object.<String, Cepage>} | ||
* @module cepages | ||
* @deprecated | ||
*/ | ||
import cepages from './data/cepages.json' assert { type: 'json' } | ||
|
||
/** | ||
* @typedef Cepage | ||
* @property {String} code | ||
* @property {String} libelle | ||
* @property {CepageCouleur} couleur | ||
* @property {String=} code_cpf | ||
* @property {Boolean} is_selectable | ||
*/ | ||
|
||
export const CepageCouleur = { | ||
BLANC: 'Blanc', | ||
INDETERMINÉ: 'Indéterminé', | ||
NOIR: 'Noir', | ||
ROUGE: 'Rouge', | ||
ROSÉ: 'Rose' | ||
} | ||
|
||
export const CepageCatégorie = { | ||
Cuve: '01.21.12', | ||
Multiplication: '01.21.1', | ||
Table: '01.21.11', | ||
Mixte: '01.21.1', | ||
Interdit: '01.21.1' | ||
} | ||
|
||
export function cepageCategorieCpf (categorie) { | ||
return CepageCatégorie[String(categorie)] ?? null | ||
} | ||
|
||
export function fromCepageCode (code) { | ||
return cepages[String(code)] ?? null | ||
} | ||
export { fromCepageCode } from './src/converters.js' | ||
export * from './src/cepages.js' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.