View jdl-app.package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dependencies": { | |
"@apollo/client": "3.5.8", | |
"@headlessui/react": "1.4.3", | |
"classnames": "2.3.1", | |
"conditional-wrap": "1.0.2", | |
"date-fns": "2.28.0", | |
"ellipsize": "0.5.1", | |
"icomoon-react": "2.0.19", | |
"lodash": "4.17.21", |
View HTMLToReact.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Works in Next.js 10.x | |
*/ | |
import React from 'react' | |
import parse, { | |
domToReact, | |
attributesToProps, | |
Element, | |
HTMLReactParserOptions, | |
} from 'html-react-parser' |
View README.md
Storybook | Tailwind in Next.js App with Webpack@5
Installation
# install storybook dependencies
yarn add @storybook/addon-actions @storybook/addon-essentials @storybook/react -D
yarn add @storybook/addon-postcss@latest -D
# install webpack5 dependency
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We make use of ARG to set some variables that we | |
# can use in the Dockerfile | |
ARG node_version=14 | |
ARG node_image=node:${node_version}-alpine | |
# STAGE 1: This is the "builder" stage where we build the | |
# application and give this step a name: "builder" | |
FROM $node_image as builder | |
ENV NODE ENV=production |
View Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# We use the latest nodejs@14 image as our base image | |
FROM node:14-alpine | |
# set the default NODE_NEV to production | |
ENV NODE ENV=production | |
# make sure everything happens inside the /app folder | |
WORKDIR/app | |
# now we cache the node_modules layer |
View asdf-set-version.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asdf global <name> <version> [<version>...] | |
asdf shell <name> <version> [<version>...] | |
asdf local <name> <version> [<version>...] | |
# asdf global nodejs 14.15.4 |
View asdf-version.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install version for package | |
asdf install <name> <version> | |
# asdf install nodejs 14.15.4 | |
# list installed versions | |
asdf list <name> | |
# list all versions | |
asdf list all <name> |
View asdf-plugin.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install the package | |
asdf plugin add <name> | |
# asdf plugin add nodejs | |
# asdf plugin add nodejs | |
# get a list of installed plugins | |
asdf plugin list | |
# update plugin(s) | |
asdf plugin update <name> |
View asdf-install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install required dependencies | |
brew install coreutils curl git | |
# install asdf | |
brew install asdf | |
# add it to your shell | |
echo -e "\n. $(brew --prefix asdf)/asdf.sh" >> ~/.bash_profile | |
# set up bash completions |
NewerOlder