Completely new to LESS and running into trouble with my styles not showing up. I thought I had everything sorted out the other day, but now it seems like none of it is working.
I attempted to install the LESS Package Control, but that didn't work out either. I tried manual methods and even copied PHP code into the console with no success. I'm unsure if this could be affecting LESS in some way.
Changing the option to CSS on Sublime's bottom right corner resulted in an error in the console. Apologies for being a bit scattered with this, any assistance would be greatly appreciated.
Here is the code:
HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8>
<title>NPM Build System w/ Less</title>
<link rel="stylesheet/less" href="css/index.less">
</head>
<body>
<h1>Made with Love</h1>
<h2>Built with NPM</h2>
</body>
</html>
LESS:
@baker-miller-pink: #FF91AF;
@nice-blue: #5B83AD;
@light-blue: @nice-blue + #111;
body {
background-color: @baker-miller-pink;
}
h1 {
color: @nice-blue;
}
Package.json:
{
"name": "npm-build-system",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"mkdir": "mkdir -p build",
"build": "npm run clean && npm run mkdir && npm run build:html && npm run build:css",
"watch": "npm run watch:html & npm run wathc:css",
"clean": "rm -rf build",
"build:html": "npm run clean:html && cp index.html build/",
"clean:html": "rm -f build/index.html",
"copy:index": "mv build/index.html ./",
"watch:html": "npm run build:html && chokidar index.html -c 'npm run build:html'",
"build:css" : "npm run clean:css && lessc --source-map css/index.less build/$npm_package_name.$npm_package_version.css",
"watch:css" : "npm run build:css && chokidar 'css/**/*.less' -c 'npm run build:css'",
"clean:css" : "rm -f build/$npm_package_name.$npm_package_version.css build/$npm_package_name.$npm_package_version.map",
},
"author": "",
"license": "ISC",
"devDependencies": {
"chokidar-cli": "^1.2.0",
"less": "^2.6.1"
}
}