
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
less-watch-compiler
Advanced tools
A command that watches folders(and subfolders) for file changes and automatically compile the less css files into css. This is a file system watcher and compiler.
A command that watches folders(and subfolders) for file changes and automatically compile the less css files into css. This is a file system watcher and compiler. It also keep track of a dependency tree and recompiles the parent if an imported (child) LESS file is changed.
Parts of this script is modified from Mikeal Rogers's watch script (https://github.com/mikeal/watch)
The commands below may need to be prefixed with
sudo
depending upon your system
Install LESS and make sure the lessc
binary is accessible to the script. Installing LESS with the -g
(global) flag will make the binary accessible to your system.
yarn global add less
npm install -g less
The commands below may need to be prefixed with
sudo
depending upon your system
Install the less-watch-compiler
command globally.
yarn global add less-watch-compiler
npm install -g less-watch-compiler
You need to pass in the minimum 2 parameters - <source_dir> and <destination_dir> . First parameter is the source folder to watch for changes and second is the output folder in which the css files will be compiled
Usage:
less-watch-compiler [options] <source_dir> <destination_dir>
If you pass in the 3rd optional parameter, Any file change will trigger only to compile the main file specified in the 3rd parameter. Assuming the 3rd is "main.less"
Usage:
less-watch-compiler [options] <source_dir> <destination_dir> [main-file]
root
└──src
│ └── main.less
│ └── aux.less
└──dist
└── main.css
The project can be compiled with the following command:
less-watch-compiler src dist main.less
By default the the configuration file is loaded from ./less-watch-compiler.config.json but can also be specified by the --config option.
less-watch-compiler.config.json
{
"watchFolder": "src",
"outputFolder": "dist",
"mainFile": "main.less"
}
The project can be compiled with the following command:
less-watch-compiler
{
"watchFolder": "<input_folder>",
"outputFolder": "<output_folder>",
"mainFile": "<main-file>",
"includeHidden": false,
"sourceMap": false,
"plugins": "plugin1,plugin2",
"lessArgs": "option1=1,option2=2",
"runOnce": false,
"enableJs": true
}
-h, --help output usage information
-V, --version output the version number
--main-file <file> Specify <file> as the file to always re-compile e.g. '--main-file style.less'.
--config <file> Custom configuration file path. (default: "less-watch-compiler.config.json")
--run-once Run the compiler once without waiting for additional changes.
--include-hidden Don't ignore files beginning with a '.' or a '_'
--enable-js Less.js Option: To enable inline JavaScript in less files.
--source-map Less.js Option: To generate source map for css files.
--plugins <plugin-a>,<plugin-b> Less.js Option: To specify plugins separated by commas.
--less-args <less-arg1>=<less-arg1-value>,<less-arg1>=<less-arg2-value> Less.js Option: To specify any other less options e.g. '--less-args math=strict,strict-units=on,include-path=./dir1\;./dir2'.
"minified":false
in the config file."sourceMap":true
in the config file..less
extension. More file extensions can be added by modifying the allowedExtensions
array in config.json
._style.css
or period .style.css
are ignored. This behavior can be changed by adding "includeHidden:true
in the config file.--run-once
used, compilation will fail on first errorAlternativelly, you can checkout the code and run things locally like this:
node less-watch-compiler.js [options]
To run unit tests: yarn test
or npm test
(see test/test.js).
This project exists thanks to all the people who contribute. [Contribute].
Thank you to all our backers! 🙏 [Become a backer]
Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]
FAQs
A command that watches folders(and subfolders) for file changes and automatically compile the less css files into css. This is a file system watcher and compiler.
The npm package less-watch-compiler receives a total of 8,243 weekly downloads. As such, less-watch-compiler popularity was classified as popular.
We found that less-watch-compiler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.