Folder icons structure
Mon 25. December 2023 | 2023-12-25đmy-component-library
+âŁâ đlib
+â ââ đmain.ts
⣠đpublic
⣠đsrc
âŚ
đmy-component-library
+âŁâ đlib
+â ââ đmain.ts
⣠đpublic
⣠đsrc
âŚ
import { defineConfig } from "vite";
import * as path from "path";
import { fileURLToPath } from "url";
// https://vitejs.dev/config/
export default defineConfig({
css: {
modules: {
generateScopedName: (name, filename) => {
const f = filename.split("?")[0].split(".")[0];
const file = path.basename(f);
return `${file}_${name}`;
}
}
},
});
.bashrc
webstorm()
{
# /mnt/c/Program\ Files/JetBrains/WebStorm\ 2022.1.2/bin/webstorm64.exe "$1" > /dev/null 2>&1 &!
/mnt/c/Program\ Files/JetBrains/WebStorm\ 2023.2.5/bin/webstorm64.exe .
}
Usage: Run webstorm in terminal
.zshrc
webstorm() {
# open "/Applications/WebStorm.app" .
open -na "WebStorm.app" --args "$@"
}
Usage: Run webstorm . in terminal
https://www.jetbrains.com/help/webstorm/working-with-the-ide-features-from-command-line.html
related
sudo netstat -nlp | grep tcp
Sudo gives more info on process id & stuff
sudo lsof -i:3000
sudo lsof -i:80
sudo lsof -i:443
sudo lsof -i:4173
killall -9 node
sudo killall -9 caddy related: https://useful-snippets.netlify.app/posts/quit-caddy-process/
sudo killall -9 http-server
eg: tcp6 0 0 :::3000 :::* LISTEN 1686/node
__________________________________^^______
killall -9 1686
eg: tcp6 0 0 :::3000 :::* LISTEN 1686/node
________________^^________________________
sudo killall $(lsof -t -i:3000)
Eller med
fuser -k 3000/tcp
Prøv ü kjøre npx prettier filenamepath --writefør du formatterer i webstorm/VSCode
View > Appearance > show status bar
View > show status bar widgets > BRANCH
Ă
PNE MENY NEDE TIL HĂYRE > Velg branch du vil sammenligne med
.eslintrc
"prettier/prettier": 0,
nyttig for webstorm
Top right drop-down menu:
Edit configurations
python interpreter:
place breakpoint (not in the template, click the left border)
--OK--
Debug 'name' (F5) (At least with VS Code keymap)
Eg. Search for "use-query-params" in package.json's git history
git grep use-query-params $(git rev-list --all -- package.json) -- package.json
.bashrc/.zshrc-file# search for word in a file's git history
# usage: filehistorysearch "use-query-params" package.json
filehistorysearch() {
git grep $1 $(git rev-list --all -- $2) -- $2
}
fetch all related products from a list of products, and get results merged into one response!
const GET_RELATED_PRODUCTS = `
query getRelatedProducts($url: [String!]) {
products(filter: { url: { in: $url } }) {
items {
}
}
}
`
fetching just one product's related products
const GET_RELATED_PRODUCTS = `
query getRelatedProducts($url: String!) {
products(filter: { url: { eq: $url } }) {
items {
}
}
}
`
krasjer npm run test-storybook ? FĂĽr du error-meldinger som folk pĂĽ internettet sier betyr at du har gĂĽtt tom for RAM?
Prøv: