1
0
Fork 0

🚧 Handling of package.json exceptions

This commit is contained in:
Joost De Cock 2019-04-20 19:23:22 +02:00
parent daf65326ae
commit 0461c64b9a
117 changed files with 1018 additions and 772 deletions

View file

@ -0,0 +1,6 @@
{
"presets": [
["@babel/preset-env", { "modules": false }],
"@babel/preset-react",
],
}

View file

@ -1,4 +1,7 @@
{
"name": "@freesewing/components",
"version": "0.33.0",
"description": "A collection of React components for FreeSewing web UIs",
"author": "Joost De Cock <joost@decock.org> (https://github.com/joostdecock)",
"homepage": "https://freesewing.org/",
"repository": "github:freesewing/freesewing",
@ -14,15 +17,16 @@
"module": "dist/index.mjs",
"scripts": {
"clean": "rimraf ../../dist/components",
"nodebuild": "rollup -c -o ../../dist/components/index.js -f cjs",
"modulebuild": "rollup -c -o ../../dist/components/index.mjs -f es",
"nodebuild": "BABEL_ENV=production rollup -c -o ../../dist/components/index.js -f cjs",
"modulebuild": "BABEL_ENV=production rollup -c -o ../../dist/components/index.mjs -f es",
"build": "echo \"components: No build command available.\" && exit 0",
"test": "echo \"components: No tests configured. Perhaps you'd like to do this?\" && exit 0",
"pubtest": "npm publish --registry http://localhost:6662"
},
"peerDependencies": {},
"dependencies": {},
"devDependencies": {},
"peerDependencies": {
"react": "^16.4.1",
"prop-types": "15.7.2"
},
"files": [
"../../dist/packages/components/*",
"README.md",
@ -32,8 +36,7 @@
"access": "public"
},
"engines": {
"node": ">=8.0.0"
},
"version": "0.33.0",
"name": "@freesewing/components"
"node": ">=8.0.0",
"npm": ">=5"
}
}

View file

@ -12,7 +12,7 @@ export default {
},
plugins: [
peerDepsExternal(),
resolve({ browser: true }),
resolve({ modulesOnly: true }),
json(),
babel({
exclude: "node_modules/**",

View file

@ -0,0 +1,22 @@
#!/bin/bash
# We'll have to come up with a cross-platform way to handle this
# (as in, make sure it works on windows), but until that time
# this shell script will do.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
CUR=`pwd`
cd $DIR/../src/
rm -rf ../../../dist/components
for d in * ; do {
cd ..
# do something here
mkdir -p ../../dist/components/$d
rollup -c ./rollup.config.js ./src/$d/index.js -m -o ../../dist/components/$d/index.js -f cjs
rollup -c ./rollup.config.js ./src/$d/index.js -m -o ../../dist/components/$d/index.mjs -f es
cd src
}
done
cd $CUR