1
0
Fork 0

chore: Move meta-info from design config to repo config

This commit is contained in:
Joost De Cock 2022-08-27 13:25:42 +02:00
parent 5adca6da4f
commit 25bbca5fb2
3 changed files with 357 additions and 60 deletions

View file

@ -1,68 +1,359 @@
{
"accessories": {
"benjamin": "A FreeSewing pattern for a bow tie",
"bob": "A FreeSewing pattern for a bib",
"florence": "A FreeSewing pattern for a face mask",
"florent": "A FreeSewing pattern for a flat cap",
"hi": "A FreeSewing pattern for a shark plush toy",
"holmes": "A FreeSewing pattern for a Sherlock Holmes hat",
"hortensia": "A FreeSewing pattern for a handbag",
"octoplushy": "A FreeSewing pattern for an octopus plushy toy",
"trayvon": "A FreeSewing pattern for a tie"
"albert": {
"description": "A FreeSewing pattern for an apron",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 2,
"tags": [ "accessories" ]
},
"benjamin": {
"description": "A FreeSewing pattern for a bow tie",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 3,
"tags": [ "accessories" ]
},
"bob": {
"description": "A FreeSewing pattern for a bib",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "accessories", "infants" ]
},
"florence": {
"description": "A FreeSewing pattern for a face mask",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 1,
"tags": [ "accessories" ]
},
"florent": {
"description": "A FreeSewing pattern for a flat cap",
"code": [ "Quentin Felix", "Joost De Cock" ],
"design": "Quentin Felix",
"difficulty": 3,
"tags": [ "accessories", "hats" ]
},
"hi": {
"description": "A FreeSewing pattern for a shark plush toy",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 4,
"tags": [ "accessories", "toys" ]
},
"holmes": {
"description": "A FreeSewing pattern for a Sherlock Holmes hat",
"code": [ "Erica Alcusa Sáez", "bobgeorgethe3rd" ],
"design": "Erica Alcusa Sáez",
"difficulty": 3,
"tags": [ "accessories", "hats" ]
},
"hortensia": {
"description": "A FreeSewing pattern for a handbag",
"code": "Wouter Van Wageningen",
"design": [ "Stoffsuchti", "Wouter Van Wageningen" ],
"difficulty": 3,
"tags": [ "accessories", "bags" ]
},
"lucy": {
"description": "A FreeSewing pattern for a historical tie-on pocket",
"code": "SeaZeeZee",
"design": "SeaZeeZee",
"difficulty": 2,
"tags": [ "accessories", "historical", "bags" ]
},
"octoplushy": {
"description": "A FreeSewing pattern for an octopus plushy toy",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 4,
"tags": [ "accessories", "toys" ]
},
"trayvon": {
"description": "A FreeSewing pattern for a tie",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 2,
"tags": [ "accessories" ]
}
},
"blocks": {
"bella": "A FreeSewing pattern for a womenswear bodice block",
"bent": "A FreeSewing pattern for a menswear body block with a two-part sleeve",
"breanna": "A FreeSewing pattern for a basic body block for womenswear",
"brian": {
"about": "A FreeSewing pattern for a basic body block for menswear",
"design": "Joost De Cock",
"bella": {
"description": "A FreeSewing pattern for a womenswear bodice block",
"code": "Joost De Cock",
"department": "tops",
"difficulty": 3
"design": [ "Bella Incognito", "Joost De Cock" ],
"difficulty": 3,
"tags": [ "tops" ]
},
"noble": "A FreeSewing pattern for a princess seam bodice block",
"titan": "A FreeSewing pattern for a unisex trouser block"
"bent": {
"description": "A FreeSewing pattern for a menswear body block with a two-part sleeve",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "tops" ]
},
"breanna": {
"description": "A FreeSewing pattern for a basic body block for womenswear",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "tops" ]
},
"brian": {
"description": "A FreeSewing pattern for a basic body block for menswear",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "tops" ]
},
"noble": {
"description": "A FreeSewing pattern for a princess seam bodice block",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 3,
"tags": [ "tops" ]
},
"titan": {
"description": "A FreeSewing pattern for a unisex trouser block",
"code": "Joost De Cock",
"design": [ "Debra Bean", "Joost De Cock" ],
"difficulty": 3,
"tags": [ "bottoms" ]
}
},
"garments": {
"aaron": "A FreeSewing pattern for a A-shirt or tank top",
"albert": "A FreeSewing pattern for an apron",
"bee": "A FreeSewing pattern for a bikini top",
"bruce": "A FreeSewing pattern for boxer briefs",
"carlita": "A FreeSewing pattern for Sherlock Holmes cosplay; Or just a nice long coat",
"carlton": "A FreeSewing pattern for Sherlock Holmes cosplay; Or just a nice long coat",
"cathrin": "A FreeSewing pattern for a underbust corset / waist trainer",
"charlie": "A FreeSewing pattern for chino trousers",
"cornelius": "A FreeSewing pattern for cycling breeches, based on the Keystone drafting system",
"diana": "A FreeSewing pattern for a top with a draped neck",
"huey": "A FreeSewing pattern for a zip-up hoodie",
"hugo": "A FreeSewing pattern for a hooded jumper with raglan sleeves",
"jaeger": "A FreeSewing pattern for a sport coat style jacket",
"lucy": "A FreeSewing pattern for a historical tie-on pocket",
"lunetius": "A FreeSewing pattern for a lacerna, a historical Roman cloak",
"paco": "A FreeSewing pattern for summer pants",
"penelope": "A FreeSewing pattern for a pencil skirt",
"sandy": "A FreeSewing pattern for a circle skirt",
"shin": "A FreeSewing pattern for swim trunks",
"simon": "A FreeSewing pattern for a button down shirt",
"simone": "A FreeSewing pattern for a button down shirt (Simone = Simon for people with breasts)",
"sven": "A FreeSewing pattern for a straightforward sweater",
"tamiko": "A FreeSewing pattern for a zero-waste top",
"teagan": "A FreeSewing pattern for a T-shirt",
"theo": "A FreeSewing pattern for classic trousers",
"tiberius": "A FreeSewing pattern for a tunica, a historical Roman tunic",
"unice": "A FreeSewing pattern for a basic, highly-customizable underwear pattern",
"ursula": "A FreeSewing pattern for a basic, highly-customizable underwear pattern",
"wahid": "A FreeSewing pattern for a classic fitted waistcoat",
"walburga": "A FreeSewing pattern for a wappenrock (tabard/surcoat), a historical European/medieval (ish) garment",
"waralee": "A FreeSewing pattern for wrap pants",
"yuri": "A FreeSewing pattern for a fancy zipless sweater based on the Huey hoodie"
"aaron": {
"description": "A FreeSewing pattern for a A-shirt or tank top",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 2,
"tags": [ "tops", "underwear" ]
},
"bee": {
"description": "A FreeSewing pattern for a bikini top",
"code": "bobgeorgethe3rd",
"design": "PrudenceRabbit",
"difficulty": 3,
"tags": [ "tops", "swimwear" ]
},
"bruce": {
"description": "A FreeSewing pattern for boxer briefs",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "tops", "underwear" ]
},
"carlita": {
"description": "A FreeSewing pattern for Sherlock Holmes cosplay; Or just a nice long coat",
"code": "Joost De Cock",
"design": [ "Anneke Caramin", "Joost De Cock" ],
"difficulty": 5,
"tags": [ "tops", "coats" ]
},
"carlton": {
"description": "A FreeSewing pattern for Sherlock Holmes cosplay; Or just a nice long coat",
"code": "Joost De Cock",
"design": [ "Anneke Caramin", "Joost De Cock" ],
"difficulty": 5,
"tags": [ "tops", "coats" ]
},
"cathrin": {
"description": "A FreeSewing pattern for a underbust corset / waist trainer",
"code": "Joost De Cock",
"design": [ "Cathrin Åhlén", "Joost De Cock" ],
"difficulty": 4,
"tags": [ "tops", "underwear" ]
},
"charlie": {
"description": "A FreeSewing pattern for chino trousers",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "bottoms", "trousers" ]
},
"cornelius": {
"description": "A FreeSewing pattern for cycling breeches, based on the Keystone drafting system",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 3,
"tags": [ "bottoms", "trousers" ]
},
"diana": {
"description": "A FreeSewing pattern for a top with a draped neck",
"code": "Erica Alcusa Sáez",
"design": "Erica Alcusa Sáez",
"difficulty": 2,
"tags": [ "tops" ]
},
"huey": {
"description": "A FreeSewing pattern for a zip-up hoodie",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "tops" ]
},
"hugo": {
"description": "A FreeSewing pattern for a hooded jumper with raglan sleeves",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "tops" ]
},
"jaeger": {
"description": "A FreeSewing pattern for a sport coat style jacket",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 5,
"tags": [ "tops", "coats" ]
},
"lunetius": {
"description": "A FreeSewing pattern for a lacerna, a historical Roman cloak",
"code": "Rika Tamaike",
"design": "Rika Tamaike",
"difficulty": 1,
"tags": [ "tops", "coats", "historical" ]
},
"paco": {
"description": "A FreeSewing pattern for summer pants",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "bottoms", "trousers" ]
},
"penelope": {
"description": "A FreeSewing pattern for a pencil skirt",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 3,
"tags": [ "bottoms", "skirts" ]
},
"sandy": {
"description": "A FreeSewing pattern for a circle skirt",
"code": [ "Erica Alcusa Sáez", "Joost De Cock" ],
"design": "Erica Alcusa Sáez",
"difficulty": 3,
"tags": [ "bottoms", "skirts" ]
},
"shin": {
"description": "A FreeSewing pattern for swim trunks",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 2,
"tags": [ "bottoms", "swimwear" ]
},
"simon": {
"description": "A FreeSewing pattern for a button down shirt",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 4,
"tags": [ "tops" ]
},
"simone": {
"description": "A FreeSewing pattern for a button down shirt (Simone = Simon for people with breasts)",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 4,
"tags": [ "tops" ]
},
"sven": {
"description": "A FreeSewing pattern for a straightforward sweater",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 3,
"tags": [ "tops" ]
},
"tamiko": {
"description": "A FreeSewing pattern for a zero-waste top",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 1,
"tags": [ "tops" ]
},
"teagan": {
"description": "A FreeSewing pattern for a T-shirt",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 2,
"tags": [ "tops" ]
},
"theo": {
"description": "A FreeSewing pattern for classic trousers",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 4,
"tags": [ "bottoms", "trousers" ]
},
"tiberius": {
"description": "A FreeSewing pattern for a tunica, a historical Roman tunic",
"code": "Rika Tamaike",
"design": "Rika Tamaike",
"difficulty": 1,
"tags": [ "tops", "historic" ]
},
"unice": {
"description": "A FreeSewing pattern for a basic, highly-customizable underwear pattern",
"code": [ "Anna Puk", "Natalia Sayang" ],
"design": [ "Anna Puk", "Natalia Sayang" ],
"difficulty": 1,
"tags": [ "bottoms", "underwear" ]
},
"ursula": {
"description": "A FreeSewing pattern for a basic, highly-customizable underwear pattern",
"code": "Natalia Sayang",
"design": "Natalia Sayang",
"difficulty": 1,
"tags": [ "bottoms", "underwear" ]
},
"wahid": {
"description": "A FreeSewing pattern for a classic fitted waistcoat",
"code": "Joost De Cock",
"design": "Joost De Cock",
"difficulty": 4,
"tags": [ "tops" ]
},
"walburga": {
"description": "A FreeSewing pattern for a wappenrock (tabard/surcoat), a historical European/medieval (ish) garment",
"code": "Rika Tamaike",
"design": "Rika Tamaike",
"difficulty": 1,
"tags": [ "bottoms", "historic" ]
},
"waralee": {
"description": "A FreeSewing pattern for wrap pants",
"code": "Wouter Van Wageningen",
"design": "Wouter Van Wageningen",
"difficulty": 2,
"tags": [ "bottoms", "trousers" ]
},
"yuri": {
"description": "A FreeSewing pattern for a fancy zipless sweater based on the Huey hoodie",
"code": "Hellgy",
"design": "Biou",
"difficulty": 3,
"tags": [ "tops" ]
}
},
"utilities": {
"examples": "A FreeSewing pattern holding examples for our documentation",
"legend": "A FreeSewing pattern to document pattern notation",
"plugintest": "A FreeSewing pattern to test (y)our plugins",
"rendertest": "A FreeSewing pattern to test (y)our render engine our CSS",
"tutorial": "A FreeSewing pattern for a baby bib that's used in our tutorial"
"examples": {
"description": "A FreeSewing pattern holding examples for our documentation",
"code": "Joost De Cock"
},
"legend": {
"description": "A FreeSewing pattern to document pattern notation",
"code": "Joost De Cock"
},
"plugintest": {
"description": "A FreeSewing pattern to test (y)our plugins",
"code": "Joost De Cock"
},
"rendertest": {
"description": "A FreeSewing pattern to test (y)our render engine our CSS",
"code": "Joost De Cock"
},
"tutorial": {
"description": "A FreeSewing pattern for a baby bib that's used in our tutorial",
"code": "Joost De Cock"
}
}
}

