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

ayin-lessmixins

v1.2.0

Published

A simple less mixins library

Downloads

75

Readme

English | 简体中文

Gitee Download

Github Download

简介

AyinLessMixins 是基于less.js开发的一套样式mixin库 ,本库已开源并上传至npm服务器 ayin-lessmixins

Less的具体使用方式,请查阅 less中文文档

本库最大的作用是,通过简短的代码来调用一些常用的CSS片段。

.bd(@wh) 实际为border:1px solid #fff;

.bgc(@bk) 实际为 background-color:#0000;

.absoluteCenter 实际为position: absolute; top:50%; left:50%; transform: translateX(-50%) translateY(-50%) @plus;


使用方式

本mixin库,可以在任意项目中使用

从NPM服务器安装

npm i ayin-lessmixins --save

然后通过下面方式全局引入或者单独引入

vue.config.js中全局引入

pluginOptions: {
    'style-resources-loader': {
        preProcessor: 'less',
            patterns: [
                path.resolve(__dirname, "./node_modules/ayin-lessmixins/ayin-lessmixins.less")
            ]
    }
},

vite.config.js中全局引入

css: {
    preprocessorOptions: {
      less: {
        javascriptEnabled: true,
        additionalData:`
          @import "${path.resolve(__dirname, './node_modules/ayin-lessmixins/ayin-lessmixins.less')}";
          `
      }
    }
  },

推荐在项目中使用全局引入,这样在所有的组件中均可以方便的调用mixins中的定义,而无需每个文件单独引入。[email protected] 2.


破坏性更新说明

在从1.1升级到1.2的过程中,有一个破坏性更新,从1.2版本更新之日算起,之前的项目如果安装了1.2,会提示找不到"bdr"。

产生这个的原因是,把mixins中的.bdr重命名为.bdra,而.bdri重命名为了.bdr。(历史遗留问题)

解决方案(任选其一) 1.安装1.1.0版本 npm install [email protected] 2.批量替换.bdri.bdtemp,然后批量替换.bdr.bdra,最后替换.bdtemp.bdr