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

less2scss

v1.9.2

Published

This utility quickly converts all your less files to scss.

Downloads

565

Readme

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.

| Description | Short command | Full command | Mandatory | Default value | | --------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------------ | ------------------ | ------------------ | | Comma separated LESS files and paths | -s | --src | Yes | - | | Destination path for converted SCSS files (if provided). If not provided, it will be the same directory | -d | --dst | No | Same directory of files provided | | Comma separated exclude paths | -e | --exclude | No | - | | Allow to recursively walk directories | -r | --recursive | No | false |

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 ;)