2022-10-13 16:19:36 +02:00
|
|
|
import { designs, plugins, packages } from './software/index.mjs'
|
2022-06-16 17:11:31 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
* As this monorepo has interlocking dependencies
|
|
|
|
* we need to ensure things get built in the correct
|
|
|
|
* order. This file takes care of that
|
|
|
|
*/
|
|
|
|
|
2022-10-13 16:19:36 +02:00
|
|
|
const first = ['core', 'config-helpers', 'remark-jargon', 'snapseries']
|
|
|
|
const blocks = ['brian', 'titan', 'bella', 'breanna']
|
|
|
|
const extended = ['bent', 'simon', 'carlton', 'ursula']
|
2022-07-03 18:38:18 -05:00
|
|
|
const last = ['i18n']
|
2022-06-16 17:11:31 +02:00
|
|
|
|
|
|
|
export const buildOrder = [
|
|
|
|
// First build FreeSewing core library and config-helpers
|
|
|
|
first,
|
|
|
|
|
2022-06-16 17:34:18 +02:00
|
|
|
// Then build all FreeSewing plugins, but not the bundle
|
2022-10-13 16:19:36 +02:00
|
|
|
Object.keys(plugins).filter((id) => id !== 'plugin-bundle'),
|
2022-06-16 17:11:31 +02:00
|
|
|
|
2022-06-16 17:34:18 +02:00
|
|
|
// Then build the plugin bundle
|
2022-10-13 16:19:36 +02:00
|
|
|
['plugin-bundle'],
|
2022-06-16 17:11:31 +02:00
|
|
|
|
|
|
|
// Then build all FreeSewing designs that are blocks
|
|
|
|
blocks,
|
|
|
|
|
2022-06-16 18:05:44 +02:00
|
|
|
// Then build all FreeSewing designs that are further extended
|
|
|
|
extended,
|
2022-06-16 17:11:31 +02:00
|
|
|
|
2022-06-16 18:05:44 +02:00
|
|
|
// Then build all remaining designs
|
2022-10-13 16:19:36 +02:00
|
|
|
Object.keys(designs).filter((id) => [...blocks, ...extended].indexOf(id) === -1),
|
2022-06-16 18:05:44 +02:00
|
|
|
|
|
|
|
// Finally build the rest of the packages
|
2022-10-13 16:19:36 +02:00
|
|
|
Object.keys(packages).filter((id) => first.indexOf(id) === -1 && last.indexOf(id) === -1),
|
2022-07-03 18:38:18 -05:00
|
|
|
|
2022-10-13 16:19:36 +02:00
|
|
|
last,
|
2022-06-16 17:11:31 +02:00
|
|
|
]
|