why my current project in reactjs included this "theme": "lessc --js src/App.less src/App.css", in package.json scripts?

Viewed 39

when i run script "theme": "lessc --js src/App.less src/App.css", in package.json scripts by npm run theme what will happen to my react project?

1 Answers
"theme": "lessc --js src/App.less src/App.css"

Please, find the explanation below :

less --js => This enables evaluation of JavaScript inline in .less files.

src/App.less => App.less file contains your styling code and being compiled to App.css file which is available in /src folder.

src/App.css => App.css is compiled file which contains your compiled styling code of App.less file and that file be auto available in /src folder itself.

Example :

App.less

@width: 10px;
@height: @width + 10px;

#header {
  width: @width;
  height: @height;
}

App.css (compiled file from App.less after running the cmd : npm run theme)

#header {
  width: 10px;
  height: 20px;
}
Related