diff --git a/packages/tradingpost/package.json b/packages/tradingpost/package.json index 27562c19..83b962e2 100644 --- a/packages/tradingpost/package.json +++ b/packages/tradingpost/package.json @@ -15,9 +15,10 @@ ], "scripts": { "prettier": "prettier -w '{src,test}/**/*.{ts,tsx,js,jsx,json,sol}'", - "build": "npm run prettier && rm -rf dist && tsc", + "build": "npm run prettier && rm -rf dist && tsc && npm run copy-assets", "start": "npm run prettier && nodemon --ext js,jsx,ts,tsx,json --watch ./src --exec tsc", - "test": "eslint src" + "test": "eslint src", + "copy-assets": "copyfiles -u 1 src/assets/*.svg dist/" }, "dependencies": { "@defi.org/web3-candies": "^4.20", @@ -31,5 +32,8 @@ "peerDependencies": { "react": "*", "react-dom": "*" + }, + "devDependencies": { + "copyfiles": "^2.4.1" } } diff --git a/packages/tradingpost/src/assets/arrow.svg b/packages/tradingpost/src/assets/arrow.svg new file mode 100644 index 00000000..f5282490 --- /dev/null +++ b/packages/tradingpost/src/assets/arrow.svg @@ -0,0 +1 @@ + diff --git a/packages/tradingpost/src/assets/price-protection-arrow-selector.svg b/packages/tradingpost/src/assets/price-protection-arrow-selector.svg new file mode 100644 index 00000000..56aeb97c --- /dev/null +++ b/packages/tradingpost/src/assets/price-protection-arrow-selector.svg @@ -0,0 +1,4 @@ + + + + diff --git a/packages/tradingpost/src/assets/twap-dropdown.svg b/packages/tradingpost/src/assets/twap-dropdown.svg new file mode 100644 index 00000000..402e11a9 --- /dev/null +++ b/packages/tradingpost/src/assets/twap-dropdown.svg @@ -0,0 +1,3 @@ + + + diff --git a/packages/tradingpost/src/declarations.d.ts b/packages/tradingpost/src/declarations.d.ts new file mode 100644 index 00000000..d18f6895 --- /dev/null +++ b/packages/tradingpost/src/declarations.d.ts @@ -0,0 +1,6 @@ +declare module "*.svg" { + import * as React from "react"; + export const ReactComponent: React.FunctionComponent>; + const src: string; + export default src; +} diff --git a/packages/tradingpost/tsconfig.json b/packages/tradingpost/tsconfig.json index 7152b297..e339c0c9 100644 --- a/packages/tradingpost/tsconfig.json +++ b/packages/tradingpost/tsconfig.json @@ -16,7 +16,6 @@ "jsx": "react-jsx", "outDir": "dist", "declaration": true, - }, - "include": ["./src"] + "include": ["./src/**/*", "declarations.d.ts"], }