Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 8, 2022. It is now read-only.

build: reduce build size#1132

Merged
mydearxym merged 44 commits intodevfromfix-ci-cypress
Aug 3, 2021
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
44 commits
Select commitHold shift + click to select a range
860af35
Revert to e950c57ea2, ci build ok one
mydearxymJul 31, 2021
c761f78
chore: remove sentry in _app
mydearxymJul 31, 2021
d73fc0b
chore: debug wip
mydearxymJul 31, 2021
172d8cb
chore: rm sentry wip
mydearxymJul 31, 2021
7ea6a7b
chore: rm sentry wip
mydearxymJul 31, 2021
d21d617
chore: rm sentry wip
mydearxymJul 31, 2021
5d8a5c0
chore: rm sentry wip
mydearxymJul 31, 2021
73067c8
chore: rm sentry wip
mydearxymJul 31, 2021
1a82417
chore: rm sentry deps
mydearxymJul 31, 2021
06a012e
chore: wip
mydearxymJul 31, 2021
3bf1cf7
chore: wip
mydearxymJul 31, 2021
1f67dc2
chore: wip
mydearxymJul 31, 2021
5845904
chore: wip
mydearxymJul 31, 2021
9b4b2f4
build(size): raw page with store down to 178KB
mydearxymAug 1, 2021
1d0d4f3
chore: wip
mydearxymAug 1, 2021
d2472ec
build(size): reduce wip
mydearxymAug 1, 2021
1c332d2
build(size): reduce wip
mydearxymAug 1, 2021
cb1590b
chore: wip
mydearxymAug 1, 2021
61ca0d8
chore: down to 268kb
mydearxymAug 1, 2021
270c622
build(size): reduce wip
mydearxymAug 1, 2021
91fbd20
chore: utils import wip
mydearxymAug 1, 2021
3f79550
chore: replace apollo-client wip
mydearxymAug 1, 2021
f171883
chore: replace apollo-client wip
mydearxymAug 1, 2021
7e122df
build(size): reduce wip
mydearxymAug 1, 2021
0e85deb
build(size): reduce wip
mydearxymAug 2, 2021
2c267fe
build(size): reduce 206kB, wip
mydearxymAug 2, 2021
865cf54
build(size): update eslint
mydearxymAug 2, 2021
f01c99c
build(size): wip
mydearxymAug 2, 2021
1f816a8
chore: debug ci
mydearxymAug 2, 2021
3f825ef
chore: debug ci
mydearxymAug 2, 2021
273955f
chore: debug ci
mydearxymAug 2, 2021
99857fb
chore: debug
mydearxymAug 2, 2021
f585008
chore: use old version of header
mydearxymAug 2, 2021
479f9c9
chore: upgrade cypress
mydearxymAug 2, 2021
6f16db5
chore: upgrade cypress
mydearxymAug 2, 2021
b9e407c
ci: add host on action
mydearxymAug 2, 2021
2bcaf85
ci: add host on action
mydearxymAug 2, 2021
b7ea3c2
ci: add host on action
mydearxymAug 2, 2021
41fc497
ci: debug network error
mydearxymAug 3, 2021
eb34c3f
ci: downgrade cy to 4.2.0
mydearxymAug 3, 2021
55e433f
chore: fix header test
mydearxymAug 3, 2021
d50aa8d
chore: clean up
mydearxymAug 3, 2021
944f092
chore: header props adjust
mydearxymAug 3, 2021
60b9596
chore: remove header store in root-state-tree
mydearxymAug 3, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion.eslintignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,4 +5,5 @@ next-env.d.ts
*.lock
*.hbs
*.svg
*.png
*.png
*.txt
2 changes: 2 additions & 0 deletions.eslintrc.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -43,6 +43,8 @@ module.exports = {
rules: {
'@typescript-eslint/no-var-requires': 0,
'@typescript-eslint/ban-ts-comment': 0,
'no-setter-return': 0,
'no-dupe-else-if': 0,
'react/jsx-uses-react': 'off',
'react/react-in-jsx-scope': 'off',
'react/jsx-filename-extension': [
Expand Down
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletionsjsconfig.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,11 +8,13 @@
"@/services/*": ["src/services/*"],
"@/constant": ["utils/constant"],
"@/hooks": ["src/hooks"],
"@/hooks/*": ["src/hooks/*"],
"@/hoc": ["src/hoc"],
"@/config": ["config"],
"@/stores/*": ["src/stores/*"],
"@/model": ["src/stores/SharedModel"],
"@/utils": ["utils"],
"@/utils/*": ["utils/*"],
"@/schemas": ["src/schemas"],
"@/Img": ["src/components/Img"],
"@/SvgIcons/*": ["src/components/SvgIcons/*"],
Expand Down
3 changes: 3 additions & 0 deletionsnext.config.docker.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -24,6 +24,9 @@ const nextConfig = {
'process.env.SENTRY_RELEASE': JSON.stringify(buildId),
}),
)
if (!isServer) {
config.resolve.alias['@sentry/node'] = '@sentry/browser'
}

return config
},
Expand Down
13 changes: 0 additions & 13 deletionsnext.config.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,19 +9,6 @@ const withBundleAnalyzer = require('@next/bundle-analyzer')({
})
const offlineConfig = require('./config/next_offline')

