Skip to content

Instantly share code, notes, and snippets.

View sadeghbarati's full-sized avatar
🍉

Sadegh Barati sadeghbarati

🍉
  • Iran, Mashhad
  • 10:57 (UTC +03:30)
View GitHub Profile

Volar 2.0 "Link"

I am Johnson, the author of Volar (now known as Vue Language Tools), and we released version 2.0 in March this year. This article will introduce you to the improvements and development experiences brought by 2.0.

Why 2.0?

In Vetur and Volar v1, we implemented Vue's IDE support through the Language Server Protocol (LSP), which works well for most small to medium-sized Vue projects, but there may be problems for very large projects.

TS Server and Vue Language Server are using double the memory

import ReactSelect from 'react-select'
export const REACT_SELECT_CUSTOM_STYLES = {
control: (provided) => ({
...provided,
fontSize: '0.875rem',
lineHeight: '1.25rem'
}),
valueContainer: (provided) => ({
...provided,
@nicostombros
nicostombros / data-table.tsx
Last active November 12, 2024 06:10
Shadcn UI implementation of DataTable and Pagination components working together
// same as your regular shadcn datatable implementation (which uses tanstack table)
// note that the shadcn datatable uses shadcn table for the ui. see https://ui.shadcn.com/docs/components/data-table
import {
ColumnFiltersState,
SortingState,
VisibilityState,
flexRender,
getCoreRowModel,
getFilteredRowModel,
@yyx990803
yyx990803 / 3.4.md
Last active December 29, 2023 16:42
[DRAFT] Vue 3.4 aggregated changelog

[DRAFT] 3.4.0 Aggregated Changelog

This is the aggregated changelog for 3.4 that includes changes landed in all alpha and beta pre-releases. For changelog of individual pre-releases, please check here.

Features

@jsonbytes
jsonbytes / gist:d4a8b59a7de68507dab42a9544564f26
Created December 4, 2023 13:37
General purpose API Client
import axios, {
AxiosError,
AxiosInstance,
AxiosRequestConfig,
AxiosResponse,
InternalAxiosRequestConfig,
} from "axios";
import { API_BASE_URI } from "../config/apiConfig";
import { ErrorResponse, FetchResponse } from "@sapience/common";
@webfansplz
webfansplz / Introducing Vue DevTools (Vite Plugin).md
Last active January 1, 2024 12:32
Introducing Vue DevTools (Vite Plugin)

Introduction:

In recent years, there has been an increasing focus on improving the developer experience (DX). Tools and frameworks have been striving to enhance it. I believe everyone already knows Vite, a tool that has gained significant popularity in the frontend build tooling in recent years. It's fast, but that's not its only advantage.Vite's ecosystem has seen rapid growth due to its user-friendly and highly extensible plugin design mechanism.This allows developers to quickly integrate Vite into their tools and frameworks. Anthony Fu opensourced the Nuxt DevTools on Vue Amsterdam 2023,a new tool to help you understand your Nuxt app and improve the developer experience even further. It deeply moved and inspired me, why can't Vue have a similarly cool tool? We all know that there is an official Vue Devtools browser extension, but can we create a Vue Devtools that is bound to Vite an

import { useCalendar } from '@h6s/calendar';
import { useMachine } from '@xstate/react';
import { Button as AriaButton } from 'ariakit/button';
import clsx from 'clsx';
import { isSunday, isSameDay, addMonths, isFuture, isPast, setDate } from 'date-fns';
import format from 'date-fns/format';
import isWithinInterval from 'date-fns/isWithinInterval';
import { FC, useCallback, useMemo } from 'react';
import Select from '@components/forms/components/Select';
@marcoarment
marcoarment / S3.php
Last active June 18, 2024 14:15
A simple PHP class to perform basic operations against Amazon S3 and compatible services.
<?php
/*
A simple PHP class to perform basic operations against Amazon S3 and compatible
services. Requires modern PHP (7+, probably) with curl, dom, and iconv modules.
Copyright 2022 Marco Arment. Released under the MIT license:
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@inxilpro
inxilpro / README.md
Created July 22, 2022 21:01
Fully namespaced Tailwind config for widget or embeddable component

Sometimes you need to publish a CSS file for 3rd-party consumption (i.e. default styles for an embeddable JS widget). This set up lets you continue to use Tailwind, but scope all your styles to a specific selector.

Simply replace .internachi with your own widget namespace, set up Tailwind as you please, and run generate.sh to build a custom version of your Tailwind styles that won't interfere with other CSS rules (including the Tailwind reset).