Skip to content

Commit

Permalink
WIP.
Browse files Browse the repository at this point in the history
Per #175.

It'd be really nice to switch from hoisted dependencies to relative local ones, except for all the package publishing breakage around `assets` and `css` and `views`. That is a really nice build time speed up though...
  • Loading branch information
randytarampi committed Oct 30, 2018
1 parent b0781f6 commit c294d8a
Show file tree
Hide file tree
Showing 16 changed files with 66 additions and 63 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ dist
build
.webpack
*.pdf_original
!package-lock.json

# Environment variables
.env
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ jobs:
- WWW_PACKAGE_DIR=$TRAVIS_BUILD_DIR/packages/www
- secure: BqXseN/Q6y0i7wX9eqO+3qmfNybZcOJXB1FHDa4vEfM58HvXGAzDsxc5cLn+Cv4DlZ5jBQDgPQxKz5uVPuTZI1m+Ev39S2aR9be3EGISfyShYB1SM8Mzq4vic6/gdarR7rtRMVtdU/CeZPQCXVde9NxR4oNjvDP7GwHGDsm4fjgOW7c2am70JFl26z5O2lqiw/NPQnEo45vGuIlhZaGxayn9Dy0EVHdNMYQ+2JsBXvEC0CTgAbNS8ODL223YSe3UOiN/cKOEtBOe5Sd25pu2JXHrMDWSiJnTIJRwg7VAUqNvEb+9QEGzEzKJKxSfNo7z1QnQ3JMLd8T7HJQ+TaXUr5uiOqNLHybDLumcSSghNHZQVY6+m2wFs0AwZvWHi/nPs1ld7WvlDzPVwfs8FQA3g5w07aMaVrd1O+xo0/5ZXVUkocxksLtSuXTRutwHQMbEMrbmp0uzXRH3FZvbzrmvhtbP3Kz1dO+aFC7IKaWezj5PRkdNtWPkqS+gT0IXrJnJ8gAEsRXToxEruJGwBdKkhQqQwoz7hjf8VChUOMfnOfW64/Os6yK9Grr/UyAdkf9jUL45gb8I1C16ddz6getXtrcQV/YFGkBckNnMO6SAsPci84ESlX69tlXnpLwAjf5MOpwmY/MJfX7Cd1AibzcX1rXHufPVuOdV4iSsyS+ioWY=
install:
- npm install --production
- npx lerna bootstrap --hoist --no-ci --scope @randy.tarampi/www --include-filtered-dependencies --concurrency ${CPUS_COUNT}
- npm install
- npx lerna bootstrap --scope @randy.tarampi/www --include-filtered-dependencies --concurrency ${CPUS_COUNT}
- npm run build --prefix packages/www
- npm run docs --prefix packages/www
before_script: skip
Expand Down Expand Up @@ -164,8 +164,8 @@ jobs:
- AWS_ACCESS_KEY_ID=AKIAIEKKCTFCDTGKKHMA
- secure: HG5SiuIvZNcqaAGjaPwyQFVxW5uUfGbrN3fwqDEyh3oLW1pcnofNCNGLotWoFTexSXkPGcJeswEPfo5koRej84h1CqmNOPJNmwomjR/lLVf1/CSRY5eo4rf8no9wwEOhzsSX+r4yCyOKoBQ8iaxkcwo/fvPIEwAo1NPLcDYusm7bvAsCrO5NDpZ0KkhYqrD823UqSKLtpVAj8ZVZih3ySI+QL/cPN1LlaOwbREbSHmKvDj7p63k0F/znQ9y+jip/dRgAYreTVLOHKKQmdTLDbl0Lf6yn1m8NvC94Cl2Klt4791i/AUqrC1JV7eEE9f9n7jI3l5M469C5DWVFC9Nc9S1d2tcUAbQS441hZMsp0Hh7iLb601GSQZwI/KbNtM1hYJa/ONSrfJcWjU6MQudUHuOIZo1AoiDjlenznouRiIssJ+f3KKxK8t9UEzlTVsHSoBMvQ9lVabae7iTltM6zVD/BlirUhWFpSInSQsHOIMV1fkDep/0lfXX8rufb5pHm41A8yz3bkwLSPQILEwY9O21ngkffSKlu1sUFqvSdE6SwH5nvXEDaF44QvO9OAn3T6BRz+mHvtGCe9xwq9ixsdpEHzGcC6xHD+coJwFshByWkaMP6+RRobGwpHaxn59DGoTPWY5bhaL2EOiAQBK8d4iQg/rPM++Mcd7jDHZKnXzc=
install:
- npm install --production
- npx lerna bootstrap --hoist --no-ci --scope @randy.tarampi/posts --include-filtered-dependencies --concurrency ${CPUS_COUNT}
- npm install
- npx lerna bootstrap --scope @randy.tarampi/posts --include-filtered-dependencies --concurrency ${CPUS_COUNT}
before_script: skip
script: skip
after_script: skip
Expand Down Expand Up @@ -230,8 +230,8 @@ jobs:
- AWS_ACCESS_KEY_ID=AKIAIEKKCTFCDTGKKHMA
- secure: HG5SiuIvZNcqaAGjaPwyQFVxW5uUfGbrN3fwqDEyh3oLW1pcnofNCNGLotWoFTexSXkPGcJeswEPfo5koRej84h1CqmNOPJNmwomjR/lLVf1/CSRY5eo4rf8no9wwEOhzsSX+r4yCyOKoBQ8iaxkcwo/fvPIEwAo1NPLcDYusm7bvAsCrO5NDpZ0KkhYqrD823UqSKLtpVAj8ZVZih3ySI+QL/cPN1LlaOwbREbSHmKvDj7p63k0F/znQ9y+jip/dRgAYreTVLOHKKQmdTLDbl0Lf6yn1m8NvC94Cl2Klt4791i/AUqrC1JV7eEE9f9n7jI3l5M469C5DWVFC9Nc9S1d2tcUAbQS441hZMsp0Hh7iLb601GSQZwI/KbNtM1hYJa/ONSrfJcWjU6MQudUHuOIZo1AoiDjlenznouRiIssJ+f3KKxK8t9UEzlTVsHSoBMvQ9lVabae7iTltM6zVD/BlirUhWFpSInSQsHOIMV1fkDep/0lfXX8rufb5pHm41A8yz3bkwLSPQILEwY9O21ngkffSKlu1sUFqvSdE6SwH5nvXEDaF44QvO9OAn3T6BRz+mHvtGCe9xwq9ixsdpEHzGcC6xHD+coJwFshByWkaMP6+RRobGwpHaxn59DGoTPWY5bhaL2EOiAQBK8d4iQg/rPM++Mcd7jDHZKnXzc=
install:
- npm install --production
- npx lerna bootstrap --hoist --no-ci --scope @randy.tarampi/posts --include-filtered-dependencies --concurrency ${CPUS_COUNT}
- npm install
- npx lerna bootstrap --scope @randy.tarampi/posts --include-filtered-dependencies --concurrency ${CPUS_COUNT}
before_script: skip
script: skip
after_script: skip
Expand Down
2 changes: 1 addition & 1 deletion bin/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ LERNA_CONCURRENCY=${CPUS_COUNT:=$(node -p "require(\"os\").cpus().length")}
cd "${REPO_ROOT}";

