forked from okonet/react-scroll-sync
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from bigbinary/scroll-sync-fix-for-multi-groups
Fixed scroll sync for multiple groups
- Loading branch information
Showing
9 changed files
with
11,906 additions
and
15,945 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 |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
"presets": ["es2015", "react", "stage-1"], | ||
"plugins": ["add-module-exports"] | ||
"presets": ["@babel/preset-env", "@babel/preset-react"] | ||
} |
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,101 @@ | ||
name: "Create and publish releases" | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [closed] | ||
jobs: | ||
release: | ||
name: "Create Release" | ||
runs-on: ubuntu-latest | ||
if: >- | ||
${{ github.event.pull_request.merged == true && ( | ||
contains(github.event.pull_request.labels.*.name, 'patch') || | ||
contains(github.event.pull_request.labels.*.name, 'minor') || | ||
contains(github.event.pull_request.labels.*.name, 'major') ) }} | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
with: | ||
token: ${{secrets.GITHUB_TOKEN}} | ||
persist-credentials: true | ||
|
||
- name: Setup git user | ||
run: | | ||
git config user.name "Amal dinesh" | ||
git config user.email "amalkdinesh@gmail.com" | ||
- name: Setup NodeJS LTS version | ||
uses: actions/setup-node@8c91899e586c5b171469028077307d293428b516 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: Setup the project | ||
run: yarn install | ||
|
||
- name: Generate production build | ||
run: yarn bundle | ||
|
||
- name: Prefix version tag with "v" | ||
run: yarn config set version-tag-prefix "v" | ||
|
||
- name: Disable Git commit hooks | ||
run: git config core.hooksPath /dev/null | ||
|
||
- name: Bump the patch version and create git tag on release | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'patch') }} | ||
run: yarn version --patch --no-git-tag-version | ||
|
||
- name: Bump the minor version and create git tag on release | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'minor') }} | ||
run: yarn version --minor --no-git-tag-version | ||
|
||
- name: Bump the major version and create git tag on release | ||
if: ${{ contains(github.event.pull_request.labels.*.name, 'major') }} | ||
run: yarn version --major --no-git-tag-version | ||
|
||
- name: Get the package version from package.json | ||
uses: tyankatsu0105/read-package-version-actions@5aad2bb630a577ee4255546eb3ee0593df68f6ca | ||
id: package-version | ||
|
||
- name: Read pull request body | ||
uses: 8BitJonny/gh-get-current-pr@2.0.0 | ||
id: PR | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
sha: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Extract changelog | ||
id: CHANGELOG | ||
run: | | ||
content=$(echo '${{ steps.PR.outputs.pr_body }}' | python3 -c 'import json; import sys; print(json.dumps(sys.stdin.read().partition("**Description**")[2].partition("**Checklist**")[0].strip()))') | ||
echo "CHANGELOG=${content}" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Update Changelog | ||
continue-on-error: true | ||
uses: stefanzweifel/changelog-updater-action@v1 | ||
with: | ||
latest-version: ${{ steps.package-version.outputs.version }} | ||
release-notes: ${{ fromJson(env.CHANGELOG) }} | ||
|
||
- name: Commit and Push changes | ||
uses: EndBug/add-and-commit@v7 | ||
with: | ||
branch: main | ||
message: "New version release" | ||
|
||
- name: Create a release draft on release | ||
uses: release-drafter/release-drafter@ac463ffd9cc4c6ad5682af93dc3e3591c4657ee3 | ||
if: ${{contains(github.event.pull_request.labels.*.name, 'release')}} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag: v${{ steps.package-version.outputs.version }} | ||
publish: true | ||
|
||
- name: Publish the package on NPM | ||
uses: JS-DevTools/npm-publish@22595ff8c4d0d9f53cef0656fbb90fbe06ee885c | ||
with: | ||
access: "public" | ||
token: ${{ secrets.NPM_TOKEN }} |
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,30 @@ | ||
name: Publish to npm | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup NodeJS LTS version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: "18.12.0" | ||
|
||
- name: Setup the project | ||
run: yarn install | ||
|
||
- name: Generate production build | ||
run: yarn bundle | ||
|
||
- name: Publish the package on NPM | ||
uses: JS-DevTools/npm-publish@v1 | ||
with: | ||
access: "public" | ||
token: ${{ secrets.NPM_TOKEN }} | ||
tag: ${{ github.event.release.prerelease && 'beta' || 'latest' }} |
This file was deleted.
Oops, something went wrong.
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,32 @@ | ||
const reactPlugin = require("eslint-plugin-react"); | ||
const babelParser = require("@babel/eslint-parser"); | ||
|
||
module.exports = [ | ||
{ | ||
files: ["src/**/*.{js,jsx}"], // Targets .js and .jsx files within the src folder | ||
ignores: ["node_modules/**"], // Ignores node_modules | ||
languageOptions: { | ||
parser: babelParser, // Use babel-eslint parser directly here | ||
parserOptions: { | ||
ecmaVersion: "latest", // Use latest ECMAScript features | ||
sourceType: "module", // Use ES modules | ||
ecmaFeatures: { | ||
jsx: true, // Enable JSX parsing | ||
}, | ||
}, | ||
}, | ||
plugins: { | ||
react: reactPlugin, | ||
}, | ||
rules: { | ||
"no-unused-vars": "warn", | ||
"no-console": "warn", | ||
"react/prop-types": "off", | ||
}, | ||
settings: { | ||
react: { | ||
version: "detect", // Auto-detects React version | ||
}, | ||
}, | ||
}, | ||
]; |
Oops, something went wrong.