1.0.39 • Published 1 year ago

less-tool v1.0.39

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

less-tool

Use:

1 in your vue project
    1.1 yarn add less-tool or npm i less-tool
    1.2 npm i style-resources-loader -D
        1.2.1 npm i vue-cli-plugin-style-resources-loader -D
        1.2.2 npm i less-loader -D
        1.2.3 npm i less -D
    1.3 in you vue.config.js ,add the following code :
        module.exports = {
             pluginOptions: {
            'style-resources-loader': {
              preProcessor: 'less',
              patterns: [ './node_modules/less-tool/*.less' ]
            }
            }, 
        }
    1.4 del sass-loader and node-sass in your packages.json

2 in your vite project, add the following code in vite.config.js
          css: {
            modules: {
              localsConvention: 'dashesOnly'
            },
            preprocessorOptions: {
              less: {
                // Support inline JavaScript
                javascriptEnabled: true,
                // https://blog.csdn.net/yun_master/article/details/120050054 Global references Less file
                additionalData: `@import "${path.resolve(__dirname, './node_modules/less-tool/mixin.module.less')}";`
                }
              }
            }
3 then you can use the variables or mixin methods defined in the .less file globally

Push:

    1 git commit -a -s -m 'add' && npm version patch && git push origin main && npm login && npm publish
        1.1 npm version patch is update the version in package.json , eg : https://www.cnblogs.com/isYunjiang/p/16483363.html 
            1.0.0 -> 1.0.1  npm version patch
            1.0.1 -> 1.1.0  npm version minor
            1.1.0 -> 2.0.0  npm version major
    2 Finally, in your main project, yarn add less-tool or npm i less-tool
1.0.39

1 year ago

1.0.38

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.32

1 year ago

1.0.35

1 year ago

1.0.24

2 years ago

1.0.19

2 years ago

1.0.18

2 years ago

1.0.17

2 years ago

1.0.16

2 years ago

1.0.21

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.23

2 years ago

1.0.13

2 years ago

1.0.12

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago