2022-11-29 16:10:19 -06:00
|
|
|
import { {{part}} as {{baseName}}{{partUpcase}} } from '@freesewing/{{baseName}}'
|
2022-10-06 15:34:41 +02:00
|
|
|
|
2022-11-29 16:10:19 -06:00
|
|
|
function draft{{partUpcase}} ({
|
2022-10-06 15:34:41 +02:00
|
|
|
// Uncomment below to destructure what you need
|
|
|
|
/*
|
|
|
|
* Content constructors
|
|
|
|
*/
|
|
|
|
//Path, // A Path constructor to create new paths
|
|
|
|
//Point, // A Point constructor to create new points
|
|
|
|
//Snippet, // A Snippet constructor to create new snippets
|
|
|
|
/*
|
|
|
|
* Content constainers
|
|
|
|
*/
|
|
|
|
//paths, // Add a Path to your part by adding it to this object
|
|
|
|
//points, // Add a Points to your part by adding it to this object
|
|
|
|
//snippets, // Add a Snippet to your part by adding it to this object
|
|
|
|
/*
|
|
|
|
* Access to settings
|
|
|
|
*/
|
|
|
|
//absoluteOptions, // Access to settings.absoluteOptions
|
|
|
|
//complete, // Access to settings.complete
|
|
|
|
//measurements, // Access to settings.measurements
|
|
|
|
//options, // Access to settings.options
|
|
|
|
//paperless, // Access to settings.paperless
|
|
|
|
//sa, // Access to settings.sa
|
|
|
|
//scale, // Access to settings.scale
|
|
|
|
/*
|
|
|
|
* Access to utilities
|
|
|
|
*/
|
|
|
|
//getId, //See the getId documentation
|
|
|
|
//hide, //See the hide documentation
|
|
|
|
//log, //See the logging documentation
|
|
|
|
//macro, //See the macros documentation
|
|
|
|
//setHidden, //See the setHidden documentation
|
|
|
|
//store, //See the store documentation
|
|
|
|
//unhide, //See the unhide documentation
|
|
|
|
//units, //See the units documentation
|
|
|
|
//utils, //See the utils documentation
|
|
|
|
/*
|
|
|
|
* Return value
|
|
|
|
*/
|
|
|
|
part, // Your draft method must return this
|
|
|
|
}) {
|
|
|
|
|
|
|
|
// Work your magic here
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
|
|
|
|
2022-11-29 16:10:19 -06:00
|
|
|
export const {{part}} = {
|
2022-10-06 15:34:41 +02:00
|
|
|
/*
|
|
|
|
* name: Holds the name of this part.
|
|
|
|
*
|
|
|
|
* We STRONGLY recommend naming your parts in the format of
|
|
|
|
* design.part to avoid naming conflicts when people re-use
|
|
|
|
* parts across designs.
|
|
|
|
*/
|
2022-11-29 16:10:19 -06:00
|
|
|
name: '{{ name }}.{{part}}',
|
2022-10-06 15:34:41 +02:00
|
|
|
/*
|
|
|
|
* draft: Holds the draft method for this part
|
|
|
|
*
|
|
|
|
* This should be a function that drafts and returns the part
|
|
|
|
*
|
|
|
|
* Documentation: https://freesewing.dev/reference/api/part/draft
|
|
|
|
*/
|
2022-11-29 16:10:19 -06:00
|
|
|
draft: draft{{partUpcase}},
|
2022-10-06 15:34:41 +02:00
|
|
|
after: [
|
|
|
|
/*
|
|
|
|
* after: Holds a list of parts that should be drafted prior to this part.
|
|
|
|
*
|
|
|
|
* You'll need to import these parts, just as with the from key above.
|
|
|
|
*
|
|
|
|
* If you don't have any parts to draft prior to this part,
|
|
|
|
* you can remove this options key entirely.
|
|
|
|
*
|
|
|
|
* Documentation: https://freesewing.dev/reference/api/part/config/dependencies
|
|
|
|
*/
|
|
|
|
],
|
|
|
|
/*
|
|
|
|
* from: Holds the part you want to extend.
|
|
|
|
*
|
2022-11-29 16:10:19 -06:00
|
|
|
* Since you opted to extend {{baseNameUpcase}}, and this is the {{part}} part,
|
|
|
|
* we're extending {{baseNameUpcase}}'s {{part}} part here.
|
|
|
|
* It was imported at the top of this file from @freesewing/{{baseNameUpcase}}
|
2022-10-06 15:34:41 +02:00
|
|
|
*
|
|
|
|
* Documentation: https://freesewing.dev/reference/api/part/config/dependencies
|
|
|
|
*/
|
2022-11-29 16:10:19 -06:00
|
|
|
from: {{baseName}}{{partUpcase}},
|
2022-10-06 15:34:41 +02:00
|
|
|
/*
|
|
|
|
* hide: Set this to true to hide a part.
|
|
|
|
*
|
|
|
|
* We've set this to false here to clarify its use.
|
|
|
|
* I you don't want to hide this part,
|
|
|
|
* you can remove the hide key entirely.
|
|
|
|
*/
|
|
|
|
hide: false,
|
|
|
|
/*
|
|
|
|
* hideDependecies: Set this to true to hide a part's dependencies.
|
|
|
|
*
|
2022-11-29 16:10:19 -06:00
|
|
|
* We've set this to true here since you're extending {{baseNameUpcase}}'s {{part}} part.
|
2022-10-06 15:34:41 +02:00
|
|
|
* I you don't want to hide this part's dependencies,
|
|
|
|
* you can remove the hideDependencies key entirely.
|
|
|
|
*/
|
|
|
|
hideDependencies: true,
|
|
|
|
/*
|
|
|
|
* hideAll: Set this to true to hide both the part and its dependencies.
|
|
|
|
*
|
|
|
|
* This is a combination of the hide and hideDependencies keys in case
|
|
|
|
* you want to both hide this part and its dependencies.
|
|
|
|
* We've included it here with a value of false to its use.
|
|
|
|
* I you don't want to hide this a part and its dependencies,
|
|
|
|
* you can remove the hideAll key entirely.
|
|
|
|
*/
|
|
|
|
hideAll: false,
|
|
|
|
options: {
|
|
|
|
/*
|
|
|
|
* options: Holds (the configuration of) options for this part
|
|
|
|
*
|
|
|
|
* Declare options used in this part here.
|
|
|
|
* You only need to add additional options.
|
2022-11-29 16:10:19 -06:00
|
|
|
* All options coming from {{baseNameUpcase}}'s {{part}} part are already loaded.
|
2022-10-06 15:34:41 +02:00
|
|
|
*
|
|
|
|
* If you don't have any options to add,
|
|
|
|
* you can remove this options key entirely.
|
|
|
|
*
|
|
|
|
* Documentation: https://freesewing.dev/reference/api/part/config/options
|
|
|
|
*/
|
|
|
|
},
|
|
|
|
measurements: [
|
|
|
|
/*
|
|
|
|
* measurements: Holds a list of measurements required by this part.
|
|
|
|
*
|
|
|
|
* Declare measurements required by this part here.
|
|
|
|
* You only need to add additional measurements.
|
2022-11-29 16:10:19 -06:00
|
|
|
* All measurements coming from {{baseNameUpcase}}'s {{part}} part are already loaded.
|
2022-10-06 15:34:41 +02:00
|
|
|
*
|
|
|
|
* If you don't have any required measurements to add,
|
|
|
|
* you can remove this measurements key entirely.
|
|
|
|
*
|
|
|
|
* Documentation: https://freesewing.dev/reference/api/part/config/measurements
|
|
|
|
*/
|
|
|
|
],
|
|
|
|
optionalMeasurements: [
|
|
|
|
/*
|
|
|
|
* optionalMeasurements: Holds a list of measurements optional in this part.
|
|
|
|
*
|
|
|
|
* Declare measurements that are optional for this part here.
|
|
|
|
*
|
|
|
|
* If you don't have any optional measurements to add,
|
|
|
|
* you can remove this optionalMeasurements key entirely.
|
|
|
|
*
|
|
|
|
* Documentation: https://freesewing.dev/reference/api/part/config/measurements
|
|
|
|
*/
|
|
|
|
],
|
|
|
|
plugins: [
|
|
|
|
/*
|
|
|
|
* plugins: Holds a list of plugins this part relies on.
|
|
|
|
*
|
|
|
|
* Add all the plugins here that you need in this part.
|
|
|
|
* You only need to add additional plugins.
|
2022-11-29 16:10:19 -06:00
|
|
|
* All plugins coming from {{baseNameUpcase}}'s {{part}} part are already loaded.
|
2022-10-06 15:34:41 +02:00
|
|
|
*
|
|
|
|
* If you don't have any plugins to add,
|
|
|
|
* you can remove this plugins key entirely.
|
|
|
|
*
|
|
|
|
* Documentation: https://freesewing.dev/reference/api/part/config/plugins
|
|
|
|
*/
|
|
|
|
]
|
|
|
|
}
|