Skip to content

Commit

Permalink
feat(odyssey-lifecycle): add new package to reduce duplication for li…
Browse files Browse the repository at this point in the history
…fecycle scripts
  • Loading branch information
Jeff Belser committed Feb 24, 2022
1 parent fe31e3a commit aff7760
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 90 deletions.
2 changes: 1 addition & 1 deletion packages/odyssey-babel-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"scripts": {
"prepare": "tsc",
"prepack": "node ./scripts/prepack.js"
"prepack": "prepack"
},
"dependencies": {
"@babel/core": "^7.15.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/odyssey-design-tokens/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
"scripts": {
"build": "style-dictionary clean && style-dictionary build",
"prepare": "yarn build",
"prepack": "node ./scripts/prepack.js"
"prepack": "prepack"
}
}
21 changes: 0 additions & 21 deletions packages/odyssey-design-tokens/scripts/prepack.js

This file was deleted.

11 changes: 11 additions & 0 deletions packages/odyssey-lifecycle/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "@okta/odyssey-lifecycle",
"version": "0.0.0",
"description": "Lifecycle scripts for lerna and npm",
"author": "Okta, Inc.",
"license": "Apache-2.0",
"private": true,
"bin": {
"prepack": "src/prepack.js"
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
/*!
* Copyright (c) 2021-present, Okta, Inc. and/or its affiliates. All rights reserved.
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
Expand All @@ -13,7 +14,7 @@
const { writeFileSync } = require("fs");
const { resolve } = require("path");

const pkgPath = resolve(__dirname, "../package.json");
const pkgPath = resolve(process.cwd(), "./package.json");

// eslint-disable-next-line no-unused-vars
const { scripts, devDependencies, ...pkg } = require(pkgPath);
Expand Down
2 changes: 1 addition & 1 deletion packages/odyssey-react-theme/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,6 @@
"build:clean": "rm -rf dist",
"build:types": "tsc --project tsconfig.production.json",
"build:source": "./scripts/buildSource",
"prepack": "node ./scripts/prepack.js"
"prepack": "prepack"
}
}
21 changes: 0 additions & 21 deletions packages/odyssey-react-theme/scripts/prepack.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/odyssey-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,6 @@
"build:types": "tsc --project tsconfig.production.json",
"build:source": "./scripts/buildSource",
"build-icons": "svgr $(node ./scripts/resolveIconSrcPath.js) --out-dir ./src/components/Icon/",
"prepack": "node ./scripts/prepack.js"
"prepack": "prepack"
}
}
21 changes: 0 additions & 21 deletions packages/odyssey-react/scripts/prepack.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/odyssey-storybook/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"build": "build-storybook --quiet --output-dir dist",
"typecheck": "tsc",
"prepublishOnly": "yarn run build",
"prepack": "node ./scripts/prepack.js"
"prepack": "prepack"
}
}
21 changes: 0 additions & 21 deletions packages/odyssey-storybook/scripts/prepack.js

This file was deleted.

0 comments on commit aff7760

Please sign in to comment.