// Use the SentryWebpack plugin to upload the source maps during build step
// const SentryWebpackPlugin = require('@sentry/webpack-plugin')

// const {
// NEXT_PUBLIC_SENTRY_DSN: SENTRY_DSN,
// SENTRY_ORG,
// SENTRY_PROJECT,
// SENTRY_AUTH_TOKEN,
// NODE_ENV,
// } = process.env

// process.env.SENTRY_DSN = SENTRY_DSN

// next-plugins end

const nextConfig = {
Expand Down
23 changes: 8 additions & 15 deletionspackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@
"dev": "cross-env NODE_ENV=dev node server.js",
"prod": "cross-env NODE_ENV=production run-p server",
"local": "cross-env NODE_ENV=local node server",
"ci": "cross-env NODE_ENV=ci node server",
"ci": "cross-env NODE_ENV=ci node server --inspect",
"server": "npm run clean && node server.js",
"build": "next build",
"build:clean": "run-s dist clean",
Expand DownExpand Up@@ -58,12 +58,6 @@
"@tippyjs/react": "4.2.5",
"@zeit/next-source-maps": "0.0.4-canary.1",
"accepts": "^1.3.4",
"apollo-cache-inmemory": "1.6.3",
"apollo-client": "2.6.4",
"apollo-link": "1.2.13",
"apollo-link-error": "^1.1.12",
"apollo-link-http": "1.5.16",
"apollo-link-retry": "2.2.15",
"babel-plugin-add-react-displayname": "^0.0.5",
"babel-plugin-styled-components": "^1.12.0",
"cacheable-response": "^2.0.9",
Expand All@@ -78,9 +72,8 @@
"draft-js-plugins-editor": "2.1.1",
"express": "^4.16.4",
"glob": "^7.1.2",
"graphql": "14.5.5",
"graphql-request": "^1.6.0",
"graphql-tag": "^2.6.1",
"graphql": "^15.5.1",
"graphql-request": "3.5.0",
"graphql-voyager": "^1.0.0-rc.31",
"js-cookie": "^2.2.0",
"mastani-codehighlight": "0.0.7",
Expand All@@ -94,7 +87,7 @@
"next-compose-plugins": "^2.2.0",
"next-i18next": "4.4.1",
"next-offline": "4.0.6",
"nextjs-progressbar": "^0.0.6",
"nextjs-progressbar": "0.0.11",
"overlayscrollbars": "1.13.1",
"path-match": "^1.2.4",
"polished": "4.1.3",
Expand All@@ -108,7 +101,6 @@
"react-calendar-heatmap": "1.8.1",
"react-content-loader": "3.4.2",
"react-copy-to-clipboard": "^5.0.3",
"react-device-detect": "^1.17.0",
"react-dom": "17.0.2",
"react-highlight-words": "^0.16.0",
"react-lazy-load-image-component": "1.5.0",
Expand DownExpand Up@@ -138,7 +130,8 @@
"stringz": "^2.0.0",
"styled-components": "5.3.0",
"timeago-react": "3.0.2",
"tinykeys": "^1.0.6"
"tinykeys": "^1.0.6",
"urql": "^2.0.4"
},
"devDependencies": {
"@commitlint/cli": "^8.2.0",
Expand All@@ -156,12 +149,12 @@
"bundlewatch": "^0.2.7",
"commitizen": "3.1.2",
"coveralls": "3.0.14",
"cypress": "^7.0.0",
"cypress": "4.2.0",
"cz-conventional-changelog": "^3.0.0",
"enzyme": "3.11.0",
"enzyme-adapter-react-16": "1.15.2",
"enzyme-to-json": "^3.3.4",
"eslint": "6.4.0",
"eslint": "^7.32.0",
"eslint-config-next": "^11.0.1",
"husky": "^3.0.0",
"jest": "26.2.2",
Expand Down
3 changes: 1 addition & 2 deletionsserver/helper.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
const dev =
process.env.NODE_ENV !== 'production' && process.env.NODE_ENV !== 'ci'
const dev = process.env.NODE_ENV !== 'production' // && process.env.NODE_ENV !== 'ci'

const cacheableResponse = require('cacheable-response')

Expand Down
2 changes: 1 addition & 1 deletionsrc/components/AlertBar/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@

import { FC, ReactNode, memo } from 'react'

import { buildLog } from '@/utils'
import { buildLog } from '@/utils/logger'

import { Wrapper } from './styles'

Expand Down
2 changes: 1 addition & 1 deletionsrc/components/AlertBar/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import styled from 'styled-components'

import type { TTestable } from '@/spec'
// import Img from '@/Img'
// import { theme } from '@/utils'
// import { theme } from '@/utils/themes'

export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
'data-test-id': testid,
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/AnimatedCount/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components'

import type { TSIZE, TActive } from '@/spec'
import { theme } from '@/utils'
import { theme } from '@/utils/themes'

import { getFontSize } from './metric'

Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleActionsPanel/index.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@ import T from 'prop-types'
import { values } from 'ramda'

import { THREAD } from '@/constant'
import { buildLog } from '@/utils'
import { buildLog } from '@/utils/logger'

import PinOption from './PinOption'
import RefineOption from './RefineOption'
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ArticleActionsPanel/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
import styled from 'styled-components'

import { theme, css } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'
import Img from '@/Img'

export const Wrapper = styled.div`
Expand Down
5 changes: 1 addition & 4 deletionssrc/components/ArticleBaseStats/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@
import { FC, memo } from 'react'

import type { TArticle, TContainer } from '@/spec'
import {buildLog,scrollToComments } from '@/utils'
import { scrollToComments } from '@/utils/dom'

import { Space } from '@/components/Common'
import {
Expand All@@ -19,9 +19,6 @@ import {
CommentCount,
} from './styles'

/* eslint-disable-next-line */
const log = buildLog('c:ArticleBaseStats:index')

type TProps = {
testid?: string
article: TArticle
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ArticleBaseStats/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -5,7 +5,8 @@ import type { TTestable } from '@/spec'
import ViewSVGIcon from '@/icons/View'
import CommentSVGIcon from '@/icons/Comment'

import { css, theme } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'

export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
'data-test-id': testid,
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleCard/Header.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
import { FC, memo } from 'react'

import type { TTag } from '@/spec'
import { cutRest } from '@/utils'
import { cutRest } from '@/utils/helper'
import InlineTags from '@/components/InlineTags'

import { Wrapper, Title } from './styles/header'
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleCard/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@ import { FC, memo } from 'react'
import type { TJob } from '@/spec'
// import { THREAD } from '@/constant'

import { cutRest } from '@/utils'
import { cutRest } from '@/utils/helper'
import DigestSentence from '@/components/DigestSentence'
import { Br, SpaceGrow } from '@/components/Common'
import ArticleImgWindow from '@/components/ArticleImgWindow'
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ArticleCard/styles/footer.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
import styled from 'styled-components'

import { theme, css } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'

export const Wrapper = styled.div`
color: ${theme('thread.articleDigest')};
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ArticleCard/styles/header.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
import styled from 'styled-components'

import { theme, css } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'

export const Wrapper = styled.div``

Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleCard/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
import styled from 'styled-components'

import{css}from '@/utils'
import css from '@/utils/css'

export const Wrapper = styled.div`
${css.flexColumn()};
Expand Down
4 changes: 2 additions & 2 deletionssrc/components/ArticleEditFooter/index.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,9 +7,9 @@
import React from 'react'
import T from 'prop-types'

import { buildLog } from '@/utils'
import { buildLog } from '@/utils/logger'

import{Button}from '@/components/Buttons'
import Button from '@/components/Buttons/Button'
import { Space } from '@/components/Common'

import { Wrapper, RespectText, PublishButtons, Divider } from './styles'
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ArticleEditFooter/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
import styled from 'styled-components'

import { theme, css } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'

export const Wrapper = styled.div`
${css.flexColumn('align-center')};
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleEditToolbar/index.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,7 +9,7 @@ import T from 'prop-types'

import { SITE_URL } from '@/config'
import { THREAD } from '@/constant'
import { buildLog } from '@/utils'
import { buildLog } from '@/utils/logger'

import CopyrightSelector from './CopyrightSelector'

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
import styled from 'styled-components'

import type { TActive } from '@/spec'
import { theme, css } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'
import Img from '@/Img'

export const Wrapper = styled.div`
Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ArticleEditToolbar/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,8 @@ import styled from 'styled-components'
import Input from '@/components/Input'

// import Img from '@/Img'
import { css, theme } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'

export const Wrapper = styled.div`
${css.flex('align-center')};
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleImgWindow/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@

import { FC, memo } from 'react'

import { buildLog } from '@/utils'
import { buildLog } from '@/utils/logger'

import { Wrapper, Block } from './styles'

Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleImgWindow/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -3,7 +3,7 @@ import styled from 'styled-components'
import type { TTestable } from '@/spec'

// import Img from '@/Img'
import{css}from '@/utils'
import css from '@/utils/css'

export const Wrapper = styled.div.attrs(({ testid }: TTestable) => ({
'data-test-id': testid,
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticleItemPrefixLabel/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,7 +6,7 @@

import { FC, memo } from 'react'

import { buildLog } from '@/utils'
import { buildLog } from '@/utils/logger'
import { PinIcon } from './styles'
import ReadLabel from './ReadLabel'

Expand Down
4 changes: 3 additions & 1 deletionsrc/components/ArticleItemPrefixLabel/styles/index.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
import styled from 'styled-components'

import { theme, css, pixelAdd } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'
import PinSVG from '@/SvgIcons/PinSVG'
import { pixelAdd } from '@/utils/dom'

export const ReadedLabel = styled.div<{ topOffset: string }>`
background: ${theme('thread.articleDigest')};
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticlesFilter/DesktopView.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -10,7 +10,7 @@ import dynamic from 'next/dynamic'
import type { TArticleFilter, TResState } from '@/spec'

import { TYPE, THREAD } from '@/constant'
import { buildLog } from '@/utils'
import { buildLog } from '@/utils/logger'
// import { useViewing } from '@/hooks'

import FilterButton from './FilterButton'
Expand Down
2 changes: 1 addition & 1 deletionsrc/components/ArticlesFilter/SelectedFilters.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,7 +2,7 @@ import { FC, memo } from 'react'
import { keys } from 'ramda'

import type { TArticleFilter } from '@/spec'
import { isEmptyValue } from '@/utils'
import { isEmptyValue } from '@/utils/validator'

import Tag from '@/components/Tag'
import { Wrapper, TagWrapper } from './styles/selected_filters'
Expand Down
5 changes: 3 additions & 2 deletionssrc/components/ArticlesFilter/index.tsx
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,15 +6,16 @@

import { Fragment, memo } from 'react'

import{ isMobile }from 'react-device-detect'
import { buildLog } from '@/utils'
importusePlatformfrom '@/hooks/usePlatform'
import { buildLog } from '@/utils/logger'

import DesktopView from './DesktopView'

/* eslint-disable-next-line */
const log = buildLog('c:ArticlesFilter:index')

const ArticlesFilter = (props) => {
const { isMobile } = usePlatform()
return <Fragment>{!isMobile && <DesktopView {...props} />}</Fragment>
}

Expand Down
3 changes: 2 additions & 1 deletionsrc/components/ArticlesFilter/styles/filter_button.ts
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
import styled from 'styled-components'

import Button from '@/components/Buttons/Button'
import { theme, css } from '@/utils'
import { theme } from '@/utils/themes'
import css from '@/utils/css'
import Img from '@/Img'

export const Wrapper = styled.div`
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp