-
Notifications
You must be signed in to change notification settings - Fork 1
refactor(tokens): migrate dark mode to light-dark() hybrid architecture #19
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
Changes from all commits
1ef30e6
14e620a
0828d8a
833e000
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| #!/bin/sh | ||
| npx --no -- commitlint --edit "$1" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,13 @@ | ||
| #!/bin/sh | ||
| set -e | ||
|
|
||
| # Lint staged CSS files | ||
| STAGED_CSS=$(git diff --cached --name-only --diff-filter=ACM | grep '\.css$' || true) | ||
| if [ -n "$STAGED_CSS" ]; then | ||
| echo "$STAGED_CSS" | tr '\n' '\0' | xargs -0 npx stylelint | ||
| fi | ||
|
|
||
| # Rebuild dist bundle and stage it | ||
| node scripts/bundle.js | ||
| output=$(node -e "process.stdout.write(require('./bundle.config.json').output)") | ||
| git add "$output" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
|
|
||
| jobs: | ||
| lint: | ||
| name: Lint CSS | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| - run: npm ci | ||
| - run: npm run lint:css | ||
|
|
||
| build: | ||
| name: Build bundle | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| - run: npm ci | ||
| - run: npm run build | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: dist | ||
| path: dist/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Publish GitHub Release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: 22 | ||
| cache: npm | ||
| - run: npm ci | ||
| - run: npm run build | ||
| - name: Extract changelog for this version | ||
| id: changelog | ||
| run: | | ||
| VERSION="${GITHUB_REF_NAME#v}" | ||
| NOTES=$(awk -v target="$VERSION" ' | ||
| $1 == "##" { | ||
| heading = $2 | ||
| gsub(/^\[/, "", heading) | ||
| gsub(/\]$/, "", heading) | ||
| if (found) exit | ||
| if (heading == target) { found = 1; next } | ||
| } | ||
| found { print } | ||
| ' CHANGELOG.md) | ||
| if [ -z "$NOTES" ]; then | ||
| echo "Warning: no CHANGELOG section found for v$VERSION" >&2 | ||
| fi | ||
| echo "notes<<EOF" >> "$GITHUB_OUTPUT" | ||
| echo "$NOTES" >> "$GITHUB_OUTPUT" | ||
| echo "EOF" >> "$GITHUB_OUTPUT" | ||
| - uses: softprops/action-gh-release@v2 | ||
| with: | ||
|
Comment on lines
+15
to
+45
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Verify workflow action refs are immutable SHAs.
# Expected after fix: no output.
rg -nP '^\s*-\s*uses:\s*[^@\s]+@(?![0-9a-f]{40}\b)[^\s]+' .github/workflows/*.ymlRepository: codeslash-dev/SLASHED Length of output: 600 Pin workflow actions to immutable commit SHAs. Three actions in this file use mutable major version tags (
🤖 Prompt for AI Agents |
||
| body: ${{ steps.changelog.outputs.notes }} | ||
| files: dist/slashed.essential.css | ||
| fail_on_unmatched_files: true | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/release-it/schema/release-it.json", | ||
| "increment": "patch", | ||
| "git": { | ||
| "commitMessage": "chore(release): v${version}", | ||
| "tagName": "v${version}", | ||
| "tagAnnotation": "Release v${version}", | ||
| "push": true | ||
| }, | ||
| "github": { | ||
| "release": false | ||
| }, | ||
| "npm": { | ||
| "publish": false | ||
| }, | ||
| "hooks": { | ||
| "before:init": ["npm run lint:css"], | ||
| "after:bump": "npm run build" | ||
| }, | ||
| "plugins": { | ||
| "@release-it/conventional-changelog": { | ||
| "preset": { "name": "angular" }, | ||
| "infile": "CHANGELOG.md", | ||
| "header": "# Changelog\n", | ||
| "ignoreRecommendedBump": true | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| { | ||
| "extends": ["stylelint-config-standard"], | ||
| "ignoreFiles": ["dist/**", "node_modules/**"], | ||
| "rules": { | ||
| "color-function-notation": "modern", | ||
| "alpha-value-notation": "number", | ||
|
|
||
| "custom-property-pattern": ["^sf-", { | ||
| "message": "Custom properties must start with --sf-" | ||
| }], | ||
| "keyframes-name-pattern": ["^sf-", { | ||
| "message": "Keyframe names must start with sf-" | ||
| }], | ||
| "selector-class-pattern": null, | ||
| "selector-id-pattern": null, | ||
|
|
||
| "function-no-unknown": [true, { | ||
| "ignoreFunctions": ["sign", "light-dark"] | ||
| }], | ||
|
|
||
| "lightness-notation": null, | ||
| "hue-degree-notation": null, | ||
|
|
||
| "number-max-precision": null, | ||
|
|
||
| "declaration-block-single-line-max-declarations": null, | ||
|
|
||
| "no-duplicate-selectors": null, | ||
| "no-descending-specificity": null, | ||
|
|
||
| "custom-property-empty-line-before": null, | ||
| "comment-empty-line-before": null, | ||
| "rule-empty-line-before": null, | ||
| "at-rule-empty-line-before": null, | ||
| "declaration-empty-line-before": null, | ||
|
|
||
| "import-notation": null, | ||
| "declaration-block-no-redundant-longhand-properties": null | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Changelog |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export default { extends: ['@commitlint/config-conventional'] }; |
Uh oh!
There was an error while loading. Please reload this page.