1
0
Fork 0
freesewing/packages/new-design/templates/shared/index.mjs.mustache

32 lines
721 B
Text
Raw Normal View History

// Import Design constructor
import { Design } from '@freesewing/core'
// Import parts
{{#parts}}
import { {{.}} } from './{{.}}.mjs'
{{/parts}}
// Create the new design
2022-10-08 04:24:49 +02:00
const Pattern = new Design({
data: {
/*
* If you like, you can add any data you want to your design.
* We'll add the name here as an example.
*
* If you don't use this,
* you can remove this data key enterely.
*/
name: "{{ name }}",
},
// A list of parts is all that is required.
parts: [ {{parts}} ],
})
/*
* Named exports
*
* We export the design itself as well as each part individually.
* This allows us to re-use these parts in other designs.
*/
export { {{#parts}}{{.}}, {{/parts}}Pattern }