Skip to content

Commit

Permalink
fix: prepare app for packaging
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Sep 25, 2020
1 parent 6526686 commit fd20919
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 5 deletions.
3 changes: 2 additions & 1 deletion app/components/home/stacking-promo-card.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Box, Flex, Text, Button } from '@blockstack/ui';
import btcPodium from '../../assets/images/btc-podium.svg';

export const StackingPromoCard = () => {
return (
Expand All @@ -10,7 +11,7 @@ export const StackingPromoCard = () => {
border="1px solid #F0F0F5"
>
<Flex flexDirection="column" mt="40px" mb="extra-loose">
<img src="assets/images/btc-podium.svg" />
<img src={btcPodium} />
<Text display="block" textAlign="center" textStyle="display.small" mt="loose">
Earn Bitcoin rewards
</Text>
Expand Down
4 changes: 4 additions & 0 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"version": "1.1.0",
"description": "",
"main": "./main.prod.js",
"author": {
"email": "info@blockstack.com",
"name": "Blockstack PBC"
},
"scripts": {
"electron-rebuild": "node -r ../internals/scripts/BabelRegister.js ../internals/scripts/ElectronRebuild.js",
"postinstall": "yarn electron-rebuild"
Expand Down
9 changes: 9 additions & 0 deletions app/types/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
declare module '*.svg' {
const content: any;
export default content;
}

declare module '*.woff2' {
const content: any;
export default content;
}
12 changes: 8 additions & 4 deletions app/utils/load-fonts.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
import InterUiMedium from '../assets/fonts/Inter-Medium.woff2';
import InterUiRegular from '../assets/fonts/Inter-Regular.woff2';
import InterUiSemiBold from '../assets/fonts/Inter-SemiBold.woff2';

function getFontAssetPath(name: string) {
return `url(assets/fonts/${name}.woff2)`;
return `url(${name})`;
}

export async function loadFonts(): Promise<void> {
const interRegular = new FontFace('Inter', getFontAssetPath('Inter-Regular'), {
const interRegular = new FontFace('Inter', getFontAssetPath(InterUiRegular), {
weight: '400',
});
const interMedium = new FontFace('Inter', getFontAssetPath('Inter-Medium'), {
const interMedium = new FontFace('Inter', getFontAssetPath(InterUiMedium), {
weight: '500',
});
const interSemiBold = new FontFace('Inter', getFontAssetPath('Inter-SemiBold'), {
const interSemiBold = new FontFace('Inter', getFontAssetPath(InterUiSemiBold), {
weight: '600',
});

Expand Down
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
"version": "1.1.0",
"description": "Electron application boilerplate based on React, React Router, Webpack, React Hot Loader for rapid application development",
"prettier": "@blockstack/prettier-config",
"author": {
"email": "info@blockstack.com",
"name": "Blockstack PBC"
},
"scripts": {
"build": "concurrently \"yarn build-main\" \"yarn build-renderer\"",
"build-dll": "cross-env NODE_ENV=development webpack --config ./configs/webpack.config.renderer.dev.dll.babel.js --colors",
Expand Down

0 comments on commit fd20919

Please sign in to comment.