This file contains hidden or 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
| const docgen = require('react-docgen-typescript'); | |
| const fs = require('fs'); | |
| const path = require('path'); | |
| const DOCGEN_OPTIONS = { | |
| savePropValueAsString: true, | |
| }; | |
| const IGNORE_PATHS = [ | |
| 'docs', |
This file contains hidden or 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
| export default async function(req: NextApiRequest, res: NextApiResponse) { | |
| const { | |
| query | |
| } = req | |
| const { db } = await connect() | |
| // Finds all posts where the `metadata` property is an object | |
| // and contains properties like `category`. | |
| const posts: Posts[] = await db |
This file contains hidden or 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
| "scripts": { | |
| "build": "concurrently yarn:build:*", | |
| "build:esm": "cross-env BABEL_ENV=esm babel src --root-mode upward --extensions .ts,.tsx -d dist/esm --source-maps", | |
| "build:cjs": "cross-env BABEL_ENV=cjs babel src --root-mode upward --extensions .ts,.tsx -d dist/cjs --source-maps", | |
| "build:types": "tsc --emitDeclarationOnly --declaration --declarationDir dist/types", | |
| "dev": "tsc --watch" | |
| }, |
This file contains hidden or 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
| const fs = require('fs'); | |
| const { rm } = require('./utils/file-actions'); | |
| const cwd = process.cwd(); | |
| const rm = (path) => { | |
| if (fs.existsSync(path)){ | |
| exec(`rm -r ${ path }`, (err) => { | |
| if (err) { | |
| console.log(err); |
This file contains hidden or 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
| tsc -p tsconfig.json && tsc -p tsconfig-cjs.json |
This file contains hidden or 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
| FROM nginx:alpine | |
| COPY ./public /usr/share/nginx/html |
This file contains hidden or 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
| sudo chown -R $(whoami) /usr/local/lib/node_modules/ |
This file contains hidden or 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
| # Mac only version | |
| find . -name 'node_modules' -type d -prune -exec rm -rf '{}' + | |
| # Platform agnostic | |
| npx rimraf ./**/node_modules |
This file contains hidden or 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
| version: "3" | |
| services: | |
| mongodb: | |
| image: mongo:latest | |
| environment: | |
| - MONGODB_DATABASE="test" | |
| ports: | |
| - 27017:27017 |
This file contains hidden or 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
| const dateString = new Date().toISOString().split('T')[0] |