2018-12-07 16:19:46 +01:00
|
|
|
import aaron from "@freesewing/aaron";
|
|
|
|
import brian from "@freesewing/brian";
|
|
|
|
import bruce from "@freesewing/bruce";
|
|
|
|
import cathrin from "@freesewing/cathrin";
|
|
|
|
import hugo from "@freesewing/hugo";
|
|
|
|
import info from "./info";
|
|
|
|
|
|
|
|
export const patterns = {
|
|
|
|
aaron,
|
|
|
|
brian,
|
2018-12-08 15:48:32 +01:00
|
|
|
// bruce,
|
|
|
|
// cathrin,
|
|
|
|
// hugo,
|
2018-12-07 16:19:46 +01:00
|
|
|
Aaron: aaron,
|
2018-12-08 15:48:32 +01:00
|
|
|
Brian: brian
|
|
|
|
// Bruce: bruce,
|
|
|
|
// Cathrin: cathrin,
|
|
|
|
// Hugo: hugo
|
2018-12-07 16:19:46 +01:00
|
|
|
};
|
|
|
|
|
2018-12-08 15:48:32 +01:00
|
|
|
//export const patternList = ["aaron", "brian", "bruce", "cathrin", "hugo"];
|
|
|
|
export const patternList = ["aaron", "brian"];
|
2018-12-07 16:19:46 +01:00
|
|
|
|
|
|
|
let list = [];
|
|
|
|
for (let p of patternList) {
|
2018-12-08 15:48:32 +01:00
|
|
|
let pattern = new patterns[p]();
|
|
|
|
for (let m of pattern.config.measurements) list.push(m);
|
|
|
|
info[p].measurements = pattern.config.measurements;
|
2018-12-07 16:19:46 +01:00
|
|
|
info[p].options = [];
|
2018-12-08 15:48:32 +01:00
|
|
|
for (let o of Object.keys(pattern.config.options)) {
|
|
|
|
if (typeof pattern.config.options[o] === "object") info[p].options.push(o);
|
2018-12-07 16:19:46 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export const patternInfo = info;
|
|
|
|
|
|
|
|
export const measurementList = list.filter(function(value, index, self) {
|
|
|
|
return self.indexOf(value) === index;
|
|
|
|
});
|