Skip to content

Commit

Permalink
Merge pull request #28 from AlfieJones/pixeleye
Browse files Browse the repository at this point in the history
Pixeleye
  • Loading branch information
AlfieJones authored Feb 29, 2024
2 parents 38abfea + c734e88 commit 318ee0f
Show file tree
Hide file tree
Showing 11 changed files with 10,159 additions and 7,976 deletions.
32 changes: 0 additions & 32 deletions .github/workflows/chromatic-core.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/chromatic-react.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/pixeleye.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: "Pixeleye core"

on:
push:

jobs:
pixeleye-core-deployment:
runs-on: ubuntu-latest
env:
PIXELEYE_PROJECT_TOKEN: ${{ secrets.PIXELEYE_PROJECT_TOKEN }}
PIXELEYE_LOG_LEVEL: debug
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Build toggles
run: pnpm build
working-directory: packages/core
- name: Capture stories with Pixeleye CLI
run: npx lerna run storybook --scope=@theme-toggles/core & pnpm -F @theme-toggles/core pixeleye storybook

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
"url": "https://github.com/sponsors/alfiejones"
},
"scripts": {
"chromatic": "chromatic --project-token=CHROMATIC_PROJECT_TOKEN",
"build": "lerna run build-core && pnpm lerna run build-frameworks",
"build-site": "pnpm build && pnpm -F @theme-toggles/website build",
"dev-site": "pnpm build && pnpm -F @theme-toggles/website dev"
Expand All @@ -21,5 +20,6 @@
"devDependencies": {
"lerna": "^6.4.1",
"next": "^13.1.2"
}
}
},
"dependencies": {}
}
14 changes: 11 additions & 3 deletions packages/core/.storybook/main.cjs
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
module.exports = {
stories: ["../src/**/*.stories.mdx", "../src/**/*.stories.@(js|jsx|ts|tsx)"],
staticDirs: ["../assets/svgs"],

addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/addon-mdx-gfm"
],
framework: "@storybook/html",
core: {
builder: "@storybook/builder-vite",

framework: {
name: "@storybook/html-vite",
options: {}
},

features: {
storyStoreV7: true,
},

docs: {
autodocs: true
}
};
24 changes: 14 additions & 10 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"version": "5.0.0-rc.1",
"type": "module",
"scripts": {
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"plop": "plop",
"pixeleye": "pixeleye storybook http://localhost:6006",
"build": "gulp",
"build-core": "gulp",
"dev": "gulp dev"
Expand All @@ -17,12 +18,14 @@
],
"devDependencies": {
"@babel/core": "^7.20.12",
"@storybook/addon-actions": "^6.5.15",
"@storybook/addon-essentials": "^6.5.15",
"@storybook/addon-interactions": "^6.5.15",
"@storybook/addon-links": "^6.5.15",
"@storybook/builder-vite": "^0.2.6",
"@storybook/html": "^6.5.15",
"@storybook/addon-actions": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-interactions": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/addon-mdx-gfm": "7.6.17",
"@storybook/blocks": "^7.6.17",
"@storybook/html": "^7.6.17",
"@storybook/html-vite": "7.6.17",
"@storybook/testing-library": "^0.0.13",
"@types/node": "^18.11.18",
"babel-loader": "^8.3.0",
Expand All @@ -35,14 +38,15 @@
"gulp-sass": "^5.1.0",
"handlebars": "^4.7.7",
"handlebars-helpers": "^0.10.0",
"pixeleye": "0.4.6",
"plop": "^3.1.1",
"prettier": "2.8.1",
"sass": "^1.57.1",
"storybook": "7.6.17",
"typescript": "^4.9.3",
"vite": "^4.0.0"
},
"dependencies": {},
"overrides": {
"clean-css": "5.3.1"
}
}
}
7 changes: 7 additions & 0 deletions packages/core/pixeleye.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { Config } from "pixeleye";

const config: Config = {
token: process.env.PIXELEYE_PROJECT_TOKEN!,
};

export default config;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Meta } from "@storybook/addon-docs";
import { Meta } from '@storybook/blocks';
import StoryPreview from "./assets/dark-side-story.png";

<Meta title="Intro" />
Expand Down
5 changes: 3 additions & 2 deletions packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"skipLibCheck": true
"skipLibCheck": true,
"allowJs": true
},
"include": ["src", "vite-env.d.ts"]
"include": ["src", "vite-env.d.ts", "pixeleye.config.ts"]
}
1 change: 0 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"@theme-toggles/core": "5.0.0-rc.1",
"@types/react": "^18.0.26",
"babel-loader": "^8.3.0",
"babel-plugin-transform-svg-component": "^8.0.11",
"esbuild": "^0.17.0",
"gulp": "^4.0.2",
"lodash-es": "^4.17.21",
Expand Down
Loading

0 comments on commit 318ee0f

Please sign in to comment.