New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

grunt-sassdoc

Package Overview
Dependencies
Maintainers
4
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-sassdoc - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0-rc.2

CHANGELOG.md

20

package.json
{
"name": "grunt-sassdoc",
"title": "grunt-sassdoc",
"version": "1.1.0",
"version": "2.0.0-rc.2",
"description": "SassDoc grunt task",

@@ -24,5 +24,10 @@ "keywords": [

},
"files": [
"tasks",
"CHANGELOG.md",
"README.md",
"UNLICENSE"
],
"dependencies": {
"sassdoc": "^1.2.0",
"chalk": "^0.5.0",
"sassdoc": "2.0.0-rc.6",
"lodash": "^2.4.1"

@@ -34,7 +39,7 @@ },

"grunt-contrib-clean": "^0.6.0",
"grunt-eslint": "^0.6.0",
"grunt-eslint": "^2.1.0",
"grunt-tape": "0.0.2",
"load-grunt-tasks": "^0.6.0",
"tape": "^2.13.4",
"time-grunt": "^0.4.0"
"load-grunt-tasks": "^1.0.0",
"tape": "^3.0.3",
"time-grunt": "^1.0.0"
},

@@ -52,4 +57,5 @@ "peerDependencies": {

"scripts": {
"rebuild": "rm -rf node_modules && npm install",
"test": "grunt test"
}
}

@@ -1,2 +0,2 @@

/*
/**
* grunt-sassdoc

@@ -11,88 +11,35 @@ *

var sassdoc = require('sassdoc');
var chalk = require('chalk');
var _ = require('lodash');
var ensure = require('lodash').assign;
module.exports = function (grunt) {
function validateSrc(filePair) {
return filePair.src.filter(function (filepath) {
if (!grunt.file.exists(filepath)) {
grunt.log.warn('Source file "' + chalk.cyan(filepath) + '" not found.');
return false;
}
else {
return true;
}
});
}
function loadJSON(path) {
if (!grunt.file.exists(path)) {
grunt.log.warn('JSON file "' + chalk.cyan(path) + '" not found.');
return false;
}
else {
return grunt.file.readJSON(path);
}
}
function handleOptions() {
// Defaults
function cfg() {
// Defaults.
var options = this.options({
verbose: false,
config: null,
display: {
access: ['public', 'private'],
alias: false,
watermark: true
},
groups: {
'undefined': 'Ungrouped'
},
package: null,
theme: 'default',
basePath: null,
force: false,
interactive: true
noUpdateNotifier: true
});
// If a config file is passed and found,
// its options will prevail over defauts.
if (options.config) {
var config = loadJSON(options.config);
// Instantiate a new SassDoc Logger.
var logger = new sassdoc.Logger(options.verbose);
if (config) {
options = _.assign(options, config);
}
}
// Load raw configuration.
var config = sassdoc.cfg.pre(options.config, logger);
// If a package path is passed try to load the file.
if (_.isString(options.package)) {
options.package = loadJSON(options.package);
}
// If options.package is not usable, delete it.
if (!_.isPlainObject(options.package) || _.isEmpty(options.package)) {
options = _.omit(options, 'package');
}
// Ensure that options take precedence over configuration values.
ensure(config, options);
// Enable SassDoc logger.
if (options.verbose) {
sassdoc.logger.enabled = true;
}
// Post process configuration.
sassdoc.cfg.post(config);
// Clean options not expected by SassDoc.
options = _.omit(options, ['verbose', 'config']);
return options;
return config;
}
grunt.registerMultiTask('sassdoc', 'Generates documentation', function () {
var done = this.async();
var target = this.target;
var options = handleOptions.call(this);
var config = cfg.call(this);
function compile(filePair) {
var src = validateSrc(filePair);
var dest = filePair.dest;
var src = filePair.orig.src;
var dest = filePair.orig.dest;

@@ -103,4 +50,2 @@ if (!src.length) {

src = src[0];
// Emit start event if anyone is listening.

@@ -111,3 +56,3 @@ if (grunt.event.listeners('sassdoc.start').length > 0) {

sassdoc.documentize(src, dest, options)
sassdoc.documentize(src, dest, config)
.then(function () {

@@ -122,4 +67,3 @@ grunt.log.ok('SassDoc documentation successfully generated.');

done();
})
.catch(function (err) {
}, function (err) {
grunt.log.error(err);

@@ -126,0 +70,0 @@ grunt.fail.warn('SassDoc documentation failed.');

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