atma-loader-postcss
v1.0.8
Published
PostCSS compiler for `atma-io`, `IncludeJS` and `atma-server`.
Downloads
3
Readme
PostCSS Compiler (Atma Plugin)
The Plugin extends:
IncludeJS
with a custom loaderatma-io
with a custom middleware to read PostCSS filesatma-server
andAtma Toolkit
with aHTTPHandler
to serve compiled sources (with sourceMap support)
How to use
Embed into the Project
atma plugin install atma-loader-postcss
This adds
atma-loader-postcss
npm dependency and thepackage.json
would look like:{ "dependency": { "atma-loader-postcss" }, "atma": { "plugins": [ "atma-loader-postcss" ], "settings": { "atma-loader-postcss": { "extension": "css", "plugins": ['autoprefixer'] } } } }
That's all. Now, you are ready to use 'dynamic stylesheets' in your project
Quick Try
install atma:
$ npm install atma -g
install plugin:
$ atma plugin install atma-loader-postcss
add
test.html
to the directory<!DOCTYPE html> <link href='test.css' rel='stylesheet' />
add
test.postcss
div { display: flex; }
start the server:
$ atma server
open the browser:
http://localhost:5777/test.html
(c) MIT License - Atma.js Project