Skip to content

Commit

Permalink
refactor(presentation): Create a new npm package for core presentatio…
Browse files Browse the repository at this point in the history
…n modules in deck
  • Loading branch information
vigneshm authored and mergify[bot] committed Jan 8, 2021
1 parent 9b2b049 commit 22e0621
Show file tree
Hide file tree
Showing 7 changed files with 505 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/presentation/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"name": "@spinnaker/presentation",
"description": "Provides re-usable UI components for deck",
"version": "0.0.1",
"module": "dist/index.js",
"typings": "dist/index.d.ts",
"license": "Apache-2.0",
"scripts": {
"build": "rollup -c",
"clean": "npx shx rm -rf dist",
"prepublishOnly": "npm run build",
"watch": "rollup -c -w"
},
"peerDependencies": {
"lodash": "^4.17.20",
"react": "~16.14.0",
"react-dom": "^16.14.0"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^17.0.0",
"@rollup/plugin-node-resolve": "^11.0.1",
"@rollup/plugin-typescript": "^8.1.0",
"@types/react": "~16.14.0",
"@types/react-dom": "^16.9.10",
"rollup": "^2.35.1",
"typescript": "^4.0.0"
},
"dependencies": {
"formik": "^1.4.1"
}
}
12 changes: 12 additions & 0 deletions packages/presentation/rollup.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import nodeResolve from '@rollup/plugin-node-resolve';
import commonjs from '@rollup/plugin-commonjs';
import typescript from '@rollup/plugin-typescript';

export default [
{
input: 'src/index.ts',
output: [{ dir: 'dist', format: 'es', sourcemap: true }],
plugins: [nodeResolve(), commonjs(), typescript()],
external: ['react', 'lodash'],
},
];
1 change: 1 addition & 0 deletions packages/presentation/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './utils';
1 change: 1 addition & 0 deletions packages/presentation/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './noop';
3 changes: 3 additions & 0 deletions packages/presentation/src/utils/noop.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
function noopFn() {}
const noop = noopFn as any;
export { noop };
9 changes: 9 additions & 0 deletions packages/presentation/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.base",
"exclude": ["dist"],
"compilerOptions": {
"outDir": "dist",
"rootDir": "src",
"strict": true
}
}
Loading

0 comments on commit 22e0621

Please sign in to comment.