npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@liujiayii-vip/vite-plugin-uni-unocss

v1.0.1

Published

使tailwindcss、windicss、unocss编译出来的css能够支持uniapp的小程序端、app-nvue端

Downloads

4

Readme

注意

  1. 因HBuilderX自带的node版本太低,所以demo是无法直接运行起来的,需自行替换成最新的稳定版本node
  2. 替换掉node后会不会有影响?暂时没有发现,能“运行”也能“发行”,云打包也没发现问题。

插件说明

  1. 将tailwindcss、windicss、unocss编译后的css再次编译成支持uniapp中的小程序端和app-nvue
  2. 【h5端、纯app-vue、百度小程序、支付宝小程序、钉钉小程序】不需要使用此插件也能支持tailwindcss、windicss、unocss,所以用了此插件也不会去编译它们
  3. tailwindcss、windicss、unocss编译后的css在各端的展示上都有比较大的差别
  4. 本开发人员主要用于需要暗黑模式、多主题的项目上,尽量使用简单写法,写法越怪,问题越多
  5. vite-plugin-uni-twucss插件只起到皮毛作用(最好还是官方去适配),主要还是uniapp、tailwindcss、windicss、unocss它们之间先能编译成功且能编译出对应的css
  6. 并未完全测试,h5=app-vue>小程序端>app-nvue

目前

  1. 支持微信小程序、QQ小程序、app-nvue
  2. 因uniapp编译机制的影响,app-nvue只支持@apply这种写法

后续

  1. 支持更多小程序

安装

Vite

	npm i  vite-plugin-uni-twucss
	or
	yarn add vite-plugin-uni-twucss
// vite.config.js
	import { defineConfig } from "vite";
	import uni from "@dcloudio/vite-plugin-uni";
	import uniTwuCssPlugin from 'vite-plugin-uni-twucss';
	import Unocss from 'unocss/vite'
	export default defineConfig({
	
		plugins: [
			uni(),
			Unocss(),
			//uniTwuCssPlugin需要放在最后执行
			uniTwuCssPlugin({
				source: "unocss"
			}),
		],
	})
	

|参数 |说明 |默认值 |可选值 | |-- |-- |-- |-- | | source |app-nvue时使用,修改对应的css | unocss |windicss/tailwindcss |