chore: path resolver plugin to simplify imports and exports

This commit is contained in:
Kyle Gill
2019-05-18 14:47:12 -06:00
parent 4691ad10ab
commit 867ed0c998
18 changed files with 55 additions and 57 deletions

View File

@@ -1,14 +1,14 @@
import React from "react"
import { navigate, Link } from "gatsby"
import { StyledLink } from "../../components/elements"
import { StyledLink } from "components/elements"
import styled from "@emotion/styled"
/** @jsx jsx */
import { jsx } from "@emotion/core"
import { compose } from "recompose"
import { withTheme } from "emotion-theming"
import { SIZES } from "../../styles/constants"
import { todayUrl, yearUrl } from "../../utils/date"
import { SIZES } from "styles/constants"
import { todayUrl, yearUrl } from "utils/date"
import Logo from "../Logo"
import Icon from "../Icon"

View File

@@ -1,7 +1,7 @@
import React from "react"
import styled from "@emotion/styled"
import { SIZES } from "../styles/constants"
import { SIZES } from "styles/constants"
const Container = styled.div`
display: flex;

View File

@@ -3,7 +3,7 @@ import { withTheme } from "emotion-theming"
import { Link } from "gatsby"
import styled from "@emotion/styled"
import { SIZES } from "../../styles/constants"
import { SIZES } from "styles/constants"
export const H1 = styled.h1`
display: block;

View File

@@ -1,16 +1,17 @@
import React from "react"
import { addDays, subDays, format, isAfter, startOfYesterday } from "date-fns"
import { BeatLoader } from "react-spinners"
import styled from "@emotion/styled"
/** @jsx jsx */
import { jsx, css, keyframes } from "@emotion/core"
import { compose } from "recompose"
import { withTheme } from "emotion-theming"
import { withFirebase } from "../../firebase"
import { withAuthentication } from "../../session"
import { OnlineContext } from "../../context/online"
import { addDays, subDays, format, isAfter, startOfYesterday } from "date-fns"
import { BeatLoader } from "react-spinners"
import { SIZES } from "../../../styles/constants"
import { withFirebase } from "components/firebase"
import { withAuthentication } from "components/session"
import { OnlineContext } from "components/context/online"
import { SIZES } from "styles/constants"
import Seek from "../../Seek"
import Icon from "../../Icon"

View File

@@ -1,5 +1,5 @@
import React, { Component } from "react"
import { AppLink as Link } from "../../../components/elements"
import { AppLink as Link } from "components/elements"
import styled from "@emotion/styled"
import {
isAfter,

View File

@@ -1,5 +1,4 @@
import { Component } from "react"
import { AppLink as Link } from "../../elements"
/** @jsx jsx */
import { jsx, css, keyframes } from "@emotion/core"
import styled from "@emotion/styled"
@@ -7,11 +6,11 @@ import { compose } from "recompose"
import { withTheme } from "emotion-theming"
import { BeatLoader } from "react-spinners"
import { Input } from "../../elements"
import { pad } from "../../../utils/date"
import { withFirebase } from "../../firebase"
import { withAuthentication } from "../../session"
import { AppLink as Link } from "components/elements"
import { Input } from "components/elements"
import { withFirebase } from "components/firebase"
import { withAuthentication } from "components/session"
import { pad } from "utils/date"
const SearchGrid = styled.div`
display: grid;

View File

@@ -4,13 +4,11 @@ import Img from "gatsby-image"
import styled from "@emotion/styled"
import { withTheme } from "emotion-theming"
import { SIZES } from "../../../styles/constants"
import { Button, P } from "../../elements"
import { todayUrl } from "../../../utils/date"
import { SIZES } from "styles/constants"
import { Button, P } from "components/elements"
import { todayUrl } from "utils/date"
import Icon from "../../Icon"
import Logo from "../../Logo"
import LandingGraphicLight from "../../../img/landing-graphic-light.svg"
import LandingGraphicDark from "../../../img/landing-graphic-dark.svg"
const StartGrid = styled.div`
margin-top: 30px;

View File

@@ -3,11 +3,11 @@ import styled from "@emotion/styled"
import { withTheme } from "emotion-theming"
import { compose } from "recompose"
import { format } from "date-fns"
import { withFirebase } from "../../firebase"
import { withAuthentication } from "../../session"
import { BeatLoader } from "react-spinners"
import { SIZES } from "../../../styles/constants"
import { withFirebase } from "components/firebase"
import { withAuthentication } from "components/session"
import { SIZES } from "styles/constants"
import SignOut from "../../SignOut"
import { Button } from "../../elements"

View File

@@ -3,10 +3,9 @@ import { Link } from "gatsby"
import styled from "@emotion/styled"
import { withTheme } from "emotion-theming"
import { SIZES } from "../../../styles/constants"
import { Button, P } from "../../elements"
import { todayUrl } from "../../../utils/date"
import Logo from "../../Logo"
import { Button, P } from "components/elements"
import Logo from "components/Logo"
import { todayUrl } from "utils/date"
const WelcomeGrid = styled.div`
margin-top: 30px;
@@ -37,9 +36,8 @@ class Welcome extends Component {
<WelcomeGrid>
<h1>Your Space for Wandering Thoughts and Ideas</h1>
<P style={{ letterSpacing: 1.1, marginBottom: 30 }}>
Journaling can improve your health and help you take inventory of your
day. Sol Journal works offline and from any device. Use it as a place
to record thoughts and events from the day.
This your space for wandering thoughts and ideas. Write about whatever
comes to mind.
</P>
<Link to={`/app${todayUrl()}`} style={{ textDecoration: "none" }}>
<Button colors={theme.colors}>Write about today</Button>

View File

@@ -1,10 +1,10 @@
import React, { Component } from "react"
import { AppLink as Link } from "../../../components/elements"
import { AppLink as Link } from "components/elements"
import styled from "@emotion/styled"
import { addYears, subYears, format, isThisYear, getMonth } from "date-fns"
import { withTheme } from "emotion-theming"
import { months } from "../../../utils/date"
import { months } from "utils/date"
import Seek from "../../Seek"
const MonthCardGrid = styled.div`