1
0
Fork 0

♻️ Refactor: Switched to TypeScript for module

This commit is contained in:
Joost De Cock 2018-07-10 19:05:55 +02:00
parent f96c98c99c
commit 248ed2b7c3
6 changed files with 177 additions and 89 deletions

10
packages/models/index.d.ts vendored Normal file
View file

@ -0,0 +1,10 @@
interface Model {
[index: string]: number;
}
export declare const manSize34: Model;
export declare const manSize36: Model;
export declare const manSize38: Model;
export declare const manSize40: Model;
export declare const manSize42: Model;
export declare const manSize44: Model;
export {};

View file

@ -1,94 +1,74 @@
const manSize34 = { "use strict";
bicepsCircumference: 335, Object.defineProperty(exports, "__esModule", { value: true });
centerBackNeckToWaist: 489, exports.manSize34 = {
chestCircumference: 849, bicepsCircumference: 335,
hipsCircumference: 722, centerBackNeckToWaist: 489,
naturalWaistToHip: 100, chestCircumference: 849,
neckCircumference: 366, hipsCircumference: 722,
shoulderSlope: 43, naturalWaistToHip: 100,
shoulderToShoulder: 419, neckCircumference: 366,
shoulderToWrist: 670, shoulderSlope: 43,
wristCircumference: 175 shoulderToShoulder: 419,
shoulderToWrist: 670,
wristCircumference: 175
}; };
exports.manSize36 = {
const manSize36 = { bicepsCircumference: 290,
bicepsCircumference: 290, centerBackNeckToWaist: 492,
centerBackNeckToWaist: 492, chestCircumference: 907,
chestCircumference: 907, hipsCircumference: 780,
hipsCircumference: 780, naturalWaistToHip: 105,
naturalWaistToHip: 105, neckCircumference: 378,
neckCircumference: 378, shoulderSlope: 46,
shoulderSlope: 46, shoulderToShoulder: 431,
shoulderToShoulder: 431, shoulderToWrist: 675,
shoulderToWrist: 675, wristCircumference: 180
wristCircumference: 180
}; };
exports.manSize38 = {
const manSize38 = { bicepsCircumference: 305,
bicepsCircumference: 305, centerBackNeckToWaist: 495,
centerBackNeckToWaist: 495, chestCircumference: 965,
chestCircumference: 965, hipsCircumference: 838,
hipsCircumference: 838, naturalWaistToHip: 110,
naturalWaistToHip: 110, neckCircumference: 391,
neckCircumference: 391, shoulderSlope: 49,
shoulderSlope: 49, shoulderToShoulder: 444,
shoulderToShoulder: 444, shoulderToWrist: 680,
shoulderToWrist: 680, wristCircumference: 185
wristCircumference: 185
}; };
exports.manSize40 = {
const manSize40 = { bicepsCircumference: 320,
bicepsCircumference: 320, centerBackNeckToWaist: 498,
centerBackNeckToWaist: 498, chestCircumference: 1023,
chestCircumference: 1023, hipsCircumference: 896,
hipsCircumference: 896, naturalWaistToHip: 115,
naturalWaistToHip: 115, neckCircumference: 404,
neckCircumference: 404, shoulderSlope: 52,
shoulderSlope: 52, shoulderToShoulder: 457,
shoulderToShoulder: 457, shoulderToWrist: 685,
shoulderToWrist: 685, wristCircumference: 190
wristCircumference: 190
}; };
exports.manSize42 = {
const manSize42 = { bicepsCircumference: 335,
bicepsCircumference: 335, centerBackNeckToWaist: 501,
centerBackNeckToWaist: 501, chestCircumference: 1081,
chestCircumference: 1081, hipsCircumference: 895,
hipsCircumference: 895, naturalWaistToHip: 120,
naturalWaistToHip: 120, neckCircumference: 416,
neckCircumference: 416, shoulderSlope: 55,
shoulderSlope: 55, shoulderToShoulder: 470,
shoulderToShoulder: 470, shoulderToWrist: 690,
shoulderToWrist: 690, wristCircumference: 195
wristCircumference: 195
}; };
exports.manSize44 = {
const manSize44 = { bicepsCircumference: 350,
bicepsCircumference: 350, centerBackNeckToWaist: 505,
centerBackNeckToWaist: 505, chestCircumference: 1139,
chestCircumference: 1139, hipsCircumference: 1012,
hipsCircumference: 1012, naturalWaistToHip: 125,
naturalWaistToHip: 125, neckCircumference: 429,
neckCircumference: 429, shoulderSlope: 58,
shoulderSlope: 58, shoulderToShoulder: 483,
shoulderToShoulder: 483, shoulderToWrist: 700,
shoulderToWrist: 700, wristCircumference: 200
wristCircumference: 200
}; };
const men = {
manSize34,
manSize36,
manSize38,
manSize40,
manSize42,
manSize44
}
module.exports.manSize34 = manSize34;
module.exports.manSize36 = manSize36;
module.exports.manSize38 = manSize38;
module.exports.manSize40 = manSize40;
module.exports.manSize42 = manSize42;
module.exports.manSize44 = manSize44;
module.exports.men = men;

