Skip to content

defunctzombie/node-makeup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

makeup

connect/express middleware for serving css provided by widgets via package.json:style field.

example

In our app/server/whatever.js

app.use('/css/widgets.css', makeup(__dirname + '/css/widgets.css'));

widgets.css would look similar to

@import "typeahead"

/* other css rules can go here */
.foo {}
.bar {}

Typeahead is a widget we installed via npm. It provides some javascript (ala commonjs style) and a base stylesheet. We want to use that base stylesheet and customize it for our needs.

Our widgets.css remains a valid css file. If passed through makeup, the @import statements will load any css which the typeahead module provided (via the package.json:style) field.

When we visit site.com/css/widgets.css we will be served a single css file with the rules for our typeahead widget.

All of the typeahead widget rules will be namespaced with .typeahead.

install

npm install makeup

About

middleware to serve npm-css processed files

Resources

Stars

Watchers

Forks

Packages

No packages published