Skip to content

Commit

Permalink
feat(look&feel): move to client directory (#736)
Browse files Browse the repository at this point in the history
* feat(look&feel): move to client directory

* feat(look&feel): move to client directory - chromatic

* feat(look&feel): move to client directory - vitest

* feat(look&feel): move to client directory - sonar
  • Loading branch information
samuel-gomez-axa authored Jan 10, 2025
1 parent 293029b commit bdad295
Show file tree
Hide file tree
Showing 349 changed files with 226 additions and 202 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build css packages
run: npm run build -w slash/css && npm run build -w look-and-feel/css
run: npm run build -w slash/css && npm run build -w client/look-and-feel/css
- uses: chromaui/action@latest
name: Run Chromatic for design-system-slash-react
with:
Expand All @@ -40,13 +40,13 @@ jobs:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_LOOKANDFEEL_REACT }}
zip: true
buildScriptName: "build:storybook"
workingDir: "look-and-feel/react"
workingDir: "client/look-and-feel/react"
onlyChanged: true
- uses: chromaui/action@latest
name: Run Chromatic for design-system-lookandfeel-css
with:
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN_LOOKANDFEEL_CSS }}
zip: true
buildScriptName: "build:storybook"
workingDir: "look-and-feel/css"
workingDir: "client/look-and-feel/css"
onlyChanged: true
12 changes: 6 additions & 6 deletions .github/workflows/publish-look-and-feel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ jobs:
- run: npm ci
- run: npm run build:look-and-feel
- run: npm version "${{ steps.gitversion.outputs.fullSemVer }}" -w
look-and-feel/css -w look-and-feel/react
client/look-and-feel/css -w client/look-and-feel/react
- name: Set to react package the @axa-fr/design-system-look-and-feel-css
dependency version
run: |
cd look-and-feel/react
cd client/look-and-feel/react
jq '.peerDependencies["@axa-fr/design-system-look-and-feel-css"] = "${{ steps.gitversion.outputs.fullSemVer }}"' package.json > temp.json && mv temp.json package.json
- run: |
if [ "${{ steps.gitversion.outputs.preReleaseTag }}" = "" ]; then
npm publish -w look-and-feel/css -w look-and-feel/react --access public --tag latest;
npm publish -w client/look-and-feel/css -w client/look-and-feel/react --access public --tag latest;
else
npm publish -w look-and-feel/css -w look-and-feel/react --access public --tag next;
npm publish -w client/look-and-feel/css -w client/look-and-feel/react --access public --tag next;
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: create artifact folder
run: mkdir -p artifact/css & mkdir -p artifact/react
- name: move storybooks to artifact folders
run: cp -R look-and-feel/css/storybook-static/* artifact/css & cp -R
look-and-feel/react/storybook-static/* artifact/react
run: cp -R client/look-and-feel/css/storybook-static/* artifact/css & cp -R
client/look-and-feel/react/storybook-static/* artifact/react
- uses: actions/upload-artifact@v4
with:
name: storybooks
Expand Down
2 changes: 2 additions & 0 deletions client/look-and-feel/css/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("../../../config/eslint.config");
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { addons } from "@storybook/manager-api";
import { LookAndFeelCssTheme } from "./LFCssTheme";

Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions client/look-and-feel/css/.stylelintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("../../../config/stylelint.config.js");
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
],
"scripts": {
"prebuild": "rimraf dist",
"start": "postcss \"src/**/*.scss\" --base src --dir dist --ext css --verbose --watch --config ../../config/postcss.config.js",
"build": "postcss \"src/**/*.scss\" --base src --dir dist --ext css --verbose --env production --config ../../config/postcss.config.js",
"start": "postcss \"src/**/*.scss\" --base src --dir dist --ext css --verbose --watch --env development_client --config ../../../config/postcss.config.js",
"build": "postcss \"src/**/*.scss\" --base src --dir dist --ext css --verbose --env production_client --config ../../../config/postcss.config.js",
"start:storybook": "storybook dev -p 6008",
"build:storybook": "storybook build",
"build-storybook": "storybook build",
Expand Down
2 changes: 2 additions & 0 deletions client/look-and-feel/css/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("../../../config/prettier.config");
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Meta, StoryObj } from "@storybook/html";
import "../../Button/Button.scss";
// eslint-disable-next-line import/no-relative-packages
import logo from "../../../../../common/assets/logo-axa.svg";
import logo from "../../../../../../common/assets/logo-axa.svg";
import { getButton, getNavBar, getPreviousLink, render } from "./render";
import "./Header.scss";
import "./NavBar/NavBar.scss";
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions client/look-and-feel/react/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("../../../config/eslint.config");
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable import/no-default-export */
import type { StorybookConfig } from "@storybook/react-vite";

import { join, dirname } from "path";
Expand All @@ -6,6 +7,7 @@ import { join, dirname } from "path";
* This function is used to resolve the absolute path of a package.
* It is needed in projects that use Yarn PnP or are set up within a monorepo.
*/
// eslint-disable-next-line @typescript-eslint/no-explicit-any
function getAbsolutePath(value: string): any {
return dirname(require.resolve(join(value, "package.json")));
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
2 changes: 2 additions & 0 deletions client/look-and-feel/react/prettier.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// eslint-disable-next-line @typescript-eslint/no-require-imports
module.exports = require("../../../config/prettier.config");
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit bdad295

Please sign in to comment.