wrench: Switched to rollup as bundler
This commit is contained in:
parent
404bb39820
commit
b209c264fb
8 changed files with 2340 additions and 4251 deletions
84
packages/models/dist/browser.js
vendored
Normal file
84
packages/models/dist/browser.js
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
/**
|
||||
* @freesewing/models | v0.2.1
|
||||
* Body measurements data for a range of default sizes
|
||||
* (c) 2018 Joost De Cock <joost@decock.org> (https://github.com/joostdecock)
|
||||
* @license MIT
|
||||
*/
|
||||
(this.freesewing = this.freesewing || {}),
|
||||
(function() {
|
||||
"use strict";
|
||||
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
|
||||
}
|
||||
};
|
||||
})();
|
1
packages/models/dist/browser/bundle.js
vendored
1
packages/models/dist/browser/bundle.js
vendored
|
@ -1 +0,0 @@
|
|||
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}}}]);
|
|
@ -1,3 +1,10 @@
|
|||
/**
|
||||
* @freesewing/models | v0.2.1
|
||||
* Body measurements data for a range of default sizes
|
||||
* (c) 2018 Joost De Cock <joost@decock.org> (https://github.com/joostdecock)
|
||||
* @license MIT
|
||||
*/
|
||||
"use strict";
|
||||
module.exports = {
|
||||
manSize34: {
|
||||
bicepsCircumference: 335,
|
||||
|
@ -71,4 +78,4 @@ module.exports = {
|
|||
shoulderToWrist: 700,
|
||||
wristCircumference: 200
|
||||
}
|
||||
};
|
||||
};
|
7
packages/models/dist/index.mjs
vendored
Normal file
7
packages/models/dist/index.mjs
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
/**
|
||||
* @freesewing/models | v0.2.1
|
||||
* Body measurements data for a range of default sizes
|
||||
* (c) 2018 Joost De Cock <joost@decock.org> (https://github.com/joostdecock)
|
||||
* @license MIT
|
||||
*/
|
||||
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}};
|
6357
packages/models/package-lock.json
generated
6357
packages/models/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -2,31 +2,68 @@
|
|||
"name": "@freesewing/models",
|
||||
"version": "0.2.1",
|
||||
"description": "Body measurements data for a range of default sizes",
|
||||
"main": "dist/node/index.js",
|
||||
"unpkg": "dist/browser/bundle.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"nodebuild": "babel src -d dist/node",
|
||||
"browserbuild": "npx webpack-cli --config webpack.config.js",
|
||||
"dev": "webpack-dev-server --open"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/joostdecock/models.git"
|
||||
},
|
||||
"author": "Joost De Cock <joost@decock.org>",
|
||||
"author": "Joost De Cock <joost@decock.org> (https://github.com/joostdecock)",
|
||||
"license": "MIT",
|
||||
"homepage": "https://github.com/freesewing/models#readme",
|
||||
"repository": "github:freesewing/models",
|
||||
"bugs": {
|
||||
"url": "https://github.com/joostdecock/models/issues"
|
||||
"url": "https://github.com/freesewing/models/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"freesewing",
|
||||
"plugin",
|
||||
"sewing",
|
||||
"patterns",
|
||||
"models"
|
||||
],
|
||||
"main": "dist/index.js",
|
||||
"unpkg": "dist/browser.js",
|
||||
"module": "dist/index.mjs",
|
||||
"scripts": {
|
||||
"patch": "npm version patch -m ':bookmark: v%s; && npm run build",
|
||||
"minor": "npm version minor -m ':bookmark: v%s; && npm run build",
|
||||
"major": "npm version major -m ':bookmark: v%s; && npm run build",
|
||||
"precommit": "npm run pretty && lint-staged",
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"clean": "rimraf dist",
|
||||
"pretty": "npx prettier --write \"src/*.js\"",
|
||||
"lint": "eslint --fix \"src/*.js\"",
|
||||
"browserbuild": "rollup -c rollup.js --file dist/browser.js --format iife --name freesewing.models",
|
||||
"nodebuild": "rollup -c rollup.js --file dist/index.js --format cjs",
|
||||
"modulebuild": "rollup -c rollup.js --file dist/index.mjs --format es",
|
||||
"build": "npm run clean && npm run browserbuild && npm run nodebuild && npm run modulebuild"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
}
|
||||
},
|
||||
"lint-staged": {
|
||||
"*.{js,json}": [
|
||||
"prettier --write",
|
||||
"git add"
|
||||
]
|
||||
},
|
||||
"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"
|
||||
}
|
||||
"babel-core": "^6.26.3",
|
||||
"babel-eslint": "^8.2.6",
|
||||
"eslint": "^5.2.0",
|
||||
"eslint-config-prettier": "^2.9.0",
|
||||
"eslint-plugin-prettier": "^2.6.2",
|
||||
"husky": "^0.14.3",
|
||||
"lint-staged": "^7.2.0",
|
||||
"prettier": "^1.13.7",
|
||||
"rimraf": "^2.6.2",
|
||||
"rollup-plugin-babel": "^3.0.7",
|
||||
"rollup-plugin-filesize": "^4.0.1",
|
||||
"rollup-plugin-json": "^3.0.0",
|
||||
"rollup-plugin-node-resolve": "^3.3.0",
|
||||
"rollup-plugin-terser": "^1.0.1"
|
||||
},
|
||||
"files": [
|
||||
"dist/*",
|
||||
"README.md",
|
||||
"package-lock.json",
|
||||
"package.json"
|
||||
]
|
||||
}
|
||||
|
|
23
packages/models/rollup.js
Normal file
23
packages/models/rollup.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { terser } from "rollup-plugin-terser";
|
||||
import babel from "rollup-plugin-babel";
|
||||
import resolve from "rollup-plugin-node-resolve";
|
||||
import json from "rollup-plugin-json";
|
||||
import { version, name, description, author, license } from "./package.json";
|
||||
|
||||
export default {
|
||||
input: "src/index.js",
|
||||
plugins: [
|
||||
resolve({
|
||||
browser: true
|
||||
}),
|
||||
json(),
|
||||
babel({
|
||||
exclude: "node_modules/**"
|
||||
}),
|
||||
terser({
|
||||
output: {
|
||||
preamble: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
||||
}
|
||||
})
|
||||
]
|
||||
};
|
|
@ -1,27 +0,0 @@
|
|||
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']
|
||||
}
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue