chore: Various prebuild/reconfigure steps to integrate gozer
This commit is contained in:
parent
b797cdfdab
commit
ded3347d2c
17 changed files with 431 additions and 8 deletions
|
@ -345,6 +345,8 @@
|
|||
"description": "A FreeSewing pattern for a ghost costume",
|
||||
"design": "Wouter Van Wageningen",
|
||||
"difficulty": 1,
|
||||
"lab": true,
|
||||
"org": true,
|
||||
"tags": [
|
||||
"costumes"
|
||||
],
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
|
||||
# @freesewing/gozer
|
||||
|
||||
A FreeSewing pattern that needs a description
|
||||
A FreeSewing pattern for a ghost costume
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "@freesewing/gozer",
|
||||
"version": "3.0.0",
|
||||
"description": "A FreeSewing pattern that needs a description",
|
||||
"description": "A FreeSewing pattern for a ghost costume",
|
||||
"author": "Joost De Cock <joost@joost.at> (https://github.com/joostdecock)",
|
||||
"homepage": "https://freesewing.org/",
|
||||
"repository": "github:freesewing/freesewing",
|
||||
|
|
|
@ -2,7 +2,5 @@
|
|||
title: Gozer the ghost
|
||||
---
|
||||
|
||||
|
||||
|
||||
<DesignInfo design='gozer' docs />
|
||||
|
||||
|
|
|
@ -12,4 +12,4 @@ title: "Gozer the ghost: Sewing Instructions"
|
|||
|
||||
## Step 3: Enjoy!
|
||||
|
||||
That's it, you are all done. Put it on and scare the neighborhood
|
||||
That's it, you are all done. Put it on and scare the neighborhood.
|
||||
|
|
|
@ -20,6 +20,7 @@ import { Cornelius as cornelius } from '@freesewing/cornelius'
|
|||
import { Diana as diana } from '@freesewing/diana'
|
||||
import { Florence as florence } from '@freesewing/florence'
|
||||
import { Florent as florent } from '@freesewing/florent'
|
||||
import { Gozer as gozer } from '@freesewing/gozer'
|
||||
import { Hi as hi } from '@freesewing/hi'
|
||||
import { Holmes as holmes } from '@freesewing/holmes'
|
||||
import { Hortensia as hortensia } from '@freesewing/hortensia'
|
||||
|
@ -73,6 +74,7 @@ const designs = {
|
|||
diana,
|
||||
florence,
|
||||
florent,
|
||||
gozer,
|
||||
hi,
|
||||
holmes,
|
||||
hortensia,
|
||||
|
|
98
sites/lab/pages/account/patterns/gozer/[id]/edit.mjs
Normal file
98
sites/lab/pages/account/patterns/gozer/[id]/edit.mjs
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* This page is auto-generated. Do not edit it by hand.
|
||||
*/
|
||||
import { Gozer } from 'designs/gozer/src/index.mjs'
|
||||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
// Hooks
|
||||
import { useState, useEffect, useContext } from 'react'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||
// Context
|
||||
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/new.mjs'
|
||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||
import { Loading } from 'shared/components/spinner.mjs'
|
||||
|
||||
// Translation namespaces used on this page
|
||||
const ns = nsMerge('gozer', wbNs, pageNs)
|
||||
|
||||
const EditDesignComponent = ({ id, design, Design, settings, docs }) => (
|
||||
<Workbench preload={{ settings }} saveAs={{ pattern: id }} {...{ design, Design, docs }} />
|
||||
)
|
||||
|
||||
const EditGozerPage = ({ page, docs, id }) => {
|
||||
const { setLoadingStatus } = useContext(LoadingStatusContext)
|
||||
const backend = useBackend()
|
||||
const { t } = useTranslation(ns)
|
||||
|
||||
const [pattern, setPattern] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
const getPattern = async () => {
|
||||
setLoadingStatus([true, t('backendLoadingStarted')])
|
||||
let result
|
||||
try {
|
||||
result = await backend.getPattern(id)
|
||||
if (result.success) {
|
||||
setPattern(result.data.pattern)
|
||||
setLoadingStatus([true, 'backendLoadingCompleted', true, true])
|
||||
} else setLoadingStatus([true, 'backendError', true, false])
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
setLoadingStatus([true, 'backendError', true, false])
|
||||
}
|
||||
}
|
||||
if (id) getPattern()
|
||||
}, [id])
|
||||
|
||||
return (
|
||||
// prettier-ignore
|
||||
<PageWrapper {...page} title="Gozer" layout={pattern ? WorkbenchLayout : false} header={null}>
|
||||
{pattern ? (
|
||||
<EditDesignComponent
|
||||
id={pattern.id}
|
||||
settings={pattern.settings}
|
||||
design="gozer"
|
||||
Design={Gozer}
|
||||
docs={docs}
|
||||
/>
|
||||
) : (
|
||||
<div>
|
||||
<h1>{t('account:oneMomentPLease')}</h1>
|
||||
<Loading />
|
||||
</div>
|
||||
)}
|
||||
</PageWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
export default EditGozerPage
|
||||
|
||||
export async function getStaticProps({ locale, params }) {
|
||||
return {
|
||||
props: {
|
||||
...(await serverSideTranslations(locale, ns)),
|
||||
id: params.id,
|
||||
page: {
|
||||
locale,
|
||||
path: ['account', 'patterns', 'gozer', params.id, 'edit'],
|
||||
title: 'Gozer',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* getStaticPaths() is used to specify for which routes (think URLs)
|
||||
* this page should be used to generate the result.
|
||||
*/
|
||||
export async function getStaticPaths() {
|
||||
return {
|
||||
paths: [],
|
||||
fallback: 'blocking',
|
||||
}
|
||||
}
|
98
sites/lab/pages/account/patterns/skully/[id]/edit.mjs
Normal file
98
sites/lab/pages/account/patterns/skully/[id]/edit.mjs
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* This page is auto-generated. Do not edit it by hand.
|
||||
*/
|
||||
import { Skully } from 'designs/skully/src/index.mjs'
|
||||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
// Hooks
|
||||
import { useState, useEffect, useContext } from 'react'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||
// Context
|
||||
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/new.mjs'
|
||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||
import { Loading } from 'shared/components/spinner.mjs'
|
||||
|
||||
// Translation namespaces used on this page
|
||||
const ns = nsMerge('skully', wbNs, pageNs)
|
||||
|
||||
const EditDesignComponent = ({ id, design, Design, settings, docs }) => (
|
||||
<Workbench preload={{ settings }} saveAs={{ pattern: id }} {...{ design, Design, docs }} />
|
||||
)
|
||||
|
||||
const EditSkullyPage = ({ page, docs, id }) => {
|
||||
const { setLoadingStatus } = useContext(LoadingStatusContext)
|
||||
const backend = useBackend()
|
||||
const { t } = useTranslation(ns)
|
||||
|
||||
const [pattern, setPattern] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
const getPattern = async () => {
|
||||
setLoadingStatus([true, t('backendLoadingStarted')])
|
||||
let result
|
||||
try {
|
||||
result = await backend.getPattern(id)
|
||||
if (result.success) {
|
||||
setPattern(result.data.pattern)
|
||||
setLoadingStatus([true, 'backendLoadingCompleted', true, true])
|
||||
} else setLoadingStatus([true, 'backendError', true, false])
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
setLoadingStatus([true, 'backendError', true, false])
|
||||
}
|
||||
}
|
||||
if (id) getPattern()
|
||||
}, [id])
|
||||
|
||||
return (
|
||||
// prettier-ignore
|
||||
<PageWrapper {...page} title="Skully" layout={pattern ? WorkbenchLayout : false} header={null}>
|
||||
{pattern ? (
|
||||
<EditDesignComponent
|
||||
id={pattern.id}
|
||||
settings={pattern.settings}
|
||||
design="skully"
|
||||
Design={Skully}
|
||||
docs={docs}
|
||||
/>
|
||||
) : (
|
||||
<div>
|
||||
<h1>{t('account:oneMomentPLease')}</h1>
|
||||
<Loading />
|
||||
</div>
|
||||
)}
|
||||
</PageWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
export default EditSkullyPage
|
||||
|
||||
export async function getStaticProps({ locale, params }) {
|
||||
return {
|
||||
props: {
|
||||
...(await serverSideTranslations(locale, ns)),
|
||||
id: params.id,
|
||||
page: {
|
||||
locale,
|
||||
path: ['account', 'patterns', 'skully', params.id, 'edit'],
|
||||
title: 'Skully',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* getStaticPaths() is used to specify for which routes (think URLs)
|
||||
* this page should be used to generate the result.
|
||||
*/
|
||||
export async function getStaticPaths() {
|
||||
return {
|
||||
paths: [],
|
||||
fallback: 'blocking',
|
||||
}
|
||||
}
|
41
sites/lab/pages/new/gozer.mjs
Normal file
41
sites/lab/pages/new/gozer.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* This page is auto-generated. Do not edit it by hand.
|
||||
*/
|
||||
import { Gozer } from 'designs/gozer/src/index.mjs'
|
||||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/new.mjs'
|
||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||
|
||||
// Translation namespaces used on this page
|
||||
const ns = nsMerge('gozer', wbNs, pageNs)
|
||||
|
||||
const NewGozerPage = ({ page, docs }) => (
|
||||
<PageWrapper {...page} title="Gozer" layout={WorkbenchLayout} header={null}>
|
||||
<Workbench
|
||||
{...{
|
||||
design: 'gozer',
|
||||
Design: Gozer,
|
||||
docs,
|
||||
}}
|
||||
/>
|
||||
</PageWrapper>
|
||||
)
|
||||
|
||||
export default NewGozerPage
|
||||
|
||||
export async function getStaticProps({ locale }) {
|
||||
return {
|
||||
props: {
|
||||
...(await serverSideTranslations(locale, ns)),
|
||||
page: {
|
||||
locale,
|
||||
path: ['new', 'gozer'],
|
||||
title: 'Gozer',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
41
sites/lab/pages/new/skully.mjs
Normal file
41
sites/lab/pages/new/skully.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* This page is auto-generated. Do not edit it by hand.
|
||||
*/
|
||||
import { Skully } from 'designs/skully/src/index.mjs'
|
||||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/new.mjs'
|
||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||
|
||||
// Translation namespaces used on this page
|
||||
const ns = nsMerge('skully', wbNs, pageNs)
|
||||
|
||||
const NewSkullyPage = ({ page, docs }) => (
|
||||
<PageWrapper {...page} title="Skully" layout={WorkbenchLayout} header={null}>
|
||||
<Workbench
|
||||
{...{
|
||||
design: 'skully',
|
||||
Design: Skully,
|
||||
docs,
|
||||
}}
|
||||
/>
|
||||
</PageWrapper>
|
||||
)
|
||||
|
||||
export default NewSkullyPage
|
||||
|
||||
export async function getStaticProps({ locale }) {
|
||||
return {
|
||||
props: {
|
||||
...(await serverSideTranslations(locale, ns)),
|
||||
page: {
|
||||
locale,
|
||||
path: ['new', 'skully'],
|
||||
title: 'Skully',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
|
@ -20,6 +20,7 @@ import { Cornelius as cornelius } from '@freesewing/cornelius'
|
|||
import { Diana as diana } from '@freesewing/diana'
|
||||
import { Florence as florence } from '@freesewing/florence'
|
||||
import { Florent as florent } from '@freesewing/florent'
|
||||
import { Gozer as gozer } from '@freesewing/gozer'
|
||||
import { Hi as hi } from '@freesewing/hi'
|
||||
import { Holmes as holmes } from '@freesewing/holmes'
|
||||
import { Hortensia as hortensia } from '@freesewing/hortensia'
|
||||
|
@ -70,6 +71,7 @@ const designs = {
|
|||
diana,
|
||||
florence,
|
||||
florent,
|
||||
gozer,
|
||||
hi,
|
||||
holmes,
|
||||
hortensia,
|
||||
|
|
98
sites/org/pages/account/patterns/gozer/[id]/edit.mjs
Normal file
98
sites/org/pages/account/patterns/gozer/[id]/edit.mjs
Normal file
|
@ -0,0 +1,98 @@
|
|||
/*
|
||||
* This page is auto-generated. Do not edit it by hand.
|
||||
*/
|
||||
import { Gozer } from 'designs/gozer/src/index.mjs'
|
||||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
// Hooks
|
||||
import { useState, useEffect, useContext } from 'react'
|
||||
import { useTranslation } from 'next-i18next'
|
||||
import { useBackend } from 'shared/hooks/use-backend.mjs'
|
||||
// Context
|
||||
import { LoadingStatusContext } from 'shared/context/loading-status-context.mjs'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/new.mjs'
|
||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||
import { Loading } from 'shared/components/spinner.mjs'
|
||||
|
||||
// Translation namespaces used on this page
|
||||
const ns = nsMerge('gozer', wbNs, pageNs)
|
||||
|
||||
const EditDesignComponent = ({ id, design, Design, settings, docs }) => (
|
||||
<Workbench preload={{ settings }} saveAs={{ pattern: id }} {...{ design, Design, docs }} />
|
||||
)
|
||||
|
||||
const EditGozerPage = ({ page, docs, id }) => {
|
||||
const { setLoadingStatus } = useContext(LoadingStatusContext)
|
||||
const backend = useBackend()
|
||||
const { t } = useTranslation(ns)
|
||||
|
||||
const [pattern, setPattern] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
const getPattern = async () => {
|
||||
setLoadingStatus([true, t('backendLoadingStarted')])
|
||||
let result
|
||||
try {
|
||||
result = await backend.getPattern(id)
|
||||
if (result.success) {
|
||||
setPattern(result.data.pattern)
|
||||
setLoadingStatus([true, 'backendLoadingCompleted', true, true])
|
||||
} else setLoadingStatus([true, 'backendError', true, false])
|
||||
} catch (err) {
|
||||
console.log(err)
|
||||
setLoadingStatus([true, 'backendError', true, false])
|
||||
}
|
||||
}
|
||||
if (id) getPattern()
|
||||
}, [id])
|
||||
|
||||
return (
|
||||
// prettier-ignore
|
||||
<PageWrapper {...page} title="Gozer" layout={pattern ? WorkbenchLayout : false} header={null}>
|
||||
{pattern ? (
|
||||
<EditDesignComponent
|
||||
id={pattern.id}
|
||||
settings={pattern.settings}
|
||||
design="gozer"
|
||||
Design={Gozer}
|
||||
docs={docs}
|
||||
/>
|
||||
) : (
|
||||
<div>
|
||||
<h1>{t('account:oneMomentPLease')}</h1>
|
||||
<Loading />
|
||||
</div>
|
||||
)}
|
||||
</PageWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
export default EditGozerPage
|
||||
|
||||
export async function getStaticProps({ locale, params }) {
|
||||
return {
|
||||
props: {
|
||||
...(await serverSideTranslations(locale, ns)),
|
||||
id: params.id,
|
||||
page: {
|
||||
locale,
|
||||
path: ['account', 'patterns', 'gozer', params.id, 'edit'],
|
||||
title: 'Gozer',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* getStaticPaths() is used to specify for which routes (think URLs)
|
||||
* this page should be used to generate the result.
|
||||
*/
|
||||
export async function getStaticPaths() {
|
||||
return {
|
||||
paths: [],
|
||||
fallback: 'blocking',
|
||||
}
|
||||
}
|
41
sites/org/pages/new/gozer.mjs
Normal file
41
sites/org/pages/new/gozer.mjs
Normal file
|
@ -0,0 +1,41 @@
|
|||
/*
|
||||
* This page is auto-generated. Do not edit it by hand.
|
||||
*/
|
||||
import { Gozer } from 'designs/gozer/src/index.mjs'
|
||||
// Dependencies
|
||||
import { serverSideTranslations } from 'next-i18next/serverSideTranslations'
|
||||
import { nsMerge } from 'shared/utils.mjs'
|
||||
// Components
|
||||
import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs'
|
||||
import { Workbench, ns as wbNs } from 'shared/components/workbench/new.mjs'
|
||||
import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs'
|
||||
|
||||
// Translation namespaces used on this page
|
||||
const ns = nsMerge('gozer', wbNs, pageNs)
|
||||
|
||||
const NewGozerPage = ({ page, docs }) => (
|
||||
<PageWrapper {...page} title="Gozer" layout={WorkbenchLayout} header={null}>
|
||||
<Workbench
|
||||
{...{
|
||||
design: 'gozer',
|
||||
Design: Gozer,
|
||||
docs,
|
||||
}}
|
||||
/>
|
||||
</PageWrapper>
|
||||
)
|
||||
|
||||
export default NewGozerPage
|
||||
|
||||
export async function getStaticProps({ locale }) {
|
||||
return {
|
||||
props: {
|
||||
...(await serverSideTranslations(locale, ns)),
|
||||
page: {
|
||||
locale,
|
||||
path: ['new', 'gozer'],
|
||||
title: 'Gozer',
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@ import { i18n as diana } from '@freesewing/diana'
|
|||
import { i18n as examples } from '@freesewing/examples'
|
||||
import { i18n as florence } from '@freesewing/florence'
|
||||
import { i18n as florent } from '@freesewing/florent'
|
||||
import { i18n as gozer } from '@freesewing/gozer'
|
||||
import { i18n as hi } from '@freesewing/hi'
|
||||
import { i18n as holmes } from '@freesewing/holmes'
|
||||
import { i18n as hortensia } from '@freesewing/hortensia'
|
||||
|
@ -76,6 +77,7 @@ export const designs = {
|
|||
examples,
|
||||
florence,
|
||||
florent,
|
||||
gozer,
|
||||
hi,
|
||||
holmes,
|
||||
hortensia,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1,3 +1,3 @@
|
|||
// __SDEFILE__ - This file is a dependency for the stand-alone environment
|
||||
// This file is auto-generated by the prebuild script | Any changes will be overwritten
|
||||
export const designs = ["aaron","albert","bee","bella","benjamin","bent","bob","breanna","brian","bruce","carlita","carlton","cathrin","charlie","cornelius","diana","examples","florence","florent","hi","holmes","hortensia","huey","hugo","jaeger","legend","lucy","lunetius","magde","noble","octoplushy","paco","penelope","plugintest","rendertest","sandy","shelly","shin","simon","simone","skully","sven","tamiko","teagan","tiberius","titan","trayvon","uma","wahid","walburga","waralee","yuri","otis"]
|
||||
export const designs = ["aaron","albert","bee","bella","benjamin","bent","bob","breanna","brian","bruce","carlita","carlton","cathrin","charlie","cornelius","diana","examples","florence","florent","gozer","hi","holmes","hortensia","huey","hugo","jaeger","legend","lucy","lunetius","magde","noble","octoplushy","paco","penelope","plugintest","rendertest","sandy","shelly","shin","simon","simone","skully","sven","tamiko","teagan","tiberius","titan","trayvon","uma","wahid","walburga","waralee","yuri","otis"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue