Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gitalk to npm #753

Merged
merged 22 commits into from
Jan 6, 2022
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ jobs:
with:
node-version: 14.x
cache: npm
- name: upgrade gitalk
run: npm upgrade gitalk
- name: npm install
env:
GATSBY_GITHUB_CLIENT_SECRET: ${{secrets.GATSBY_GITHUB_CLIENT_SECRET}}
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/previewDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v2
Expand All @@ -16,11 +15,12 @@ jobs:
with:
node-version: 14.x
cache: npm
registry-url: https://npm.pkg.github.com/
scope: '@tubone24'
- name: npm install
run: |
npm install
npx cypress install
npm rebuild node-sass
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: npm install
- name: Test E2E
env:
GATSBY_GITHUB_CLIENT_SECRET: ${{secrets.GATSBY_GITHUB_CLIENT_SECRET}}
Expand Down Expand Up @@ -49,6 +49,8 @@ jobs:
with:
node-version: 14.x
cache: npm
registry-url: https://npm.pkg.github.com/
scope: '@tubone24'
- name: "depcheck"
uses: tubone24/[email protected]
with:
Expand All @@ -65,6 +67,7 @@ jobs:
GATSBY_GITHUB_SHA: ${{ github.sha }}
FAUNADB_SERVER_SECRET: ${{secrets.FAUNADB_SERVER_SECRET}}
NETLIFY_ENV: deploy-preview
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: npm install
- name: npm build
env:
Expand All @@ -87,7 +90,7 @@ jobs:
run: |
cat cli.txt
sed -i -z 's/\n/\\n/g' cli.txt
sed -i -z 's/\t/\ /g' cli.txt
sed -i -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})*)?m//g" cli.txt
cat cli.txt
- name: Post Netlify CLI Comment
env:
Expand Down
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
registry=https://registry.npmjs.org
registry=https://npm.pkg.github.com/tubone24
158 changes: 89 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"gatsby-remark-table-of-contents": "1.0.0",
"gatsby-source-filesystem": "4.3.0",
"gatsby-transformer-remark": "5.3.0",
"gitalk": "git+https://github.com/tubone24/gitalk.git",
"@tubone24/gitalk": "1.7.4",
"highlight.js": "11.3.1",
"html-minifier": "4.0.0",
"intersection-observer": "0.12.0",
Expand Down
4 changes: 2 additions & 2 deletions src/components/Gitalk/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {Component} from 'react'
import 'gitalk/dist/gitalk.css';
import '@tubone24/gitalk/dist/gitalk.css';
const isBrowser = typeof window !== 'undefined';
const Gitalk = isBrowser ? require('gitalk') : undefined;
const Gitalk = isBrowser ? require('@tubone24/gitalk') : undefined;

class GitalkFC extends Component {
constructor(props) {
Expand Down