Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

boost

Package Overview
Dependencies
Maintainers
1
Versions
99
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

boost - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

CHANGELOG.md

66

package.json
{
"name": "boost",
"version": "0.0.3",
"description": "inline css into your html",
"main": "index.js",
"version": "0.0.4",
"description": "Robust pipeline for creating build tools that separate logic into routines and tasks.",
"keywords": [],
"main": "./lib/index.js",
"files": [
"*.md",
"lib"
],
"scripts": {
"test": "mocha"
"clean": "rimraf ./lib",
"build": "babel ./src -d ./lib",
"lint": "eslint ./src ./tests",
"flow": "flow check",
"mocha": "mocha --opts ./mocha.opts './tests/**/*.test.js'",
"pretest": "yarn run lint",
"test": "yarn run mocha",
"posttest": "yarn run flow",
"preversion": "yarn test && yarn run clean && yarn run build"
},
"repository": {
"type": "git",
"url": "git://github.com/superjoe30/boost.git"
"url": "git+https://github.com/milesj/boost.git"
},
"keywords": [
"juice",
"inline",
"css",
"email",
"style"
],
"author": "Andrew Kelley",
"license": "BSD",
"devDependencies": {
"mocha": "~1.8.1"
"author": {
"name": "Miles Johnson",
"url": "http://milesj.me"
},
"license": "MIT",
"bugs": {
"url": "https://github.com/milesj/boost/issues"
},
"homepage": "https://github.com/milesj/boost#readme",
"dependencies": {
"jsdom": "~0.4.0",
"juice": "0.0.9",
"superagent": "~0.12.1",
"batch": "~0.2.1"
"babel-runtime": "^6.18.0",
"chalk": "^1.1.3",
"lodash": "^4.17.2"
},
"devDependencies": {
"babel-cli": "^6.18.0",
"babel-eslint": "^7.1.0",
"babel-plugin-transform-flow-comments": "^6.17.0",
"babel-plugin-transform-runtime": "^6.15.0",
"babel-preset-latest": "^6.16.0",
"babel-preset-stage-2": "^6.18.0",
"babel-register": "^6.18.0",
"chai": "^3.5.0",
"eslint": "^3.12.1",
"eslint-config-airbnb-base": "^11.0.0",
"eslint-plugin-flowtype": "^2.25.0",
"eslint-plugin-import": "^2.2.0",
"flow-bin": "^0.37.0",
"mocha": "^3.1.2",
"rimraf": "^2.5.4"
}
}

@@ -1,55 +0,20 @@

# boost ![](http://i.imgur.com/fSEY9.gif)
# Boost v0.0.0
[![Build Status](https://travis-ci.org/milesj/boost.svg?branch=master)](https://travis-ci.org/milesj/boost)
Given HTML, boost will inline your CSS properties into the `style` attribute.
Robust pipeline for creating build tools that separate logic into routines and tasks.
boost builds on [juice](https://github.com/LearnBoost/juice), making your
email templating task Even More Convenient.
# Example
## How to use
If Babel + Babili was created using this library, the implementation would look something like the following.
```js
var boost = require('boost');
boost("/path/to/file.html", function(err, html) {
console.log(html);
});
Pipeline.fromConfig('./.babelrc')
.phase(new LocateRoutine('locate')) // Glob initial files
.phase(new ResolveRoutine('resolve')) // Resolve dependency lookups
.phase(new TransformRoutine('transform')) // Apply transformations
.phase(new MinifyRoutine('minify')) // Apply minification
.phase(new BundleRoutine('bundle', { // Bundle and or output the files
out: './lib',
}))
.execute('./src');
```
`/path/to/file.html`:
```html
<html>
<head>
<style>
p { color: red; }
</style>
<link rel="stylesheet" href="style.css">
</head>
<body>
<p>Test</p>
</body>
</html>
```
`style.css`
```css
p {
text-decoration: underline;
}
```
Output:
```html
<p style="color: red; text-decoration: underline;">Test</p>
```
## What is this useful for ?
- HTML emails. See [juice](https://github.com/LearnBoost/juice)
- Embedding HTML in 3rd-party websites.
## Why not just use juice directly ?
Because then you cannot take advantage of template inheritance with your css.
## Projects using boost
- [swig-email-templates](https://github.com/superjoe30/swig-email-templates)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc