1
0
Fork 0

construction: Switched to JS from typescript

This commit is contained in:
Joost De Cock 2018-07-15 19:10:04 +02:00
parent 7e74f130c7
commit eec8cb32e0
10 changed files with 6960 additions and 111 deletions

View file

@ -1 +1,2 @@
.editorconfig
src

View file

@ -0,0 +1 @@
var freesewing_models=function(e){var r={};function c(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,c),n.l=!0,n.exports}return c.m=e,c.c=r,c.d=function(e,r,i){c.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:i})},c.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},c.t=function(e,r){if(1&r&&(e=c(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(c.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)c.d(i,n,function(r){return e[r]}.bind(null,n));return i},c.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return c.d(r,"a",r),r},c.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},c.p="",c(c.s=0)}([function(e,r,c){"use strict";e.exports={manSize34:{bicepsCircumference:335,centerBackNeckToWaist:489,chestCircumference:849,hipsCircumference:722,naturalWaistToHip:100,neckCircumference:366,shoulderSlope:43,shoulderToShoulder:419,shoulderToWrist:670,wristCircumference:175},manSize36:{bicepsCircumference:290,centerBackNeckToWaist:492,chestCircumference:907,hipsCircumference:780,naturalWaistToHip:105,neckCircumference:378,shoulderSlope:46,shoulderToShoulder:431,shoulderToWrist:675,wristCircumference:180},manSize38:{bicepsCircumference:305,centerBackNeckToWaist:495,chestCircumference:965,hipsCircumference:838,naturalWaistToHip:110,neckCircumference:391,shoulderSlope:49,shoulderToShoulder:444,shoulderToWrist:680,wristCircumference:185},manSize40:{bicepsCircumference:320,centerBackNeckToWaist:498,chestCircumference:1023,hipsCircumference:896,naturalWaistToHip:115,neckCircumference:404,shoulderSlope:52,shoulderToShoulder:457,shoulderToWrist:685,wristCircumference:190},manSize42:{bicepsCircumference:335,centerBackNeckToWaist:501,chestCircumference:1081,hipsCircumference:895,naturalWaistToHip:120,neckCircumference:416,shoulderSlope:55,shoulderToShoulder:470,shoulderToWrist:690,wristCircumference:195},manSize44:{bicepsCircumference:350,centerBackNeckToWaist:505,chestCircumference:1139,hipsCircumference:1012,naturalWaistToHip:125,neckCircumference:429,shoulderSlope:58,shoulderToShoulder:483,shoulderToWrist:700,wristCircumference:200}}}]);

74
packages/models/dist/node/index.js vendored Normal file
View file

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

View file

@ -1,10 +0,0 @@
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,81 +0,0 @@
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
};

File diff suppressed because it is too large Load diff

View file

@ -2,17 +2,13 @@
"name": "@freesewing/models",
"version": "0.1.1",
"description": "Body measurements data for a range of default sizes",
"main": "index.js",
"types": "index.d.ts",
"files": [
"index.js",
"index.ts",
"index.d.ts"
],
"main": "dist/node/index.js",
"unpkg": "dist/browser/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"build": "tsc",
"watch": "tsc -w"
"nodebuild": "babel src -d dist/node",
"browserbuild": "npx webpack-cli --config webpack.config.js",
"dev": "webpack-dev-server --open"
},
"repository": {
"type": "git",
@ -23,5 +19,14 @@
"bugs": {
"url": "https://github.com/joostdecock/models/issues"
},
"homepage": "https://github.com/joostdecock/models#readme"
"homepage": "https://github.com/joostdecock/models#readme",
"devDependencies": {
"@babel/core": "7.0.0-beta.53",
"@babel/preset-env": "7.0.0-beta.53",
"babel-cli": "6.26.0",
"babel-loader": "8.0.0-beta.4",
"babel-preset-env": "1.7.0",
"webpack": "4.16.0",
"webpack-cli": "3.0.8"
}
}

View file

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

View file

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

View file

@ -0,0 +1,27 @@
const path = require('path');
module.exports = {
mode: 'production',
target: 'web',
entry: './src/index.js',
output: {
path: path.resolve(__dirname, 'dist/browser'),
filename: 'bundle.js',
libraryTarget: 'var',
library: 'freesewing_models'
},
module: {
rules:[
{
test: /\.js$/,
exclude: /node_modules/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env']
}
}
},
]
},
};