sass Compiler (Atma Plugin)
The Plugin extends:
IncludeJSwith a custom loaderatma-iowith a custom middleware to read sass filesatma-serverandAtma Toolkitwith aHTTPHandlerto serve compiled sources (with sourceMap support)
-
atma plugin install atma-loader-sassThis adds
atma-loader-sassnpm dependency and thepackage.jsonwould look like:{ "dependency": { "atma-loader-sass" }, "atma": { "plugins": [ "atma-loader-sass" ], "settings": { "atma-loader-sass": { "sass": { } } } } } -
That's all. Now, you are ready to use 'dynamic stylesheets' in your project
-
install atma:
$ npm install atma -g -
install plugin:
$ atma plugin install atma-loader-sass -
add
test.htmlto the directory<!DOCTYPE html> <link href='test.scss' rel='stylesheet' />
-
add
test.sass$color: green; body { background: $color; }
-
start the server:
$ atma server -
open the browser:
http://localhost:5777/test.html
(c) MIT License - Atma.js Project