View file

@ -5,7 +5,12 @@ import sites from './sites.json' assert { type: 'json' }
// Helper method to construct summary objects
const unpack = (obj, folder) => Object.fromEntries(
Object.keys(obj).map(name => [name, { name, folder, description: obj[name], type: folder.slice(0, -1) } ])
Object.keys(obj).map(name => [name, { name, folder, type: folder.slice(0, -1), description: obj[name] } ])
)
// Helper method to construct summary objects for designs
const unpackDesigns = (obj, folder) => Object.fromEntries(
Object.keys(obj).map(name => [name, { name, folder, type: folder.slice(0, -1), ...obj[name] } ])
)
const designs = {
@ -20,7 +25,7 @@ export { designs, designsByType, packages, plugins, sites }
// All software
export const software = {
...unpack(designs, 'designs'),
...unpackDesigns(designs, 'designs'),
...unpack(plugins, 'plugins'),
...unpack(packages, 'packages'),
...unpack(sites, 'sites'),
@ -28,7 +33,7 @@ export const software = {
// All software published on NPM
export const publishedSoftware = {
...unpack(designs, 'designs'),
...unpackDesigns(designs, 'designs'),
...unpack(plugins, 'plugins'),
...unpack(packages, 'packages'),
}

View file

@ -14,6 +14,7 @@ import {
} from '../config/software/index.mjs'
import { buildOrder } from '../config/build-order.mjs'
import rootPackageJson from '../package.json' assert { type: 'json' }
import { capitalize } from '../sites/shared/utils.mjs'
// Working directory
const cwd = process.cwd()
@ -111,7 +112,7 @@ log.write(chalk.green(" Done\n"))
for (const design in designs) {
fs.writeFileSync(
path.join(repo.path, 'designs', design, 'tests', 'shared.test.mjs'),
mustache.render(repo.templates.designTests, { name: design })
mustache.render(repo.templates.designTests, { name: design, Name: capitalize(design) })
)
}
for (const plugin in plugins) {