Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove workaround for asset imports from node_modules #1422

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/components/Spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/
import classnames from 'classnames'

import loaderImage from '~/../node_modules/nasawds/src/img/loader.gif'
import loaderImage from 'nasawds/src/img/loader.gif'

// Adapted from https://github.com/trussworks/react-uswds/blob/main/src/components/Icon/Icon.tsx
export default function Spinner({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.node {
& {
list-style: url('~/../node_modules/nasawds/src/img/usa-icons/chevron_right.svg');
list-style: url('nasawds/src/img/usa-icons/chevron_right.svg');
}

&[aria-expanded='true'] {
list-style: url('~/../node_modules/nasawds/src/img/usa-icons/expand_more.svg');
list-style: url('nasawds/src/img/usa-icons/expand_more.svg');
}

& [data-testid='checkbox'] {
Expand Down
14 changes: 7 additions & 7 deletions app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ import highlightStyle from 'highlight.js/styles/github.css'
// ])
// )
// )
import favicon_16 from '~/../node_modules/nasawds/src/img/favicons/favicon-16.png'
import favicon_40 from '~/../node_modules/nasawds/src/img/favicons/favicon-40.png'
import favicon_57 from '~/../node_modules/nasawds/src/img/favicons/favicon-57.png'
import favicon_72 from '~/../node_modules/nasawds/src/img/favicons/favicon-72.png'
import favicon_114 from '~/../node_modules/nasawds/src/img/favicons/favicon-114.png'
import favicon_144 from '~/../node_modules/nasawds/src/img/favicons/favicon-144.png'
import favicon_192 from '~/../node_modules/nasawds/src/img/favicons/favicon-192.png'
import favicon_16 from 'nasawds/src/img/favicons/favicon-16.png'
import favicon_40 from 'nasawds/src/img/favicons/favicon-40.png'
import favicon_57 from 'nasawds/src/img/favicons/favicon-57.png'
import favicon_72 from 'nasawds/src/img/favicons/favicon-72.png'
import favicon_114 from 'nasawds/src/img/favicons/favicon-114.png'
import favicon_144 from 'nasawds/src/img/favicons/favicon-144.png'
import favicon_192 from 'nasawds/src/img/favicons/favicon-192.png'
import themeStyle from '~/theme.css'

const favicons = {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/circulars._index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import { Anchor } from '~/components/Anchor'
import Hint from '~/components/Hint'
import { usePagination } from '~/lib/pagination'

import searchImg from '~/../node_modules/nasawds/src/img/usa-icons-bg/search--white.svg'
import searchImg from 'nasawds/src/img/usa-icons-bg/search--white.svg'

export async function loader({ request: { url } }: DataFunctionArgs) {
const { searchParams } = new URL(url)
Expand Down
2 changes: 1 addition & 1 deletion app/routes/user.endorsements/route.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import SegmentedCards from '~/components/SegmentedCards'
import { getFormDataString } from '~/lib/utils'
import type { BreadcrumbHandle } from '~/root/Title'

import loaderImage from '~/../node_modules/nasawds/src/img/loader.gif'
import loaderImage from 'nasawds/src/img/loader.gif'

export const handle: BreadcrumbHandle & SEOHandle = {
breadcrumb: 'Peer Endorsements',
Expand Down
6 changes: 3 additions & 3 deletions app/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@

@use 'styles' with (
$theme-show-notifications: false,
$theme-image-path: '~/../node_modules/nasawds/src/img',
$theme-font-path: '~/../node_modules/nasawds/src/fonts'
$theme-image-path: 'nasawds/src/img',
$theme-font-path: 'nasawds/src/fonts'
);

@use 'uswds-core' as *;
Expand Down Expand Up @@ -110,7 +110,7 @@ h6 {
}

& > a:hover::after {
content: url('~/../node_modules/nasawds/src/img/usa-icons/link.svg');
content: url('nasawds/src/img/usa-icons/link.svg');
position: absolute;
padding-left: 1ex;
}
Expand Down