1
0
Fork 0
freesewing/designs/simone/src/index.mjs

83 lines
1.6 KiB
JavaScript
Raw Normal View History

2023-07-02 16:42:41 +02:00
import { Design, mergeI18n } from '@freesewing/core'
2022-09-04 18:20:39 +02:00
import { data } from '../data.mjs'
2023-07-02 16:42:41 +02:00
import { i18n as simonI18n } from '@freesewing/simon'
import { i18n as simoneI18n } from '../i18n/index.mjs'
2022-09-04 18:20:39 +02:00
import {
// We use these as-is from simon
back,
collar,
collarStand,
cuff,
sleeve,
sleevePlacketOverlap,
sleevePlacketUnderlap,
yoke,
// We'll update these to use simone's front as dependency
buttonholePlacket as simonButtonholePlacket,
buttonPlacket as simonButtonPlacket,
frontRight as simonFrontRight,
frontLeft as simonFrontLeft,
} from '@freesewing/simon'
// Re-export skeleton parts so peope can re-use them
import { fbaFront } from './fba-front.mjs'
2019-09-25 18:02:05 +02:00
2022-09-04 18:20:39 +02:00
// Update these to use simone's front as dependency
const buttonholePlacket = {
...simonButtonholePlacket,
from: fbaFront,
2019-09-25 18:02:05 +02:00
}
2022-09-04 18:20:39 +02:00
const buttonPlacket = {
...simonButtonPlacket,
from: fbaFront,
2019-09-25 18:02:05 +02:00
}
2022-09-04 18:20:39 +02:00
const frontRight = {
...simonFrontRight,
from: fbaFront,
2019-09-25 18:02:05 +02:00
}
2022-09-04 18:20:39 +02:00
const frontLeft = {
...simonFrontLeft,
from: fbaFront,
2019-09-25 18:02:05 +02:00
}
2022-09-04 18:20:39 +02:00
// Setup our new design
const Simone = new Design({
data,
parts: [
fbaFront,
back,
collar,
collarStand,
cuff,
sleeve,
sleevePlacketOverlap,
sleevePlacketUnderlap,
yoke,
buttonholePlacket,
buttonPlacket,
frontRight,
frontLeft,
],
})
2019-09-25 18:02:05 +02:00
2023-07-02 16:42:41 +02:00
// Merge translations
const i18n = mergeI18n([simonI18n, simoneI18n])
2022-09-04 18:20:39 +02:00
// Export all parts to facilitate extending this pattern
export {
fbaFront,
back,
collar,
collarStand,
cuff,
sleeve,
sleevePlacketOverlap,
sleevePlacketUnderlap,
yoke,
buttonholePlacket,
buttonPlacket,
frontRight,
frontLeft,
Simone,
2023-07-02 16:42:41 +02:00
i18n,
2019-09-25 18:02:05 +02:00
}