npx lerna run preuninstall --concurrency ${LERNA_CONCURRENCY};

npx lerna clean --yes --concurrency ${LERNA_CONCURRENCY};
npx lerna run postuninstall --concurrency ${LERNA_CONCURRENCY};

rm -rf node_modules coverage .nyc_output;
10 changes: 0 additions & 10 deletions bin/hoist-jsonresume-theme.sh

This file was deleted.

13 changes: 0 additions & 13 deletions bin/hoist.sh

This file was deleted.

12 changes: 12 additions & 0 deletions bin/postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

set -e;

REPO_ROOT=${TRAVIS_BUILD_DIR:=$(pwd)}
LERNA_CONCURRENCY=${CPUS_COUNT:=$(node -p "require(\"os\").cpus().length")}

cd "${REPO_ROOT}";

npx lerna run postinstall --concurrency ${LERNA_CONCURRENCY};
npx lerna run prepublish --concurrency ${LERNA_CONCURRENCY};
npx lerna run prepare --concurrency ${LERNA_CONCURRENCY};
21 changes: 17 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@
"@babel/preset-env": "latest",
"@babel/preset-react": "latest",
"@babel/register": "latest",
"@randy.tarampi/assets": "file:packages/assets",
"@randy.tarampi/css": "file:packages/css",
"@randy.tarampi/job-applications": "file:packages/job-applications",
"@randy.tarampi/js": "file:packages/js",
"@randy.tarampi/jsx": "file:packages/jsx",
"@randy.tarampi/letter": "file:packages/letter",
"@randy.tarampi/posts": "file:packages/posts",
"@randy.tarampi/printables": "file:packages/printables",
"@randy.tarampi/pseudoimage": "file:packages/pseudoimage",
"@randy.tarampi/pseudolocalize": "file:packages/pseudolocalize",
"@randy.tarampi/resume": "file:packages/resume",
"@randy.tarampi/views": "file:packages/views",
"@randy.tarampi/www": "file:packages/www",
"babel-eslint": "^10.0.1",
"babel-loader": "next",
"babel-plugin-istanbul": "next",
Expand Down Expand Up @@ -61,6 +74,7 @@
"js-yaml": "^3.12.0",
"jsdom": "^12.0.0",
"json-stringify-safe": "^5.0.1",
"jsonresume-theme-randytarampi": "file:packages/jsonresume-theme",
"koa-compress": "^3.0.0",
"koa-connect": "^2.0.1",
"koa-mount": "^4.0.0",
Expand Down Expand Up @@ -124,13 +138,12 @@
},
"scripts": {
"clean": "./bin/clean.sh",
"bootstrap": "./bin/hoist.sh",
"prepare": "npm run bootstrap",
"lock": "npm run lock:generate",
"postinstall": "./bin/postinstall.sh",
"lock": "npm run lock:generate && npm run audit:fix",
"lock:generate": "npm install --package-lock-only && npx lerna exec --concurrency $(node -p \"require(\\\"os\\\").cpus().length\") --no-bail -- npm install --package-lock-only;",
"lock:clean": "rm package-lock.json packages/*/package-lock.json",
"lock:rebuild": "npm run lock:clean && npm run lock:generate",
"audit:fix": "npm audit fix && npx lerna exec --concurrency $(node -p \"require(\\\"os\\\").cpus().length\") --no-bail -- npm audit fix",
"audit:fix": "npm audit fix && npx lerna exec --concurrency 2 --no-bail -- npm audit fix",
"pretest": "NODE_ENV=test lerna run pretest --no-bail --concurrency $(node -p \"require(\\\"os\\\").cpus().length\")",
"test": "NODE_ENV=test lerna run test --no-bail --concurrency $(node -p \"require(\\\"os\\\").cpus().length\")",
"cover:actual": "rm -rf .nyc_output/ coverage/ && lerna run cover --no-bail --concurrency $(node -p \"require(\\\"os\\\").cpus().length\")",
Expand Down
8 changes: 4 additions & 4 deletions packages/job-applications/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
},
"license": "MIT",
"dependencies": {
"@randy.tarampi/jsx": "^0.47.16",
"@randy.tarampi/letter": "^0.47.16",
"@randy.tarampi/printables": "^0.47.16",
"@randy.tarampi/resume": "^0.47.16"
"@randy.tarampi/jsx": "file:../jsx",
"@randy.tarampi/letter": "file:../letter",
"@randy.tarampi/printables": "file:../printables",
"@randy.tarampi/resume": "file:../resume"
},
"devDependencies": {
"@babel/cli": "latest",
Expand Down
4 changes: 2 additions & 2 deletions packages/jsonresume-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
"preuninstall": "npm run clean"
},
"dependencies": {
"@randy.tarampi/resume": "^0.47.16",
"@randy.tarampi/views": "^0.47.16",
"@randy.tarampi/resume": "file:../resume",
"@randy.tarampi/views": "file:../views",
"config": "^2.0.1"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/jsx/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
],
"dependencies": {
"@actra-development-oss/redux-persist-transform-filter-immutable": "^1.0.0",
"@randy.tarampi/js": "^0.47.16",
"@randy.tarampi/js": "file:../js",
"@randy.tarampi/react-dimensions": "^2.0.0-alpha.3",
"@randy.tarampi/redux-offline-immutable-config": "latest",
"@randy.tarampi/schema-dot-org-json-ld-components": "latest",
Expand Down
12 changes: 6 additions & 6 deletions packages/letter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@
"preuninstall": "npm run clean"
},
"dependencies": {
"@randy.tarampi/assets": "^0.47.16",
"@randy.tarampi/css": "^0.47.16",
"@randy.tarampi/js": "^0.47.16",
"@randy.tarampi/jsx": "^0.47.16",
"@randy.tarampi/printables": "^0.47.16",
"@randy.tarampi/assets": "file:../assets",
"@randy.tarampi/css": "file:../css",
"@randy.tarampi/js": "file:../js",
"@randy.tarampi/jsx": "file:../jsx",
"@randy.tarampi/printables": "file:../printables",
"@randy.tarampi/schema-dot-org-json-ld-components": "latest",
"@randy.tarampi/views": "^0.47.16",
"@randy.tarampi/views": "file:../views",
"exiftool-vendored": "^7.1.0",
"history": "^4.7.2",
"immutable": "4.0.0-rc.10",
Expand Down
2 changes: 1 addition & 1 deletion packages/posts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
},
"license": "MIT",
"dependencies": {
"@randy.tarampi/js": "^0.47.16",
"@randy.tarampi/js": "file:../js",
"aws-sdk": "^2.279.1",
"aws-xray-sdk": "^2.0.1",
"bunyan": "beta",
Expand Down
2 changes: 1 addition & 1 deletion packages/printables/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"preuninstall": "npm run clean"
},
"dependencies": {
"@randy.tarampi/views": "^0.47.16",
"@randy.tarampi/views": "file:../views",
"exiftool-vendored": "^7.1.0",
"pug": "^2.0.3",
"puppeteer": "^1.8.0",
Expand Down
12 changes: 6 additions & 6 deletions packages/resume/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@
"preuninstall": "npm run clean"
},
"dependencies": {
"@randy.tarampi/assets": "^0.47.16",
"@randy.tarampi/css": "^0.47.16",
"@randy.tarampi/js": "^0.47.16",
"@randy.tarampi/jsx": "^0.47.16",
"@randy.tarampi/printables": "^0.47.16",
"@randy.tarampi/assets": "file:../assets",
"@randy.tarampi/css": "file:../css",
"@randy.tarampi/js": "file:../js",
"@randy.tarampi/jsx": "file:../jsx",
"@randy.tarampi/printables": "file:../printables",
"@randy.tarampi/schema-dot-org-json-ld-components": "latest",
"@randy.tarampi/views": "^0.47.16",
"@randy.tarampi/views": "file:../views",
"config": "^2.0.1",
"exiftool-vendored": "^7.1.0",
"history": "^4.7.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/views/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"preuninstall": "npm run clean"
},
"dependencies": {
"@randy.tarampi/js": "^0.47.16",
"@randy.tarampi/js": "file:../js",
"config": "^2.0.1"
},
"devDependencies": {
Expand Down
14 changes: 7 additions & 7 deletions packages/www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@
"url": "https://www.randytarampi.ca"
},
"dependencies": {
"@randy.tarampi/assets": "^0.47.16",
"@randy.tarampi/css": "^0.47.16",
"@randy.tarampi/js": "^0.47.16",
"@randy.tarampi/jsx": "^0.47.16",
"@randy.tarampi/letter": "^0.47.16",
"@randy.tarampi/resume": "^0.47.16",
"@randy.tarampi/assets": "file:../assets",
"@randy.tarampi/css": "file:../css",
"@randy.tarampi/js": "file:../js",
"@randy.tarampi/jsx": "file:../jsx",
"@randy.tarampi/letter": "file:../letter",
"@randy.tarampi/resume": "file:../resume",
"@randy.tarampi/schema-dot-org-json-ld-components": "latest",
"@randy.tarampi/views": "^0.47.16",
"@randy.tarampi/views": "file:../views",
"history": "^4.7.2",
"lodash": "^4.17.10",
"materialize-css": "0.100.2",
Expand Down

0 comments on commit c294d8a

Please sign in to comment.