Skip to content

Instantly share code, notes, and snippets.

View tranthaison1231's full-sized avatar
:octocat:
Javascript Dev

Son Tran tranthaison1231

:octocat:
Javascript Dev
View GitHub Profile
function produceChart(csv) {
const strs = csv.split('\n');
const data = {}
strs.forEach(str => {
if (str) {
const [id, name, reportTo] = str.split(',')
data[id] = {
name,
reportTo,

Here’s the full list of our tips and what to check to do a better React Code Review:

  • Are there any new npm packages added?
  • Check if there is no functionality duplicates like date-fns + moment.
  • Also check for imports, as sometimes tree shaking is not working as you wish, and you could bundle the whole library and use just a single method like the below:
import _ from 'lodash';
//should became more precise import like:
import uniq from 'lodash/uniq';

Structure

This style guide is mostly based on the standards that are currently prevalent in Typescript. Let's discuss if you have better idea on how to improve it.

├── docs
│   ├──  style-guide.md
├── __tests__
│   ├── e2e     # forder to e2e test 
│   ├── intergration # forder to integration test 
const path = require('path');
const webpack = require('webpack');
const withLess = require('@zeit/next-less');
const withPlugins = require('next-compose-plugins');
const generateTheme = require('next-dynamic-antd-theme/plugin');
const withCss = require('@zeit/next-css');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const DuplicatePackageCheckerPlugin = require("duplicate-package-checker-webpack-plugin");
const UnusedWebpackPlugin = require('unused-webpack-plugin');
const AntdDayjsWebpackPlugin = require("antd-dayjs-webpack-plugin");
@tranthaison1231
tranthaison1231 / vite.config.ts
Created July 15, 2021 08:48
Config build for vite + antd
import path from 'path';
import fs from 'fs';
import { defineConfig, loadEnv } from 'vite';
import reactRefresh from '@vitejs/plugin-react-refresh';
import vitePluginImp from 'vite-plugin-imp';
import { visualizer } from 'rollup-plugin-visualizer';
import lessToJS from 'less-vars-to-js';
import viteSentry from 'vite-plugin-sentry';
const themeVariables = lessToJS(
# HOW TO GET GOOGLE CLOUD SERVICE
1. Go to link https://console.cloud.google.com/, and Sign In
2. Create new project
3.
# Handling Error
install_oh_my_zsh() {
echo "Setting up zsh..."
}
install_github(){
}
install_homebrew() {
echo "Setting up homebrew..."