Skip to content

Commit

Permalink
Replaced Yarn with pnpm.
Browse files Browse the repository at this point in the history
Added PostHog.
  • Loading branch information
Bilge committed Jan 30, 2025
1 parent f84bbf3 commit 66b1750
Show file tree
Hide file tree
Showing 6 changed files with 13,385 additions and 10,967 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ jobs:
ref: gh-pages
path: gh-pages

- uses: pnpm/action-setup@v4

- name: Build production assets
run: yarn && yarn build
run: pnpm install && pnpm build

- name: Copy production assets
run: rm -rfv gh-pages/* && cp -val site/* gh-pages
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/Storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
path: sb
token: ${{ secrets.GH_BILGE_TOKEN }}

- uses: pnpm/action-setup@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -33,7 +35,7 @@ jobs:
run: composer install --no-interaction --no-progress

- name: Build Storybook
run: yarn && yarn build-storybook
run: pnpm install && pnpm build-storybook

- name: Link Storybook
run: rm -rfv sb/* && cp -val storybook-static/* sb
Expand Down
13 changes: 13 additions & 0 deletions assets/js/250.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {parseParam} from './Query';
import User from './User';
import Checkbox from './Checkbox';
import chroma from 'chroma-js';
import posthog from 'posthog-js';

type S250_static = typeof S250;

Expand Down Expand Up @@ -33,6 +34,9 @@ class S250 {
// Search stuff.
this.initSearchValue();

// Tracking stuff.
this.initTracker();

// Fancy stuff.
this.initAppLinkMenu();
this.initRankingHoverItems();
Expand Down Expand Up @@ -250,6 +254,15 @@ class S250 {
}
}

initTracker() {
posthog.init('phc_Rjmhrs656s6Say2ICy0A5xFi0HHGD38KTXxh1XI4ntD',
{
api_host: '//ph.steam250.com',
person_profiles: 'always',
},
);
}

initAppLinkMenu() {
const menu = document.getElementById('linkmenu')!,
ACTIVE = 'show';
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@storybook/html": "^6.5.15",
"@tsconfig/recommended": "^1.0.1",
"@types/chroma-js": "^2.4.4",
"@types/node": "^22.12.0",
"@whitespace/storybook-addon-html": "5.0.0",
"autoprefixer": "^10.2.5",
"babel-loader": "^8.2.2",
Expand Down Expand Up @@ -39,6 +40,7 @@
"dependencies": {
"chroma-js": "^2.4.2",
"dayjs": "^1.10.4",
"posthog-js": "^1.212.1",
"vanilla-lazyload": "^17.3.1"
}
}
Loading

0 comments on commit 66b1750

Please sign in to comment.