How to port designs from v2 to v3 #2715
Closed
BenJamesBen
started this conversation in
Forum
Replies: 3 comments 2 replies
-
I changed the instructions to:
|
Beta Was this translation helpful? Give feedback.
2 replies
-
function draftHiBody (part) {
const {
store,
sa,
...
utils,
} = part.shorthand() To: function draftHiBody({
store,
sa,
...
utils,
part,
}) { |
Beta Was this translation helpful? Give feedback.
0 replies
-
Pretty sure everything is ported now. Closing. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to port designs from v2 to v3
git fetch
to get upstream branch info.git switch v3
to create and switch to the v3 branch.)git branch working-v3-for-porting
,git switch working-v3-for-porting
.)config/index.js
, because this file will be deleted in the next step. (In thedesign/[designame]
folder,cp config/index.js src/config.js.old
).config
subdirectory. (git rm -r config
.)*.js
file in thesrc
subdirectory, rename the file as*.mjs
. (git mv file.js file.mjs
).)*.mjs
files, starting withindex.mjs
. The examples below assume a design named Designname with 3 parts: base, front, and back. Examples will work on the base part.index.mjs
:import freesewing from '@freesewing/core'
toimport { Design } from '@freesewing/core'
.import plugins from '@freesewing/plugin-bundle'
. (But, remember that we'll need to add plugin information to one of the other.mjs
files later.)import config from '../config'
.import draftBase from './base'
toimport { base } from './base.mjs'
.const Designname = new freesewing.Design(config, plugins)
to:export { config, Designname }
toexport { base, front, back, Designname }
. (We're exporting all parts so other patterns can inherit/use them in the future, if desired.)Example:
*.mjs
files, at the very top of the file add anyimport
statements that are needed.export default function (part) {
line tofunction draftDesignnamePartname (part) {
. For example,function draftBenjaminRibbon (part) {
. Leave all the remaining code intact.For example:
from:
) or depends upon (after:
) other parts, for example::import { base } from './base.mjs'
.from: base,
(orafter: base,
, depending on the relationship)after: [ base, back],
config.js.old
file you copied/saved earlier.hide: true,
.import { pluginBundle } from '@freesewing/plugin-bundle'
.plugins: [ pluginBundle ],
.import { withCondition as bustPlugin } from '@freesewing/plugin-bust'
. Add the plugin to theplugins: [ ],
array.menu: 'menuname'
section at the end to specify which menu the option should be listed under. You can usename.subname.subname2
to indicate nested submenus.Beta Was this translation helpful? Give feedback.
All reactions