mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 20:39:09 -05:00
🔧 Improved storybook configuration
This commit is contained in:
parent
83fe2f35b4
commit
33e8c8b3c9
6 changed files with 29 additions and 15 deletions
|
@ -28,8 +28,13 @@ tmux select-window -t penpot:1
|
|||
tmux send-keys -t penpot 'cd penpot/frontend' enter C-l
|
||||
tmux send-keys -t penpot 'yarn run watch:app' enter
|
||||
|
||||
tmux new-window -t penpot:2 -n 'exporter'
|
||||
tmux new-window -t penpot:2 -n 'frontend storybook'
|
||||
tmux select-window -t penpot:2
|
||||
tmux send-keys -t penpot 'cd penpot/frontend' enter C-l
|
||||
tmux send-keys -t penpot 'yarn run watch:storybook' enter
|
||||
|
||||
tmux new-window -t penpot:3 -n 'exporter'
|
||||
tmux select-window -t penpot:3
|
||||
tmux send-keys -t penpot 'cd penpot/exporter' enter C-l
|
||||
tmux send-keys -t penpot 'rm -f target/app.js*' enter C-l
|
||||
tmux send-keys -t penpot 'clojure -M:dev:shadow-cljs watch main' enter
|
||||
|
@ -38,8 +43,8 @@ tmux split-window -v
|
|||
tmux send-keys -t penpot 'cd penpot/exporter' enter C-l
|
||||
tmux send-keys -t penpot './scripts/wait-and-start.sh' enter
|
||||
|
||||
tmux new-window -t penpot:3 -n 'backend'
|
||||
tmux select-window -t penpot:3
|
||||
tmux new-window -t penpot:4 -n 'backend'
|
||||
tmux select-window -t penpot:4
|
||||
tmux send-keys -t penpot 'cd penpot/backend' enter C-l
|
||||
tmux send-keys -t penpot './scripts/start-dev' enter
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { withThemeByClassName } from "@storybook/addon-themes";
|
||||
|
||||
import '../resources/public/css/ds.css';
|
||||
|
||||
export const decorators = [
|
||||
withThemeByClassName({
|
||||
themes: {
|
||||
|
|
|
@ -41,11 +41,11 @@
|
|||
"translations": "node ./scripts/translations.js",
|
||||
"watch:app:assets": "node ./scripts/watch.js",
|
||||
"watch:app:libs": "node ./scripts/build-libs.js --watch",
|
||||
"watch:app:main": "clojure -M:dev:shadow-cljs watch main worker",
|
||||
"watch:app:main": "clojure -M:dev:shadow-cljs watch main worker storybook",
|
||||
"clear:shadow-cache": "rm -rf .shadow-cljs",
|
||||
"watch:app": "yarn run clear:shadow-cache && concurrently \"yarn run watch:app:main\" \"yarn run watch:app:libs\"",
|
||||
"watch": "yarn run watch:app:assets",
|
||||
"watch:storybook": "concurrently \"clojure -M:dev:shadow-cljs watch storybook\" \"storybook dev -p 6006 --no-open\" \"yarn run watch:storybook:assets\"",
|
||||
"watch:storybook": "concurrently \"storybook dev -p 6006 --no-open\" \"yarn run watch:storybook:assets\"",
|
||||
"watch:storybook:assets": "node ./scripts/watch-storybook.js"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
@ -23,6 +23,8 @@ async function compileSassAll() {
|
|||
async function compileSass(path) {
|
||||
const start = process.hrtime();
|
||||
log.info("changed:", path);
|
||||
|
||||
try {
|
||||
const result = await h.compileSass(worker, path, { modules: true });
|
||||
sass.index[result.outputPath] = result.css;
|
||||
|
||||
|
@ -31,6 +33,11 @@ async function compileSass(path) {
|
|||
|
||||
const end = process.hrtime(start);
|
||||
log.info("done:", `(${ppt(end)})`);
|
||||
} catch (cause) {
|
||||
console.error(cause);
|
||||
const end = process.hrtime(start);
|
||||
log.error("error:", `(${ppt(end)})`);
|
||||
}
|
||||
}
|
||||
|
||||
await fs.mkdir("./resources/public/css/", { recursive: true });
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import proc from "node:child_process";
|
||||
import fs from "node:fs/promises";
|
||||
import ph from "node:path";
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
{:deps {:aliases [:dev]}
|
||||
:http {:port 3448}
|
||||
:nrepl {:port 3447 :host "0.0.0.0"}
|
||||
:dev-http {8888 "classpath:public"}
|
||||
:http {:port #shadow/env ["HTTP_PORT" :as :int :default 3448]}
|
||||
:nrepl {:port #shadow/env ["NREPL_PORT" :as :int :default 3447] :host "0.0.0.0"}
|
||||
:dev-http {#shadow/env ["DEV_PORT" :as :int :default 8888] "classpath:public"}
|
||||
:cache-dir #shadow/env ["CACHE" :default ".shadow-cljs"]
|
||||
|
||||
:builds
|
||||
{:main
|
||||
|
|
Loading…
Add table
Reference in a new issue