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
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 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
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 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 type TConfigMode = 'development' | 'production' |
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
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 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
module.exports = { | |
entry: './src/index.js', | |
output: { | |
filename: 'bundle.js', | |
path: require('path').resolve(__dirname, 'dist') | |
}, | |
module: { | |
rules: [ | |
{ | |
test: /\.scss$/, |
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 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 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 gulp = require('gulp') | |
const browserSync = require('browser-sync').create() | |
gulp.task('browser-sync', ['sass'], () => { | |
browserSync.init({ | |
server: { | |
baseDir: "./" | |
} | |
}) | |
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 gulp = require('gulp') | |
const browserSync = require('browser-sync').create() | |
gulp.task('browser-sync', () => { | |
browserSync.init({ | |
server: { | |
baseDir: "./" | |
} | |
}) | |
}) |
NewerOlder