All Projects → sampi → node-less-chokidar

sampi / node-less-chokidar

Licence: MIT license
Watch and build CSS from LESS, compatible with Create React App

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects

Projects that are alternatives of or similar to node-less-chokidar

Cra Build Watch
A script for create-react-app that writes development builds to the disk
Stars: ✭ 110 (+423.81%)
Mutual labels:  build, create-react-app
React Latest Framework
a client framework of React
Stars: ✭ 835 (+3876.19%)
Mutual labels:  less, create-react-app
Create Apollo App
Create Apollo App is a command-line tool designed to generate fully-configured starter Apollo GraphQL projects with essential dependencies for developing web, server and mobile applications and zero build configuration.
Stars: ✭ 110 (+423.81%)
Mutual labels:  less, build
craco-cesium
Let's use 🌍Cesium with create-react-app today!
Stars: ✭ 58 (+176.19%)
Mutual labels:  create-react-app
netlify-forms-formik
📝 Netlify Forms with Formik and ReCaptcha
Stars: ✭ 33 (+57.14%)
Mutual labels:  create-react-app
marvel-jarvig
Marvel JARVIG (Just A Rather Very Interesting Game) is a game that lets you find and discover Marvel Comics characters based on their name, image and description!
Stars: ✭ 13 (-38.1%)
Mutual labels:  create-react-app
Nginx-builder
A tool to build deb or rpm package of required Nginx version from the source code, with the ability to connect third-party modules. Nginx parameters are set in the yaml configuration file.
Stars: ✭ 143 (+580.95%)
Mutual labels:  build
docker-php
Docker build php development environment
Stars: ✭ 40 (+90.48%)
Mutual labels:  build
forex-web-app
💱 foreign currency exchange app built with react hooks
Stars: ✭ 17 (-19.05%)
Mutual labels:  create-react-app
criteria-of-quality-frontend
Критерии качественной вёрстки (разметка, стилизация, картинки, шрифты, автоматизация и пр.)
Stars: ✭ 26 (+23.81%)
Mutual labels:  less
ml-resources-react
A simple react app displaying resources to learn Machine learning.
Stars: ✭ 15 (-28.57%)
Mutual labels:  create-react-app
build-stats
🏆 get the build stats for pipelines 🏆
Stars: ✭ 79 (+276.19%)
Mutual labels:  build
muleify
Muleify - Static Site Generator | Website Bundler | Asset Compiler | Templating | Preproccessor
Stars: ✭ 16 (-23.81%)
Mutual labels:  less
napalm
Support for building npm packages in Nix and lightweight npm registry [maintainer @nmattia]
Stars: ✭ 80 (+280.95%)
Mutual labels:  build
elite
Fegeya Elitebuild, small, powerful build system. Written in Rust.
Stars: ✭ 24 (+14.29%)
Mutual labels:  build
barebones
A minimal CSS boilerplate - UNMAINTAINED
Stars: ✭ 37 (+76.19%)
Mutual labels:  less
next-plugin-antd-less
🎩 Use Antd (Less) with Next.js v12, Zero Dependency on other Next-Plugins.
Stars: ✭ 338 (+1509.52%)
Mutual labels:  less
meal-planner
A web application to plan what you eat daily in accordance to dietary needs
Stars: ✭ 53 (+152.38%)
Mutual labels:  create-react-app
cra-envs
⚙️ Bundle env var in CRA at launch time!
Stars: ✭ 45 (+114.29%)
Mutual labels:  create-react-app
inside-client
Human Resources Department Tool. https://ifactory-solutions.github.io/inside-client/
Stars: ✭ 42 (+100%)
Mutual labels:  create-react-app

node-less-chokidar

travis npm

Compile .less into .css and watch for file changes!

HOWTO

I made this with Create React App in mind, put something similar in your package.json

"scripts": {
    "start": "npm run build-css && run-p -ncr watch-css start-js",
    "start-js": "react-scripts start",

    "build": "run-s -n build-css build-js",
    "build-js": "react-scripts build",

    "test": "run-s -n build-css test-js",
    "test-js": "react-scripts test --env=jsdom",

    "build-css": "node-less-chokidar src",
    "watch-css": "node-less-chokidar src --watch"
},
"devDependencies": {
    "node-less-chokidar": "^0.3.0",
    "npm-run-all": "^4.1.3"
}

npm start should build all CSS from the LESS files and then keep watching, npm test will build all files and then run the tests, npm run build-css will build all the CSS, npm run watch-css will watch for changes in the LESS files and build them when they change.

Known bug

There's a bug though in the following case:

Let's say you have these files:

  • variables.less (variable definitions, no imports)
  • mixins.less (mixins, importing variables.less)
  • main.less (imports variables.less, mixins.less and uses the variables and mixins)

If you change variables.less or mixins.less it won't rebuild main.css, because it doesn't know about the dependency graph of the files. The fix is that if you know you're editing one of these files that are imported by other files, just run npm run build-css and everything will be fine.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].