81
packages/models/index.ts Normal file
View file

@ -0,0 +1,81 @@
interface Model {
[index: string]: number;
}
export const manSize34: Model = {
bicepsCircumference: 335,
centerBackNeckToWaist: 489,
chestCircumference: 849,
hipsCircumference: 722,
naturalWaistToHip: 100,
neckCircumference: 366,
shoulderSlope: 43,
shoulderToShoulder: 419,
shoulderToWrist: 670,
wristCircumference: 175
};
export const manSize36: Model = {
bicepsCircumference: 290,
centerBackNeckToWaist: 492,
chestCircumference: 907,
hipsCircumference: 780,
naturalWaistToHip: 105,
neckCircumference: 378,
shoulderSlope: 46,
shoulderToShoulder: 431,
shoulderToWrist: 675,
wristCircumference: 180
};
export const manSize38: Model = {
bicepsCircumference: 305,
centerBackNeckToWaist: 495,
chestCircumference: 965,
hipsCircumference: 838,
naturalWaistToHip: 110,
neckCircumference: 391,
shoulderSlope: 49,
shoulderToShoulder: 444,
shoulderToWrist: 680,
wristCircumference: 185
};
export const manSize40: Model = {
bicepsCircumference: 320,
centerBackNeckToWaist: 498,
chestCircumference: 1023,
hipsCircumference: 896,
naturalWaistToHip: 115,
neckCircumference: 404,
shoulderSlope: 52,
shoulderToShoulder: 457,
shoulderToWrist: 685,
wristCircumference: 190
};
export const manSize42: Model = {
bicepsCircumference: 335,
centerBackNeckToWaist: 501,
chestCircumference: 1081,
hipsCircumference: 895,
naturalWaistToHip: 120,
neckCircumference: 416,
shoulderSlope: 55,
shoulderToShoulder: 470,
shoulderToWrist: 690,
wristCircumference: 195
};
export const manSize44: Model = {
bicepsCircumference: 350,
centerBackNeckToWaist: 505,
chestCircumference: 1139,
hipsCircumference: 1012,
naturalWaistToHip: 125,
neckCircumference: 429,
shoulderSlope: 58,
shoulderToShoulder: 483,
shoulderToWrist: 700,
wristCircumference: 200
};

5
packages/models/package-lock.json generated Normal file
View file

@ -0,0 +1,5 @@
{
"name": "@freesewing/models",
"version": "0.0.1",
"lockfileVersion": 1
}

View file

@ -3,8 +3,11 @@
"version": "0.0.1", "version": "0.0.1",
"description": "Body measurements data for a range of default sizes", "description": "Body measurements data for a range of default sizes",
"main": "index.js", "main": "index.js",
"types": "index.d.ts",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"watch": "tsc -w"
}, },
"repository": { "repository": {
"type": "git", "type": "git",

View file

@ -0,0 +1,9 @@
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"declaration": true,
"strict": true,
"esModuleInterop": true
}
}