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
const gulp = require('gulp') | |
const browserSync = require('browser-sync').create() | |
gulp.task('browser-sync', () => { | |
browserSync.init({ | |
server: { | |
baseDir: "./" | |
} | |
}) | |
}) |
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
const gulp = require('gulp') | |
const browserSync = require('browser-sync').create() | |
gulp.task('browser-sync', ['sass'], () => { | |
browserSync.init({ | |
server: { | |
baseDir: "./" | |
} | |
}) | |
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
const gulp = require('gulp') | |
const sass = require('gulp-sass') | |
gulp.task('sass', () => { | |
return ( | |
gulp.src('src/styles/*.scss') | |
.pipe(sass()) | |
.pipe(gulp.dest('./dist/')) | |
) | |
}) |
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
module.exports = { | |
entry: './src/index.js', | |
output: { | |
filename: 'bundle.js', | |
path: require('path').resolve(__dirname, 'dist') | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.scss$/, |
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
import React, { Component } from 'react' | |
import PropTypes from 'prop-types' | |
import Waypoint from 'react-waypoint' | |
class ClassPoint extends Component { | |
constructor(props) { | |
super(props) | |
this.state = { active: false } | |
this.onEnter = this.onEnter.bind(this) | |
this.onLeave = this.onLeave.bind(this) |
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
export type TConfigMode = 'development' | 'production' |
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
import * as dotenv from 'dotenv' | |
import * as fs from 'fs' | |
export class ConfigService { | |
private readonly envConfig: { [key: string]: string } | |
constructor(mode: 'development' | 'production') { | |
this.envConfig = dotenv.parse(fs.readFileSync(`${mode}.env`)) | |
} |
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
import { AnimatePresence, motion } from "framer-motion"; | |
import { PropsWithChildren } from "react"; | |
import useResizeObserver from "use-resize-observer"; | |
const ignoreCircularReferences = () => { | |
const seen = new WeakSet(); | |
return (key: string, value: Record<string, unknown>) => { | |
if (key.startsWith("_")) return; | |
if (typeof value === "object" && value !== null) { | |
if (seen.has(value)) return; |
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
import fs from 'fs'; | |
import path from 'path'; | |
import { defineConfig } from 'tsup'; | |
// INFO: This is the only place you need to update when adding new entry folders | |
const entryFolders = ['primitives', 'ui']; | |
function getAllFilesInDirectory(dirPath: string): string[] { | |
return fs.readdirSync(dirPath).reduce<string[]>((allFiles, file) => { |
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
import path from 'path'; | |
import { fileURLToPath } from 'url'; | |
import comments from '@eslint-community/eslint-plugin-eslint-comments/configs'; | |
import { FlatCompat } from '@eslint/eslintrc'; | |
import js from '@eslint/js'; | |
import nextPlugin from '@next/eslint-plugin-next'; | |
import eslintConfigPrettier from 'eslint-config-prettier'; | |
import hooksPlugin from 'eslint-plugin-react-hooks'; | |
import reactRecommended from 'eslint-plugin-react/configs/recommended.js'; |
OlderNewer