1.9.2 • Published 1 year ago

less2scss v1.9.2

Weekly downloads
55
License
ISC
Repository
github
Last release
1 year ago

NPM npm version

less2scss

This npm package will convert all your less files to scss.

You can provide an entire folder, this package will scan all less files whose find in subfolders and it'll create SCSS files in the same folder or in the new directory provided recreating the source hierarchy.

Install

Install it via npm:

$ npm install less2scss --global

Usage

less2scss offers a single command line interface:

$ less2scss

Will print an help:

Usage: less2scss [options]

This utility quickly converts all your less files to scss.

Options:
-V, --version                 output the version number
-s, --src <sourcePaths>       comma separated source paths
-d, --dst <dstPath>           destination path
-e, --exclude <excludePaths>  comma separated exclude paths
-r, --recursive               allow to recursively walk directories (default: false)
-h, --help                    display help for command

Options

You can pass the following options via CLI arguments.

DescriptionShort commandFull commandMandatoryDefault value
Comma separated LESS files and paths-s--srcYes-
Destination path for converted SCSS files (if provided). If not provided, it will be the same directory-d--dstNoSame directory of files provided
Comma separated exclude paths-e--excludeNo-
Allow to recursively walk directories-r--recursiveNofalse

Note:

For excluding files and path we use ignore package.

_ignore is a manager, filter and parser which implemented in pure JavaScript according to the .gitignore spec 2.22.1.

All paths provided must be relative to the source path

Examples

Convert LESS files inside a folder excluding node_modules and vendor subfolders.

$ less2scss -s ./less_folder  -d ./scss_folder -r -e 'node_modules,vendor'

Convert LESS files inside a folder excluding all subfolders whose name begins with test.

$ less2scss -s ./less_folder  -d ./scss_folder -r -e 'node_modules,vendor'

Notice

Be careful, something may not be converted properly.

It's an automatic conversion tool, you can fix errors manually later.

Credits

Some convertion rules are inspired by:

Contributing

If you have suggestions for enhancements or ideas for new features that could be useful, please open a pull request or open an issue.

License

less2scss is licensed under : The Apache Software License, Version 2.0. You can find a copy of the license (http://www.apache.org/licenses/LICENSE-2.0.txt)

Enjoy ;)

1.9.2

1 year ago

1.9.1

2 years ago

1.9.0

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.2.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.5

3 years ago

1.0.4

4 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.4.0

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago