mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-15 09:58:29 +08:00
Optimized build speed and DX by enabling tsconfig composite option
This commit is contained in:
10
package.json
10
package.json
@@ -9,11 +9,13 @@
|
||||
"nohoist": []
|
||||
},
|
||||
"scripts": {
|
||||
"build": "yarn workspace @devhub/core build && yarn workspace @devhub/components build && yarn workspace @devhub/web build",
|
||||
"clean": "yarn workspaces run clean",
|
||||
"deploy": "yarn clean && yarn build && yarn now",
|
||||
"deploy-www": "pushd packages/www; now && now alias; popd;",
|
||||
"dev": "yarn workspace @devhub/core build && yarn workspace @devhub/components build && concurrently --kill-others \"yarn workspace @devhub/core build -w\" \"yarn workspace @devhub/components build -w\" \"yarn workspace @devhub/web start\" \"yarn workspace @devhub/mobile start\"",
|
||||
"compile": "yarn workspace @devhub/components build",
|
||||
"deploy:web": "yarn workspace @devhub/web build && yarn now",
|
||||
"deploy:www": "pushd packages/www; now && now alias; popd;",
|
||||
"dev": "concurrently \"yarn compile -w\" \"yarn workspace @devhub/web start\" \"yarn workspace @devhub/mobile start\"",
|
||||
"dev:web": "concurrently \"yarn compile -w\" \"yarn workspace @devhub/web start\"",
|
||||
"dev:mobile": "concurrently \"yarn compile -w\" \"yarn workspace @devhub/mobile start\"",
|
||||
"format": "yarn workspaces run format",
|
||||
"lint": "yarn workspaces run lint",
|
||||
"now": "npx now",
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.29.0",
|
||||
"main": "dist",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc -b",
|
||||
"clean": "rm -rf dist/*",
|
||||
"format": "prettier --write '{.,src/**}/*.{js,jsx,ts,tsx}'",
|
||||
"lint": "tslint -p .",
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GitHubUser } from '@devhub/core/dist/types'
|
||||
import { User } from '@devhub/core/dist/types/graphql'
|
||||
import { GitHubUser } from '@devhub/core/src/types'
|
||||
import { User } from '@devhub/core/src/types/graphql'
|
||||
|
||||
// TODO: Put this on a shared repository with the server
|
||||
export function fromGitHubUser(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
|
||||
import { Theme } from '@devhub/core/dist/types'
|
||||
import { Theme } from '@devhub/core/src/types'
|
||||
import { useTheme } from './context/ThemeContext'
|
||||
|
||||
function getStyles(params: { theme: Theme }) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { ActivityIndicator, Text, View } from 'react-native'
|
||||
|
||||
import { LoadState } from '@devhub/core/dist/types'
|
||||
import { LoadState } from '@devhub/core/src/types'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
import { Button } from '../common/Button'
|
||||
import { TransparentTextOverlay } from '../common/TransparentTextOverlay'
|
||||
|
||||
@@ -18,14 +18,14 @@ import {
|
||||
GitHubRepo,
|
||||
GitHubUser,
|
||||
MultipleStarEvent,
|
||||
} from '@devhub/core/dist/types'
|
||||
import { getEventText } from '@devhub/core/dist/utils/helpers/github/events'
|
||||
import { getOwnerAndRepo } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
} from '@devhub/core/src/types'
|
||||
import { getEventText } from '@devhub/core/src/utils/helpers/github/events'
|
||||
import { getOwnerAndRepo } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import {
|
||||
getGitHubAvatarURLFromPayload,
|
||||
getRepoFullNameFromObject,
|
||||
} from '@devhub/core/dist/utils/helpers/github/url'
|
||||
import { isEventPrivate } from '@devhub/core/dist/utils/helpers/shared'
|
||||
} from '@devhub/core/src/utils/helpers/github/url'
|
||||
import { isEventPrivate } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
import { getEventIconAndColor } from '../../utils/helpers/github/events'
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { FlatList, View } from 'react-native'
|
||||
|
||||
import { EnhancedGitHubEvent, LoadState } from '@devhub/core/dist/types'
|
||||
import { EnhancedGitHubEvent, LoadState } from '@devhub/core/src/types'
|
||||
import { ErrorBoundary } from '../../libs/bugsnag'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
import { Button } from '../common/Button'
|
||||
|
||||
@@ -4,17 +4,17 @@ import { StyleSheet, View } from 'react-native'
|
||||
import {
|
||||
GitHubNotification,
|
||||
GitHubNotificationReason,
|
||||
} from '@devhub/core/dist/types'
|
||||
import { getOwnerAndRepo } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
} from '@devhub/core/src/types'
|
||||
import { getOwnerAndRepo } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import {
|
||||
getGitHubURLForRepoInvitation,
|
||||
getGitHubURLForSecurityAlert,
|
||||
getIssueOrPullRequestNumberFromUrl,
|
||||
} from '@devhub/core/dist/utils/helpers/github/url'
|
||||
} from '@devhub/core/src/utils/helpers/github/url'
|
||||
import {
|
||||
isNotificationPrivate,
|
||||
trimNewLinesAndSpaces,
|
||||
} from '@devhub/core/dist/utils/helpers/shared'
|
||||
} from '@devhub/core/src/utils/helpers/shared'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
import { getNotificationReasonMetadata } from '../../utils/helpers/github/notifications'
|
||||
import {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { FlatList, View } from 'react-native'
|
||||
|
||||
import { GitHubNotification, LoadState } from '@devhub/core/dist/types'
|
||||
import { GitHubNotification, LoadState } from '@devhub/core/src/types'
|
||||
import { ErrorBoundary } from '../../libs/bugsnag'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
import { Button } from '../common/Button'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet } from 'react-native'
|
||||
|
||||
import { Omit } from '@devhub/core/dist/types'
|
||||
import { Omit } from '@devhub/core/src/types'
|
||||
import { IconProps } from 'react-native-vector-icons/Icon'
|
||||
import { Octicons as Icon } from '../../../libs/vector-icons'
|
||||
import { contentPadding } from '../../../styles/variables'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { StyleProp, StyleSheet, Text, ViewStyle } from 'react-native'
|
||||
|
||||
import { GitHubIcon } from '@devhub/core/dist/types'
|
||||
import { GitHubIcon } from '@devhub/core/src/types'
|
||||
import { Octicons as Icon } from '../../../libs/vector-icons'
|
||||
import { radius } from '../../../styles/variables'
|
||||
import { fixURL } from '../../../utils/helpers/github/url'
|
||||
|
||||
@@ -2,8 +2,8 @@ import { MomentInput } from 'moment'
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
|
||||
import { GitHubIcon } from '@devhub/core/dist/types'
|
||||
import { getDateSmallText } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { GitHubIcon } from '@devhub/core/src/types'
|
||||
import { getDateSmallText } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { Octicons as Icon } from '../../../libs/vector-icons'
|
||||
import { Avatar } from '../../common/Avatar'
|
||||
import { IntervalRefresh } from '../../common/IntervalRefresh'
|
||||
|
||||
@@ -2,8 +2,8 @@ import { MomentInput } from 'moment'
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
|
||||
import { GitHubIcon } from '@devhub/core/dist/types'
|
||||
import { getDateSmallText } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { GitHubIcon } from '@devhub/core/src/types'
|
||||
import { getDateSmallText } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { useReduxState } from '../../../redux/hooks/use-redux-state'
|
||||
import * as selectors from '../../../redux/selectors'
|
||||
import { Avatar } from '../../common/Avatar'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { Platform } from '../../../../libs/platform'
|
||||
import { fixURL } from '../../../../utils/helpers/github/url'
|
||||
import { Avatar } from '../../../common/Avatar'
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react'
|
||||
import { CommitRow } from './CommitRow'
|
||||
import { RenderItem, RowList } from './RowList'
|
||||
|
||||
import { GitHubCommit } from '@devhub/core/dist/types'
|
||||
import { GitHubCommit } from '@devhub/core/src/types'
|
||||
|
||||
export interface CommitListRowProps {
|
||||
isRead: boolean
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import React from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
import { tryGetUsernameFromGitHubEmail } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
import { tryGetUsernameFromGitHubEmail } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import {
|
||||
getCommentIdFromUrl,
|
||||
getGitHubSearchURL,
|
||||
getGitHubURLForUser,
|
||||
} from '@devhub/core/dist/utils/helpers/github/url'
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/dist/utils/helpers/shared'
|
||||
} from '@devhub/core/src/utils/helpers/github/url'
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { Octicons as Icon } from '../../../../libs/vector-icons'
|
||||
import { fixURL } from '../../../../utils/helpers/github/url'
|
||||
import { Avatar } from '../../../common/Avatar'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { Octicons as Icon } from '../../../../libs/vector-icons'
|
||||
import { defaultStyles } from '../../../../styles/styles'
|
||||
import { contentPadding } from '../../../../styles/variables'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
import { getGitHubURLForRelease } from '@devhub/core/dist/utils/helpers/github/url'
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { getGitHubURLForRelease } from '@devhub/core/src/utils/helpers/github/url'
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { Octicons as Icon } from '../../../../libs/vector-icons'
|
||||
import { fixURL } from '../../../../utils/helpers/github/url'
|
||||
import { Avatar } from '../../../common/Avatar'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import React from 'react'
|
||||
|
||||
import { GitHubRepo } from '@devhub/core/dist/types'
|
||||
import { getOwnerAndRepo } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
import { getRepoFullNameFromObject } from '@devhub/core/dist/utils/helpers/github/url'
|
||||
import { GitHubRepo } from '@devhub/core/src/types'
|
||||
import { getOwnerAndRepo } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import { getRepoFullNameFromObject } from '@devhub/core/src/utils/helpers/github/url'
|
||||
import { RepositoryRow } from './RepositoryRow'
|
||||
import { RenderItem, RowList } from './RowList'
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import React from 'react'
|
||||
import { RenderItem, RowList } from './RowList'
|
||||
import { UserRow } from './UserRow'
|
||||
|
||||
import { GitHubUser } from '@devhub/core/dist/types'
|
||||
import { GitHubUser } from '@devhub/core/src/types'
|
||||
|
||||
export interface UserListRowProps {
|
||||
isRead: boolean
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React from 'react'
|
||||
|
||||
import { GitHubPage } from '@devhub/core/dist/types'
|
||||
import { GitHubPage } from '@devhub/core/src/types'
|
||||
import { RenderItem, RowList } from './RowList'
|
||||
import { WikiPageRow } from './WikiPageRow'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { Text, View } from 'react-native'
|
||||
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { trimNewLinesAndSpaces } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { Octicons as Icon } from '../../../../libs/vector-icons'
|
||||
import { fixURL } from '../../../../utils/helpers/github/url'
|
||||
import { Link } from '../../../common/Link'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import _ from 'lodash'
|
||||
|
||||
import { GitHubURLOptions } from '@devhub/core/dist/utils/helpers/github/url'
|
||||
import { GitHubURLOptions } from '@devhub/core/src/utils/helpers/github/url'
|
||||
import { Browser } from '../../../../libs/browser'
|
||||
import { fixURL } from '../../../../utils/helpers/github/url'
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash'
|
||||
import { StyleSheet } from 'react-native'
|
||||
|
||||
import { Theme } from '@devhub/core/dist/types/themes'
|
||||
import { Theme } from '@devhub/core/src/types/themes'
|
||||
import { contentPadding, smallTextSize } from '../../../../styles/variables'
|
||||
|
||||
export const getCardRowStylesForTheme = _.memoize((theme: Theme) => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash'
|
||||
import { StyleSheet } from 'react-native'
|
||||
|
||||
import { Theme } from '@devhub/core/dist/types/themes'
|
||||
import { Theme } from '@devhub/core/src/types/themes'
|
||||
import { Platform } from '../../libs/platform'
|
||||
import {
|
||||
avatarSize,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
ViewStyle,
|
||||
} from 'react-native'
|
||||
|
||||
import { GitHubIcon } from '@devhub/core/dist/types'
|
||||
import { GitHubIcon } from '@devhub/core/src/types'
|
||||
import { Octicons as Icon } from '../../libs/vector-icons'
|
||||
import { useReduxState } from '../../redux/hooks/use-redux-state'
|
||||
import * as selectors from '../../redux/selectors'
|
||||
|
||||
@@ -2,11 +2,11 @@ import _ from 'lodash'
|
||||
import React, { useState } from 'react'
|
||||
import { ScrollView, StyleSheet, Text, View } from 'react-native'
|
||||
|
||||
import { Column } from '@devhub/core/dist/types'
|
||||
import { Column } from '@devhub/core/src/types'
|
||||
import {
|
||||
eventTypes,
|
||||
getEventTypeMetadata,
|
||||
} from '@devhub/core/dist/utils/helpers/github/events'
|
||||
} from '@devhub/core/src/utils/helpers/github/events'
|
||||
import { useDimensions } from '../../hooks/use-dimensions'
|
||||
import { Octicons as Icon } from '../../libs/vector-icons'
|
||||
import * as actions from '../../redux/actions'
|
||||
|
||||
@@ -2,7 +2,7 @@ import _ from 'lodash'
|
||||
import React from 'react'
|
||||
import { TouchableWithoutFeedback, View, ViewStyle } from 'react-native'
|
||||
|
||||
import { GitHubIcon } from '@devhub/core/dist/types'
|
||||
import { GitHubIcon } from '@devhub/core/src/types'
|
||||
import * as colors from '../../styles/colors'
|
||||
import {
|
||||
columnHeaderItemContentSize,
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
ViewStyle,
|
||||
} from 'react-native'
|
||||
|
||||
import { Omit } from '@devhub/core/dist/types'
|
||||
import { Omit } from '@devhub/core/src/types'
|
||||
import { ColumnContainer } from '../../containers/ColumnContainer'
|
||||
import { useEmitter } from '../../hooks/use-emitter'
|
||||
import { Separator } from '../common/Separator'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react'
|
||||
|
||||
import { getColumnHeaderDetails } from '@devhub/core/dist/utils/helpers/github/events'
|
||||
import { getColumnHeaderDetails } from '@devhub/core/src/utils/helpers/github/events'
|
||||
import {
|
||||
EventCardsContainer,
|
||||
EventCardsContainerProps,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useState } from 'react'
|
||||
|
||||
import { getColumnHeaderDetails } from '@devhub/core/dist/utils/helpers/github/events'
|
||||
import { getColumnHeaderDetails } from '@devhub/core/src/utils/helpers/github/events'
|
||||
import {
|
||||
NotificationCardsContainer,
|
||||
NotificationCardsContainerProps,
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
getUserAvatarByAvatarURL,
|
||||
getUserAvatarByEmail,
|
||||
getUserAvatarByUsername,
|
||||
} from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
} from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import { avatarSize, radius, smallAvatarSize } from '../../styles/variables'
|
||||
import { fixURL } from '../../utils/helpers/github/url'
|
||||
import { getRepositoryURL, getUserURL } from '../cards/partials/rows/helpers'
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
TouchableOpacityProps,
|
||||
} from 'react-native'
|
||||
|
||||
import { GitHubIcon } from '@devhub/core/dist/types'
|
||||
import { GitHubIcon } from '@devhub/core/src/types'
|
||||
import { Octicons as Icon } from '../../libs/vector-icons'
|
||||
import * as colors from '../../styles/colors'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Dimensions, ScaledSize } from 'react-native'
|
||||
import {
|
||||
MAX_COLUMN_WIDTH,
|
||||
MIN_COLUMN_WIDTH,
|
||||
} from '@devhub/core/dist/utils/constants'
|
||||
} from '@devhub/core/src/utils/constants'
|
||||
import { sidebarSize } from '../../styles/variables'
|
||||
import { APP_LAYOUT_BREAKPOINTS, getLayoutConsumerState } from './LayoutContext'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import React, { useContext } from 'react'
|
||||
|
||||
import { Theme } from '@devhub/core/dist/types'
|
||||
import { Theme } from '@devhub/core/src/types'
|
||||
import { useReduxState } from '../../redux/hooks/use-redux-state'
|
||||
import * as selectors from '../../redux/selectors'
|
||||
import { defaultThemePair } from '../../redux/selectors/config'
|
||||
|
||||
@@ -8,8 +8,8 @@ import {
|
||||
View,
|
||||
} from 'react-native'
|
||||
|
||||
import { ModalPayload } from '@devhub/core/dist/types'
|
||||
import { getColumnHeaderDetails } from '@devhub/core/dist/utils/helpers/github/events'
|
||||
import { ModalPayload } from '@devhub/core/src/types'
|
||||
import { getColumnHeaderDetails } from '@devhub/core/src/utils/helpers/github/events'
|
||||
import { useColumn } from '../../hooks/use-column'
|
||||
import * as actions from '../../redux/actions'
|
||||
import { useReduxAction } from '../../redux/hooks/use-redux-action'
|
||||
|
||||
@@ -8,12 +8,12 @@ import {
|
||||
AddColumnDetailsPayload,
|
||||
ColumnParamField,
|
||||
NotificationColumn,
|
||||
} from '@devhub/core/dist/types'
|
||||
} from '@devhub/core/src/types'
|
||||
import * as actions from '../../redux/actions'
|
||||
import { ModalColumn } from '../columns/ModalColumn'
|
||||
|
||||
import { createSubscriptionObjectWithId } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
import { guid } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { createSubscriptionObjectWithId } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import { guid } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { useReduxAction } from '../../redux/hooks/use-redux-action'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
import { ColumnHeaderItem } from '../columns/ColumnHeaderItem'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React, { useState } from 'react'
|
||||
import { Text, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
import { AddColumnDetailsPayload } from '@devhub/core/dist/types'
|
||||
import { AddColumnDetailsPayload } from '@devhub/core/src/types'
|
||||
import * as actions from '../../redux/actions'
|
||||
import { useReduxAction } from '../../redux/hooks/use-redux-action'
|
||||
import { contentPadding } from '../../styles/variables'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
|
||||
|
||||
import { Theme } from '@devhub/core/dist/types'
|
||||
import { Theme } from '@devhub/core/src/types'
|
||||
import { useTheme } from '../../components/context/ThemeContext'
|
||||
import * as actions from '../../redux/actions'
|
||||
import { useReduxAction } from '../../redux/hooks/use-redux-action'
|
||||
|
||||
@@ -9,7 +9,7 @@ import {
|
||||
GitHubEvent,
|
||||
LoadState,
|
||||
Omit,
|
||||
} from '@devhub/core/dist/types'
|
||||
} from '@devhub/core/src/types'
|
||||
import { EventCards, EventCardsProps } from '../components/cards/EventCards'
|
||||
import { getActivity } from '../libs/github'
|
||||
import { getFilteredEvents } from '../utils/helpers/filters'
|
||||
|
||||
@@ -8,14 +8,14 @@ import {
|
||||
LoadState,
|
||||
NotificationSubscription,
|
||||
Omit,
|
||||
} from '@devhub/core/dist/types'
|
||||
import { getOwnerAndRepo } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
} from '@devhub/core/src/types'
|
||||
import { getOwnerAndRepo } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import {
|
||||
getCommentIdFromUrl,
|
||||
getCommitShaFromUrl,
|
||||
getIssueOrPullRequestNumberFromUrl,
|
||||
getReleaseIdFromUrl,
|
||||
} from '@devhub/core/dist/utils/helpers/github/url'
|
||||
} from '@devhub/core/src/utils/helpers/github/url'
|
||||
import {
|
||||
NotificationCards,
|
||||
NotificationCardsProps,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import Octokit from '@octokit/rest'
|
||||
|
||||
import { GitHubActivityType } from '@devhub/core/dist/types'
|
||||
import { GitHubActivityType } from '@devhub/core/src/types'
|
||||
|
||||
export const octokit = new Octokit()
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import qs from 'qs'
|
||||
|
||||
import { API_BASE_URL } from '@devhub/core/dist/utils/constants'
|
||||
import { API_BASE_URL } from '@devhub/core/src/utils/constants'
|
||||
import { Browser } from '../browser'
|
||||
import { getUrlParamsIfMatches, listenForNextUrl } from './helpers'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import qs from 'qs'
|
||||
|
||||
import { API_BASE_URL } from '@devhub/core/dist/utils/constants'
|
||||
import { API_BASE_URL } from '@devhub/core/src/utils/constants'
|
||||
import { listenForNextMessageData } from './helpers.web'
|
||||
|
||||
function popupWindow(url: string, w: number = 500, h: number = 600) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { User } from '@devhub/core/dist/types/graphql'
|
||||
import { User } from '@devhub/core/src/types/graphql'
|
||||
import { createAction, createErrorAction } from '../helpers'
|
||||
|
||||
export function loginRequest(payload: {
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
GitHubEvent,
|
||||
GitHubNotificationReason,
|
||||
NotificationColumnFilters,
|
||||
} from '@devhub/core/dist/types'
|
||||
} from '@devhub/core/src/types'
|
||||
import { createAction } from '../helpers'
|
||||
|
||||
export function replaceColumns(payload: ColumnAndSubscriptions[]) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ThemePair } from '@devhub/core/dist/types'
|
||||
import { ThemePair } from '@devhub/core/src/types'
|
||||
import { createAction } from '../helpers'
|
||||
|
||||
export function setTheme(payload: {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ModalPayload } from '@devhub/core/dist/types'
|
||||
import { ModalPayload } from '@devhub/core/src/types'
|
||||
import { createAction } from '../helpers'
|
||||
|
||||
export function pushModal(payload: ModalPayload) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash'
|
||||
import { REHYDRATE } from 'redux-persist'
|
||||
|
||||
import { User } from '@devhub/core/dist/types/graphql'
|
||||
import { User } from '@devhub/core/src/types/graphql'
|
||||
import { Reducer } from '../types'
|
||||
|
||||
export interface State {
|
||||
|
||||
@@ -5,8 +5,8 @@ import {
|
||||
ActivityColumn,
|
||||
Column,
|
||||
NotificationColumn,
|
||||
} from '@devhub/core/dist/types'
|
||||
import { guid } from '@devhub/core/dist/utils/helpers/shared'
|
||||
} from '@devhub/core/src/types'
|
||||
import { guid } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { Reducer } from '../types'
|
||||
|
||||
export interface State {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import immer from 'immer'
|
||||
import _ from 'lodash'
|
||||
|
||||
import { ThemePair } from '@devhub/core/dist/types'
|
||||
import { ThemePair } from '@devhub/core/src/types'
|
||||
import {
|
||||
DEFAULT_DARK_THEME,
|
||||
DEFAULT_LIGHT_THEME,
|
||||
} from '@devhub/core/dist/utils/constants'
|
||||
} from '@devhub/core/src/utils/constants'
|
||||
import { loadTheme } from '../../styles/utils'
|
||||
import { Reducer } from '../types'
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import immer from 'immer'
|
||||
|
||||
import { ModalPayload } from '@devhub/core/dist/types'
|
||||
import { ModalPayload } from '@devhub/core/src/types'
|
||||
import { Reducer } from '../types'
|
||||
|
||||
export interface State {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import immer from 'immer'
|
||||
import _ from 'lodash'
|
||||
|
||||
import { ColumnSubscription } from '@devhub/core/dist/types'
|
||||
import { ColumnSubscription } from '@devhub/core/src/types'
|
||||
import { Reducer } from '../types'
|
||||
|
||||
export interface State {
|
||||
|
||||
@@ -2,9 +2,9 @@ import axios, { AxiosResponse } from 'axios'
|
||||
import { REHYDRATE } from 'redux-persist'
|
||||
import { all, call, put, select, takeLatest } from 'redux-saga/effects'
|
||||
|
||||
import { GitHubUser } from '@devhub/core/dist/types'
|
||||
import { User } from '@devhub/core/dist/types/graphql'
|
||||
import { GRAPHQL_ENDPOINT } from '@devhub/core/dist/utils/constants'
|
||||
import { GitHubUser } from '@devhub/core/src/types'
|
||||
import { User } from '@devhub/core/src/types/graphql'
|
||||
import { GRAPHQL_ENDPOINT } from '@devhub/core/src/utils/constants'
|
||||
import { fromGitHubUser } from '../../api/mappers/user'
|
||||
import * as github from '../../libs/github'
|
||||
import * as actions from '../actions'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { all, put, select, takeLatest } from 'redux-saga/effects'
|
||||
|
||||
import { ColumnAndSubscriptions } from '@devhub/core/dist/types'
|
||||
import { createSubscriptionObjectWithId } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
import { guid } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { ColumnAndSubscriptions } from '@devhub/core/src/types'
|
||||
import { createSubscriptionObjectWithId } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import { guid } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { delay } from 'redux-saga'
|
||||
import { emitter } from '../../setup'
|
||||
import * as actions from '../actions'
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { delay } from 'redux-saga'
|
||||
import { all, fork, put } from 'redux-saga/effects'
|
||||
|
||||
import { isNight } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { isNight } from '@devhub/core/src/utils/helpers/shared'
|
||||
import * as actions from '../actions'
|
||||
|
||||
let wasNight
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import _ from 'lodash'
|
||||
import { all, put, select, takeLatest } from 'redux-saga/effects'
|
||||
|
||||
import { Column } from '@devhub/core/dist/types'
|
||||
import { Column } from '@devhub/core/src/types'
|
||||
import * as actions from '../actions'
|
||||
import * as selectors from '../selectors'
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { createSelector } from 'reselect'
|
||||
|
||||
import { ThemePair } from '@devhub/core/dist/types'
|
||||
import * as constants from '@devhub/core/dist/utils/constants'
|
||||
import { isNight } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { ThemePair } from '@devhub/core/src/types'
|
||||
import * as constants from '@devhub/core/src/utils/constants'
|
||||
import { isNight } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { loadTheme } from '../../styles/utils'
|
||||
import { RootState } from '../types'
|
||||
|
||||
|
||||
@@ -10,9 +10,9 @@ import {
|
||||
import storage from 'redux-persist/lib/storage'
|
||||
import createSagaMiddleware from 'redux-saga'
|
||||
|
||||
import { Column, ColumnSubscription, GitHubUser } from '@devhub/core/dist/types'
|
||||
import { GraphQLGitHubUser } from '@devhub/core/dist/types/graphql'
|
||||
import { guid } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { Column, ColumnSubscription, GitHubUser } from '@devhub/core/src/types'
|
||||
import { GraphQLGitHubUser } from '@devhub/core/src/types/graphql'
|
||||
import { guid } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { rootReducer } from './reducers'
|
||||
import { rootSaga } from './sagas'
|
||||
import * as selectors from './selectors'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Theme, ThemeName } from '@devhub/core/dist/types/themes'
|
||||
import { Theme, ThemeName } from '@devhub/core/src/types/themes'
|
||||
import { theme as darkBlack } from './themes/dark-black'
|
||||
import { theme as darkBlue } from './themes/dark-blue'
|
||||
import { theme as darkGray } from './themes/dark-gray'
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { darken, getLuminance, invert, lighten, rgba } from 'polished'
|
||||
|
||||
import { Theme } from '@devhub/core/dist/types/themes'
|
||||
import { Theme } from '@devhub/core/src/types/themes'
|
||||
|
||||
function createTheme(theme: Theme): Theme {
|
||||
return theme
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Theme, ThemePair } from '@devhub/core/dist/types/themes'
|
||||
import * as constants from '@devhub/core/dist/utils/constants'
|
||||
import { isNight } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { Theme, ThemePair } from '@devhub/core/src/types/themes'
|
||||
import * as constants from '@devhub/core/src/utils/constants'
|
||||
import { isNight } from '@devhub/core/src/utils/helpers/shared'
|
||||
import { themes } from './themes'
|
||||
import { createThemeFromColor } from './themes/custom'
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@ import {
|
||||
GitHubEvent,
|
||||
GitHubNotification,
|
||||
NotificationColumnFilters,
|
||||
} from '@devhub/core/dist/types'
|
||||
import { mergeSimilarEvents } from '@devhub/core/dist/utils/helpers/github/events'
|
||||
} from '@devhub/core/src/types'
|
||||
import { mergeSimilarEvents } from '@devhub/core/src/utils/helpers/github/events'
|
||||
import {
|
||||
isEventPrivate,
|
||||
isNotificationPrivate,
|
||||
} from '@devhub/core/dist/utils/helpers/shared'
|
||||
} from '@devhub/core/src/utils/helpers/shared'
|
||||
|
||||
export const filterRecordHasAnyForcedValue = (
|
||||
filtersRecord: Record<string, boolean | undefined> | undefined,
|
||||
|
||||
@@ -3,8 +3,8 @@ import {
|
||||
GitHubIcon,
|
||||
GitHubIssue,
|
||||
GitHubPullRequest,
|
||||
} from '@devhub/core/dist/types'
|
||||
import { isPullRequest } from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
} from '@devhub/core/src/types'
|
||||
import { isPullRequest } from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import * as colors from '../../../styles/colors'
|
||||
import { getIssueIconAndColor, getPullRequestIconAndColor } from './shared'
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { GitHubNotificationReason } from '@devhub/core/dist/types'
|
||||
import { capitalize } from '@devhub/core/dist/utils/helpers/shared'
|
||||
import { GitHubNotificationReason } from '@devhub/core/src/types'
|
||||
import { capitalize } from '@devhub/core/src/utils/helpers/shared'
|
||||
import * as colors from '../../../styles/colors'
|
||||
|
||||
export const notificationReasons: GitHubNotificationReason[] = [
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
import {
|
||||
getCommitIconAndColor,
|
||||
isPullRequest,
|
||||
} from '@devhub/core/dist/utils/helpers/github/shared'
|
||||
} from '@devhub/core/src/utils/helpers/github/shared'
|
||||
import * as colors from '../../../styles/colors'
|
||||
|
||||
export function getPullRequestIconAndColor(pullRequest: {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import {
|
||||
fixURLForPlatform,
|
||||
GitHubURLOptions,
|
||||
} from '@devhub/core/dist/utils/helpers/github/url'
|
||||
} from '@devhub/core/src/utils/helpers/github/url'
|
||||
import { Platform } from '../../../libs/platform'
|
||||
|
||||
export function fixURL(url?: string, options?: GitHubURLOptions) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"version": "0.29.0",
|
||||
"main": "dist",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
"build": "tsc -b",
|
||||
"clean": "rm -rf dist/*",
|
||||
"format": "prettier --write '{.,src/**}/*.{js,jsx,ts,tsx}'",
|
||||
"lint": "tslint -p .",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import _ from 'lodash'
|
||||
import moment, { MomentInput } from 'moment'
|
||||
import { PixelRatio } from 'react-native'
|
||||
import { EnhancedGitHubEvent, GitHubNotification } from '../../types'
|
||||
|
||||
export function capitalize(str: string) {
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
"../../@types",
|
||||
"../../node_modules/@types"
|
||||
]
|
||||
},
|
||||
"include": ["src/"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
GoogleAnalyticsTracker,
|
||||
} from 'react-native-google-analytics-bridge'
|
||||
|
||||
import { App } from '@devhub/components/dist/components/App'
|
||||
import { App } from '@devhub/components/src/components/App'
|
||||
|
||||
export const tracker = new GoogleAnalyticsTracker('UA-52350759-2')
|
||||
GoogleAnalyticsSettings.setDispatchInterval(10)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"start": "node ../../node_modules/react-native/local-cli/cli.js start",
|
||||
"studio": "open -a /Applications/Android\\ Studio.app ./android/",
|
||||
"test": "jest",
|
||||
"tsc": "tsc",
|
||||
"tsc": "tsc -b",
|
||||
"xcode": "open ios/devhub.xcodeproj"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
@@ -1,22 +1,69 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const resolve = require('resolve')
|
||||
const webpack = require('webpack')
|
||||
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer')
|
||||
.BundleAnalyzerPlugin
|
||||
const ReactNativeWebPlugin = require('babel-plugin-react-native-web')
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin-alt')
|
||||
|
||||
const appDirectory = fs.realpathSync(process.cwd())
|
||||
const resolveApp = relativePath => path.resolve(appDirectory, relativePath)
|
||||
|
||||
const appIncludes = [
|
||||
resolveApp('src'),
|
||||
resolveApp('../core/src'),
|
||||
resolveApp('../components/src'),
|
||||
]
|
||||
|
||||
module.exports = function override(config, env) {
|
||||
config.resolve.alias['deepmerge$'] = 'deepmerge/dist/umd.js'
|
||||
|
||||
// allow importing from outside of src folder
|
||||
config.resolve.plugins = config.resolve.plugins.filter(
|
||||
plugin => plugin.constructor.name !== 'ModuleScopePlugin',
|
||||
)
|
||||
|
||||
config.module.rules[0].include = appIncludes
|
||||
config.module.rules[1] = null
|
||||
config.module.rules[2].oneOf[1].include = appIncludes
|
||||
config.module.rules[2].oneOf[1].options.plugins = [
|
||||
require.resolve('babel-plugin-react-native-web'),
|
||||
].concat(config.module.rules[2].oneOf[1].options.plugins)
|
||||
config.module.rules = config.module.rules.filter(Boolean)
|
||||
|
||||
config.plugins = config.plugins.map(plugin => {
|
||||
if (plugin.constructor.name !== 'ForkTsCheckerWebpackPlugin') return plugin
|
||||
|
||||
return new ForkTsCheckerWebpackPlugin({
|
||||
typescript: resolve.sync('typescript', {
|
||||
basedir: resolveApp('node_modules'),
|
||||
}),
|
||||
async: false,
|
||||
checkSyntacticErrors: true,
|
||||
tsconfig: resolveApp('tsconfig.json'),
|
||||
compilerOptions: {
|
||||
module: 'esnext',
|
||||
moduleResolution: 'node',
|
||||
resolveJsonModule: true,
|
||||
isolatedModules: true,
|
||||
noEmit: true,
|
||||
jsx: 'preserve',
|
||||
},
|
||||
reportFiles: [
|
||||
'**',
|
||||
'!**/*.json',
|
||||
'!**/__tests__/**',
|
||||
'!**/?(*.)(spec|test).*',
|
||||
'!src/setupProxy.js',
|
||||
'!src/setupTests.*',
|
||||
],
|
||||
watch: appIncludes, // <- changed this
|
||||
silent: false,
|
||||
// formatter: typescriptFormatter,
|
||||
})
|
||||
})
|
||||
|
||||
config.plugins.push(
|
||||
new webpack.DefinePlugin({ __DEV__: env !== 'production' }),
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
"now-build": "build",
|
||||
"predeploy": "npm run build",
|
||||
"prepare": "cd .. && yarn patch-package",
|
||||
"serve": "serve build",
|
||||
"serve": "serve dist",
|
||||
"start": "react-app-rewired start",
|
||||
"test": "react-app-rewired test"
|
||||
},
|
||||
|
||||
@@ -7,7 +7,7 @@ import { AppRegistry } from 'react-native-web'
|
||||
import './index.css'
|
||||
import './reset.css'
|
||||
|
||||
import { App } from '@devhub/components/dist/components/App'
|
||||
import { App } from '@devhub/components/src/components/App'
|
||||
|
||||
AppRegistry.registerComponent('devhub', () => App)
|
||||
AppRegistry.runApplication('devhub', {
|
||||
|
||||
@@ -4,14 +4,16 @@
|
||||
"allowJs": false,
|
||||
"composite": true,
|
||||
"declaration": true,
|
||||
"jsx": "react",
|
||||
"noEmit": false,
|
||||
"jsx": "preserve",
|
||||
"noEmit": true,
|
||||
"outDir": "dist",
|
||||
"rootDir": "src",
|
||||
"typeRoots": [
|
||||
"../../@types",
|
||||
"../../node_modules/@types"
|
||||
]
|
||||
],
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"isolatedModules": true
|
||||
},
|
||||
"include": [
|
||||
"src/index.tsx"
|
||||
@@ -20,6 +22,11 @@
|
||||
"src/setupProxy.js"
|
||||
],
|
||||
"references": [
|
||||
{ "path": "../components" }
|
||||
{
|
||||
"path": "../core"
|
||||
},
|
||||
{
|
||||
"path": "../components"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user