forked from webpack/webpack.js.org
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
28 changed files
with
3,552 additions
and
4,151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Cancel | ||
on: | ||
workflow_run: | ||
workflows: ["Ensure PR"] | ||
types: | ||
- requested | ||
jobs: | ||
cancel: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: styfle/[email protected] | ||
with: | ||
workflow_id: ${{ github.event.workflow.id }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# name: 'Dependency Review' | ||
# on: [pull_request] | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
# permissions: | ||
# contents: read | ||
permissions: | ||
contents: read | ||
|
||
# jobs: | ||
# dependency-review: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: 'Checkout Repository' | ||
# uses: actions/checkout@v4 | ||
# - name: 'Dependency Review' | ||
# uses: actions/dependency-review-action@v3 | ||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v3 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Deploy | |
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
schedule: | ||
- cron: '0 0 * * *' | ||
jobs: | ||
|
@@ -12,10 +12,10 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [latest] | ||
node-version: [16.x] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
|
@@ -41,7 +41,7 @@ jobs: | |
- run: yarn lint:links | ||
|
||
- name: Deploy | ||
uses: JamesIves/[email protected].3 | ||
uses: JamesIves/[email protected].0 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
folder: dist | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,7 +75,6 @@ pre[class*='lang-'] { | |
|
||
.token.deleted { | ||
color: #f79494; | ||
user-select: none; | ||
} | ||
|
||
.token.operator, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import PropTypes from 'prop-types'; | ||
import ChevronRightIcon from '../../styles/icons/chevron-right.svg'; | ||
import './NotifyBox.scss'; | ||
import { animated, useSpring } from 'react-spring'; | ||
import { useLocalStorage } from 'react-use'; | ||
NotifyBox.propTypes = { | ||
skip: PropTypes.func.isRequired, | ||
loading: PropTypes.bool, | ||
}; | ||
const AnimatedChevron = animated(ChevronRightIcon); | ||
export default function NotifyBox(props = { loading: false }) { | ||
const [collapse, setCollapse] = useLocalStorage('app-update-button', false); | ||
const toggle = () => setCollapse(!collapse); | ||
const rotateStyles = useSpring({ | ||
transform: collapse ? 'rotate(180deg)' : 'rotate(0deg)', | ||
}); | ||
const fadeStyles = useSpring({ | ||
display: collapse ? 'none' : 'inline-flex', | ||
opacity: collapse ? 0 : 1, | ||
}); | ||
return ( | ||
<div className="notifyBox__container"> | ||
<span | ||
role="button" | ||
style={{ | ||
display: 'inline-flex', | ||
height: 44, | ||
width: 44, | ||
cursor: 'pointer', | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}} | ||
onClick={toggle} | ||
> | ||
<AnimatedChevron fill="#333" width={20} style={rotateStyles} /> | ||
</span> | ||
<animated.div | ||
style={{ | ||
...fadeStyles, | ||
alignItems: 'center', | ||
paddingRight: 20, | ||
}} | ||
> | ||
<span>检测到文档有更新</span> | ||
<button | ||
title="click to update" | ||
onClick={props.skip} | ||
disabled={props.loading} | ||
style={{ | ||
width: 100, | ||
textAlign: 'center', | ||
paddingTop: 5, | ||
paddingBottom: 5, | ||
fontSize: 14, | ||
lineHeight: 1, | ||
}} | ||
> | ||
{props.loading ? '更新中' : '更新'} | ||
</button> | ||
</animated.div> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.