-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Mark Tate <[email protected]> Co-authored-by: Davie <[email protected]>
- Loading branch information
1 parent
76a45b8
commit 771e46f
Showing
15 changed files
with
142 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
packages/content-editor-plugin/src/components/ActionMenu/ActionMenu.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Mosaic Icon Library | ||
|
||
`@jpmorganchase/mosaic-icons`contains icons used by the Mosaic. | ||
|
||
## Installation | ||
|
||
`yarn add @jpmorganchase/mosaic-icons` | ||
|
||
## Criteria | ||
|
||
The criteria for a component within `@jpmorganchase/mosaic-icons` is | ||
|
||
- It can be used outside the Mosaic site with only Mosaic theme dependencies. | ||
- It **should not** contain any Mosaic Store, NextJS or other site specific dependencies. | ||
- Should be client-side only components |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@jpmorganchase/mosaic-icons", | ||
"description": "Mosaic - Icons", | ||
"version": "0.1.0-beta.89", | ||
"author": "", | ||
"license": "Apache-2.0", | ||
"repository": { | ||
"type": "git", | ||
"url": "[email protected]:jpmorganchase/mosaic.git", | ||
"directory": "packages/icons" | ||
}, | ||
"type": "module", | ||
"main": "./dist/index.js", | ||
"types": "./dist/index.d.ts", | ||
"style": "./dist/index.css", | ||
"exports": { | ||
"./index.css": "./dist/index.css", | ||
".": { | ||
"style": "./dist/index.css", | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.js", | ||
"node": "./dist/index.js" | ||
} | ||
}, | ||
"files": [ | ||
"dist" | ||
], | ||
"scripts": { | ||
"build": "npm-run-all --parallel build:*", | ||
"build:types": "tsc", | ||
"build:components": "node ./scripts/bundle.mjs", | ||
"build:icons": "node ./scripts/generateIconTypes.mjs", | ||
"clean": "npx del-cli 'dist/**' && find . -type d -empty -delete", | ||
"lint": "eslint --ignore-pattern \"**/__tests__/**\"", | ||
"dev": "node ./scripts/bundle.mjs watch" | ||
}, | ||
"devDependencies": { | ||
"del-cli": "^4.0.1", | ||
"typescript": "^5.2.2" | ||
}, | ||
"dependencies": { | ||
"@jpmorganchase/mosaic-theme": "^0.1.0-beta.89", | ||
"@salt-ds/core": "^1.33.0" | ||
}, | ||
"peerDependencies": { | ||
"@types/react": "^18.2.46", | ||
"react": "^18.2.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import glob from 'fast-glob'; | ||
import esbuild from 'esbuild'; | ||
import { nodeExternalsPlugin } from 'esbuild-node-externals'; | ||
|
||
const args = process.argv.slice(2); | ||
const watchEnabled = args[0] === 'watch'; | ||
const packageName = process.env.npm_package_name; | ||
|
||
try { | ||
const context = await esbuild.context({ | ||
entryPoints: glob.sync(['src/**/*.ts?(x)', 'src/*.ts?(x)'], { | ||
ignore: ['**/__tests__'] | ||
}), | ||
outdir: './dist', | ||
bundle: true, | ||
sourcemap: false, | ||
splitting: true, | ||
minify: true, | ||
format: 'esm', | ||
target: ['es2022'], | ||
plugins: [ | ||
nodeExternalsPlugin(), | ||
{ | ||
name: 'on-end', | ||
setup(build) { | ||
build.onEnd(({ errors = [] }) => { | ||
if (errors.length) { | ||
console.error(`build failed for ${packageName}:`, errors); | ||
} else { | ||
console.log(`build succeeded for ${packageName}:`); | ||
} | ||
}); | ||
} | ||
} | ||
], | ||
external: ['react', 'react-dom'] | ||
}); | ||
await context.rebuild(); | ||
if (watchEnabled) { | ||
await context.watch(); | ||
} | ||
await context.serve(); | ||
context.dispose(); | ||
} catch (e) { | ||
if (e.errors && e.errors.length > 0) { | ||
console.group(`!!!!!!! ${packageName} build errors !!!!!!!`); | ||
console.error(e.errors); | ||
console.groupEnd(); | ||
} | ||
|
||
if (e.warnings && e.warnings.length > 0) { | ||
console.group(`!!!!!!! ${packageName} build warnings !!!!!!!`); | ||
console.error(e.warnings); | ||
console.groupEnd(); | ||
} | ||
process.exit(1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"extends": "../../tsconfig.bundle.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./dist" | ||
}, | ||
"include": ["src"] | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters