hexo-renderer-bourbon
Advanced tools
Comparing version 0.0.2 to 1.0.0
14
index.js
'use strict'; | ||
var renderer = require('./lib/renderer'); | ||
var assign = require('object-assign'); | ||
hexo.config.bourbon = assign({ | ||
imagePath: 'images' , | ||
omitSourceMapUrl: false, | ||
indentedSyntax: false, | ||
precision: 8, | ||
outputStyle: 'nested', | ||
sourceComments: 'none' , | ||
sourceMapEmbed: false, | ||
sourceMapContents: false | ||
}, hexo.config.bourbon); | ||
hexo.extend.renderer.register('scss', 'css', renderer); | ||
hexo.extend.renderer.register('sass', 'css', renderer); |
@@ -5,20 +5,15 @@ 'use strict'; | ||
var bourbon = require('node-bourbon'); | ||
var assign = require('object-assign'); | ||
var assign = require('lodash.assign'); | ||
module.exports = function (data, options, cb) { | ||
var error, result; | ||
module.exports = function (data, options) { | ||
var config = this.config.bourbon; | ||
var opts = assign({ | ||
var result = sass.renderSync(assign({ | ||
file: data.path, | ||
data: data.text, | ||
includePaths: bourbon.includePaths | ||
}, config); | ||
}, config)); | ||
try { | ||
result = sass.renderSync(opts); | ||
} catch (_error) { | ||
error = _error; | ||
return cb(error); | ||
} | ||
return cb(null, result.css); | ||
return result.css.toString(); | ||
}; |
{ | ||
"name": "hexo-renderer-bourbon", | ||
"version": "0.0.2", | ||
"version": "1.0.0", | ||
"description": "An up-to-date node-sass wrapper for Hexo that includes Bourbon mixins.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
"test": "gulp test" | ||
}, | ||
@@ -27,6 +27,18 @@ "repository": { | ||
"dependencies": { | ||
"lodash.assign": "^3.1.0", | ||
"node-bourbon": "^4.2.1-beta1", | ||
"node-sass": "^2.0.1", | ||
"object-assign": "^2.0.0" | ||
"node-sass": "^3.0.0-beta.7" | ||
}, | ||
"devDependencies": { | ||
"chai": "^2.2.0", | ||
"coveralls": "^2.11.2", | ||
"gulp": "^3.8.11", | ||
"gulp-istanbul": "^0.8.1", | ||
"gulp-jshint": "^1.10.0", | ||
"gulp-load-plugins": "^0.10.0", | ||
"gulp-mocha": "^2.0.1", | ||
"jshint-stylish": "^1.0.1", | ||
"mocha": "^2.2.4", | ||
"rimraf": "^2.3.2" | ||
} | ||
} |
# [Sass] renderer for [Hexo] with [Bourbon] support | ||
[![Build Status](https://travis-ci.org/celsomiranda/hexo-renderer-bourbon.svg)](https://travis-ci.org/celsomiranda/hexo-renderer-bourbon) | ||
[![NPM Version](https://badge.fury.io/js/hexo-renderer-bourbon.svg)](http://badge.fury.io/js/hexo-renderer-bourbon) | ||
[![NPM Dependencies](https://david-dm.org/celsomiranda/hexo-renderer-bourbon.svg)](https://www.npmjs.com/package/hexo-renderer-bourbon) | ||
[![Coverage Status](https://coveralls.io/repos/celsomiranda/hexo-renderer-bourbon/badge.svg)](https://coveralls.io/r/celsomiranda/hexo-renderer-bourbon) | ||
An up-to-date [node-sass] wrapper that includes [Bourbon] mixins. | ||
@@ -42,2 +47,8 @@ | ||
#### sourceMap | ||
This must be `true` even for embeded sourcemaps. | ||
#### outFile | ||
Must put the name of the output css file for sourcemaps to work. | ||
#### sourceMapEmbed | ||
@@ -60,2 +71,4 @@ `sourceMapEmbed` is a `Boolean` flag to determine whether to embed `sourceMappingUrl` as data URI. | ||
omitSourceMapUrl: false | ||
sourceMap: false | ||
outFile: '', | ||
sourceMapEmbed: false | ||
@@ -62,0 +75,0 @@ sourceMapContents: false |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No tests
QualityPackage does not have any tests. This is a strong signal of a poorly maintained or low quality package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
5963
0
80
10
17
+ Addedlodash.assign@^3.1.0
+ Addedamdefine@1.0.1(transitive)
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedaproba@1.2.0(transitive)
+ Addedare-we-there-yet@1.1.7(transitive)
+ Addedasync-foreach@0.1.3(transitive)
+ Addedcall-bind@1.0.8(transitive)
+ Addedcall-bind-apply-helpers@1.0.1(transitive)
+ Addedcall-bound@1.0.3(transitive)
+ Addedcamelcase@3.0.0(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedcliui@3.2.0(transitive)
+ Addedcode-point-at@1.1.0(transitive)
+ Addedconsole-control-strings@1.1.0(transitive)
+ Addedcross-spawn@3.0.1(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddunder-proto@1.0.1(transitive)
+ Addedes-define-property@1.0.1(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedfs.realpath@1.0.0(transitive)
+ Addedgauge@2.7.4(transitive)
+ Addedgaze@1.1.3(transitive)
+ Addedget-caller-file@1.0.3(transitive)
+ Addedget-intrinsic@1.2.6(transitive)
+ Addedglob@7.1.77.2.3(transitive)
+ Addedglobule@1.3.4(transitive)
+ Addedgopd@1.2.0(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-symbols@1.1.0(transitive)
+ Addedhas-unicode@2.0.1(transitive)
+ Addedin-publish@2.0.1(transitive)
+ Addedinvert-kv@1.0.0(transitive)
+ Addedis-fullwidth-code-point@1.0.0(transitive)
+ Addedisexe@2.0.0(transitive)
+ Addedjs-base64@2.6.4(transitive)
+ Addedlcid@1.0.0(transitive)
+ Addedlodash@4.17.21(transitive)
+ Addedlodash._baseassign@3.2.0(transitive)
+ Addedlodash._basecopy@3.0.1(transitive)
+ Addedlodash._bindcallback@3.0.1(transitive)
+ Addedlodash._createassigner@3.1.1(transitive)
+ Addedlodash._getnative@3.9.1(transitive)
+ Addedlodash._isiterateecall@3.0.9(transitive)
+ Addedlodash.assign@3.2.04.2.0(transitive)
+ Addedlodash.clonedeep@4.5.0(transitive)
+ Addedlodash.isarguments@3.1.0(transitive)
+ Addedlodash.isarray@3.0.4(transitive)
+ Addedlodash.keys@3.1.2(transitive)
+ Addedlodash.restparam@3.6.1(transitive)
+ Addedlru-cache@4.1.5(transitive)
+ Addedmath-intrinsics@1.1.0(transitive)
+ Addedminimatch@3.0.83.1.2(transitive)
+ Addednan@2.22.0(transitive)
+ Addednode-gyp@3.8.0(transitive)
+ Addednode-sass@3.13.1(transitive)
+ Addednpmlog@4.1.2(transitive)
+ Addednumber-is-nan@1.0.1(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.7(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedos-locale@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedpseudomap@1.0.2(transitive)
+ Addedrequire-directory@2.1.1(transitive)
+ Addedrequire-main-filename@1.0.1(transitive)
+ Addedrimraf@2.7.1(transitive)
+ Addedsass-graph@2.2.6(transitive)
+ Addedscss-tokenizer@0.2.3(transitive)
+ Addedsemver@5.3.0(transitive)
+ Addedset-blocking@2.0.0(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsource-map@0.4.4(transitive)
+ Addedstring-width@1.0.2(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedtar@2.2.2(transitive)
+ Addedwhich@1.3.1(transitive)
+ Addedwhich-module@1.0.0(transitive)
+ Addedwide-align@1.1.5(transitive)
+ Addedwrap-ansi@2.1.0(transitive)
+ Addedy18n@3.2.2(transitive)
+ Addedyallist@2.1.2(transitive)
+ Addedyargs@7.1.2(transitive)
+ Addedyargs-parser@5.0.1(transitive)
- Removedobject-assign@^2.0.0
- Removedansi@0.3.1(transitive)
- Removedansi-regex@0.2.1(transitive)
- Removedansi-styles@1.1.0(transitive)
- Removedare-we-there-yet@1.0.6(transitive)
- Removedasn1@0.1.11(transitive)
- Removedassert-plus@0.1.5(transitive)
- Removedasync@0.9.2(transitive)
- Removedaws-sign2@0.5.0(transitive)
- Removedbl@0.9.5(transitive)
- Removedboom@0.4.2(transitive)
- Removedcaseless@0.8.0(transitive)
- Removedchalk@0.5.1(transitive)
- Removedcombined-stream@0.0.7(transitive)
- Removedcommander@0.6.12.20.32.3.0(transitive)
- Removedconfig-chain@1.1.13(transitive)
- Removedcross-spawn@0.2.9(transitive)
- Removedcryptiles@0.2.2(transitive)
- Removedctype@0.5.3(transitive)
- Removeddebug@2.2.0(transitive)
- Removeddelayed-stream@0.0.5(transitive)
- Removeddiff@1.4.0(transitive)
- Removedescape-string-regexp@1.0.2(transitive)
- Removedforever-agent@0.5.2(transitive)
- Removedform-data@0.2.0(transitive)
- Removedgauge@1.0.2(transitive)
- Removedgaze@0.5.2(transitive)
- Removedglob@3.1.213.2.114.3.54.5.3(transitive)
- Removedglobule@0.1.0(transitive)
- Removedgraceful-fs@1.2.33.0.12(transitive)
- Removedgrowl@1.9.2(transitive)
- Removedhas-ansi@0.1.0(transitive)
- Removedhas-unicode@1.0.1(transitive)
- Removedhawk@1.1.1(transitive)
- Removedhoek@0.9.1(transitive)
- Removedhttp-signature@0.10.1(transitive)
- Removedinherits@1.0.2(transitive)
- Removedini@1.3.8(transitive)
- Removedisarray@0.0.1(transitive)
- Removedjade@0.26.3(transitive)
- Removedlodash@1.0.22.4.2(transitive)
- Removedlru-cache@2.7.3(transitive)
- Removedmime-db@1.12.0(transitive)
- Removedmime-types@1.0.22.0.14(transitive)
- Removedminimatch@0.2.140.3.02.0.10(transitive)
- Removedminimist@0.0.8(transitive)
- Removedmkdirp@0.3.00.5.1(transitive)
- Removedmocha@2.5.3(transitive)
- Removedms@0.7.1(transitive)
- Removednan@1.9.0(transitive)
- Removednatives@1.1.6(transitive)
- Removednode-sass@2.1.1(transitive)
- Removednode-uuid@1.4.8(transitive)
- Removednpmconf@2.1.3(transitive)
- Removednpmlog@1.0.0(transitive)
- Removedoauth-sign@0.5.0(transitive)
- Removedobject-assign@2.1.1(transitive)
- Removedonce@1.3.3(transitive)
- Removedpangyp@2.3.3(transitive)
- Removedproto-list@1.2.4(transitive)
- Removedqs@2.3.3(transitive)
- Removedreadable-stream@1.0.34(transitive)
- Removedreplace-ext@0.0.1(transitive)
- Removedrequest@2.51.0(transitive)
- Removedrimraf@2.2.8(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedsass-graph@1.3.0(transitive)
- Removedsemver@4.3.6(transitive)
- Removedshelljs@0.3.0(transitive)
- Removedsigmund@1.0.1(transitive)
- Removedsntp@0.2.4(transitive)
- Removedstring_decoder@0.10.31(transitive)
- Removedstringstream@0.0.6(transitive)
- Removedstrip-ansi@0.3.0(transitive)
- Removedsupports-color@0.2.01.2.0(transitive)
- Removedtar@1.0.3(transitive)
- Removedtldts@6.1.69(transitive)
- Removedtldts-core@6.1.69(transitive)
- Removedto-iso-string@0.0.2(transitive)
- Removedtough-cookie@5.0.0(transitive)
- Removedtunnel-agent@0.4.3(transitive)
- Removeduid-number@0.0.5(transitive)
- Removedwhich@1.0.9(transitive)
Updatednode-sass@^3.0.0-beta.7