• This repository has been archived on 27/Nov/2017
  • Stars
    star
    195
  • Rank 198,597 (Top 4 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 11 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Grunt task for turning an html file with linked css to inline css. Great for emails.

grunt-inline-css

Takes an html file with css link or separate css files and turns inline. Great for emails. It leverages the amazing juice library.

Getting Started

This plugin requires Grunt >=0.4.0

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-inline-css --save-dev

One the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-inline-css');

The "inlinecss" task

Overview

In your project's Gruntfile, add a section named inlinecss to the data object passed into grunt.initConfig().

grunt.initConfig({
    inlinecss: {
        main: {
            options: {
            },
            files: {
                'out.html': 'in.html'
            }
        }
    }
})

You can see available options here

The "inlinecontent" task

Overview

In your project's Gruntfile, add a section named inlinecontent to the data object passed into grunt.initConfig().

grunt.initConfig({
    inlinecontent: {
        main: {
            {
                src: 'examples/in.html',
                css: ['examples/file.css'],
                dest: 'tmp/out.html',
            },
        }
    }
})

Contributing

In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.

More Repositories

1

routie

a tiny javascript hash router
JavaScript
621
star
2

toc

Table of Contents Plugin
JavaScript
531
star
3

jquery-builder

Build custom versions of jQuery
JavaScript
347
star
4

layouts

an applescript and alfred extension to manage window layouts
AppleScript
272
star
5

mongroup

Monitor a group of processes with mon
Shell
186
star
6

markx

markdown + code => html
JavaScript
127
star
7

videojs-playLists

VideoJS playlists done right!
JavaScript
88
star
8

MilkMaid

A mac app for Remember The Milk - abandoned, fork away!
JavaScript
75
star
9

node-ga

Server Side Google Analytics for Node
JavaScript
60
star
10

hubsearch

Github search with scoring algorithm and sorting
JavaScript
57
star
11

boots

a twitter bootstrap cli
JavaScript
53
star
12

resistance

A javascript flow library
JavaScript
45
star
13

clientjade

command line tool to compile your jade templates into client side templates for use in the browser
JavaScript
44
star
14

grunt-hash

a grunt plugin for appending hashes to files for cache busting
JavaScript
41
star
15

fidel

A basic javascript controller
JavaScript
36
star
16

querystring

A simple javascript querystring library
JavaScript
31
star
17

clientside

Tool to convert server side (CommonJS) modules to client side (browser) modules
JavaScript
27
star
18

cube-dashboard

A config driven dashboard for cube
JavaScript
24
star
19

grunt-bootstrap

Grunt plugin for generating custom builds of bootstrap
JavaScript
16
star
20

ToodleAir

ToodleDo adobe air desktop app for easily adding tasks
JavaScript
15
star
21

gapserver

A utility to let you use modern web technologies when building your PhoneGap apps.
JavaScript
15
star
22

OWAParser

Objective C parser for Outlook Web Access
Objective-C
12
star
23

fakeson

A node.js library to generate fake/mock json documents for rapid prototyping.
JavaScript
10
star
24

OWANotifier

Mac menu bar app for Outlook Web Mail
Objective-C
8
star
25

geektool

A collection of geektool scripts
Python
7
star
26

loggly-dashboard

A Dashboard for Loggly Stats
JavaScript
6
star
27

TumblrThemeUpdater

Python script to update your tumblr theme from an html file stored locally
Python
5
star
28

taskpaper-dates

Python library to parse dates for taskpaper documents
Python
5
star
29

reloadr

LiveReload CLI tool
JavaScript
5
star
30

data-diff

Javascript library to figure out the changes between json data.
JavaScript
5
star
31

dotfiles

Shell
5
star
32

DLabs

Demand Labs UI Framework
JavaScript
4
star
33

cube-reports

A tool to send daily reports from your cube data
JavaScript
4
star
34

envy-proxy

A reverse proxy for envy containers
Nginx
4
star
35

dist

A node.js cli tool and library to generate development and production versions of javascript libraries.
JavaScript
4
star
36

node-placefinder

A node.js library for Yahoo's Placefinder API
JavaScript
4
star
37

docker-extras

a few docker helpers
Shell
3
star
38

mockdata

mock data library for node.js
JavaScript
3
star
39

diet

Put your images on a diet - image resizer for node.js
JavaScript
3
star
40

SimpleRTM

Mac application for Remember The Milk
Objective-C
2
star
41

masher

Node asset manager
JavaScript
2
star
42

AppUI

library for creating web apps
JavaScript
2
star
43

sprite_generator

Python script to generate css sprites
Python
2
star
44

csscoverage

A node.js app to find all unused css selectors on a page
JavaScript
2
star
45

fit

a jQuery plugin for centering and cropping images
JavaScript
2
star
46

reddit-karma

A simple webapp to track reddit karma for a user
JavaScript
2
star
47

evernote-templates

Templates for Evernote
JavaScript
2
star
48

form-storage

Library to store content from forms in localStorage so if browser is refreshed or back button is hit, the data is saved and restored.
JavaScript
2
star
49

express-bundle

An express library to split up your application into sub applications
JavaScript
2
star
50

stalk

cli tool to run a command when files have been changed
JavaScript
2
star
51

framejax

Async File Upload Library
JavaScript
2
star
52

iStyle

basic css lib for styling iOS apps
JavaScript
1
star
53

adobe-air-test

JavaScript
1
star
54

grunt-bytesize

Grunt plugin to output the filesize and gzip size of files
JavaScript
1
star
55

template

An extremely simple javascript template engine
JavaScript
1
star
56

thrive

A base javascript class that allows for easy inheritance
JavaScript
1
star
57

portfolio

My portfolio site
CSS
1
star
58

aws-curl

A library to perform curls across multiple AWS EC2 boxes
JavaScript
1
star
59

strf

String Formatter
JavaScript
1
star
60

rdio-remote

A web app to remotely control RDIO
JavaScript
1
star
61

grunt-clientside

A grunt plugin for clientside
JavaScript
1
star
62

Things2RTM

Script to export tasks from Things and import them into Remember the Milk
Python
1
star
63

gSendMail

Python Library to send emails via gmail
Python
1
star
64

grunt-concat-bower

A grunt plugin to concat bower dependencies
JavaScript
1
star
65

currie

javascript proxy/curry function
JavaScript
1
star
66

evercreate

Cli to create evernote notes and reminders
JavaScript
1
star
67

simple-guid

A really simple guid generator for node and browser
JavaScript
1
star
68

secure-shell-colors

JavaScript
1
star
69

pyitc

Python iTunes Connect library
Python
1
star
70

InstapaperCount

Chrome Extension to show number of unread items in Instapaper title and header
JavaScript
1
star
71

jgaui

Useful Javascript Scripts
JavaScript
1
star
72

grunt-reloadr

Grunt plugin to run a LiveReload server
JavaScript
1
star
73

angular-reorder

Angular directive to reorder elements with drag and drop
JavaScript
1
star
74

shell

Vim Script
1
star