Socket
Socket
Sign inDemoInstall

live-guide

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

live-guide - npm Package Compare versions

Comparing version 0.10.2 to 0.11.0

5

bin/app.js

@@ -13,2 +13,4 @@ #!/usr/bin/env node

.describe('name', 'name for the style guide or product')
.alias('syntax', 's')
.describe('syntax', 'add or override syntax filters to our main parser, this preforms a deepmerge')
//.alias('c', 'config')

@@ -27,5 +29,6 @@ //.alias('t', 'template')

resources: cliOptions.resource || [],
name: cliOptions.name || 'Styleguide'
name: cliOptions.name || 'Styleguide',
syntax: cliOptions.syntax || undefined
}
require('../index.js')(options);

4

lib/filter-array/index.js
'use strict';
const deepMerge = require('deepmerge');
const filterComments = (obj, syntax) => {
syntax = syntax || require('./lib/syntax');
syntax = deepMerge(require('./lib/syntax'), syntax);

@@ -6,0 +8,0 @@ let keys = Object.keys(syntax);

@@ -5,5 +5,7 @@ 'use strict';

const filterRawString = (cssData) => {
const filterRawString = function(cssData) {
const options = this;
cssData.forEach((obj) => {
filterArray(obj);
filterArray(obj, options.syntax);
});

@@ -10,0 +12,0 @@

'use strict';
// Node / NPM Modules;
const chalk = require('chalk');
const chalk = require('chalk'),
fs = require('fs-extra');

@@ -28,2 +29,3 @@ // LOCAL MODULES

options.resources = options.resources || [];
options.syntax = options.syntax ? require(options.syntax) : {};

@@ -41,3 +43,3 @@ return Promise.resolve(resolveDirs(options.input))

.then(extractComments)
.then(filterRawString)
.then(filterRawString.bind(options))
.then(reduceObjects)

@@ -44,0 +46,0 @@ .then(copyResources.bind(options))

{
"name": "live-guide",
"version": "0.10.2",
"version": "0.11.0",
"description": "Generate style guides based on commented style sheets.",

@@ -38,2 +38,3 @@ "author": {

"concat": "^1.0.0",
"deepmerge": "^0.2.10",
"fs-extra": "^0.24.0",

@@ -40,0 +41,0 @@ "glob": "^5.0.14",

@@ -95,2 +95,13 @@ live-guide

##### Syntax
**type:** `Module`
**description** Additional syntax parsers that will be merged with the default syntaxes. This preforms a `deepmerge` so you can override existing functionality.
**required:** false
**default:** `{}`
---
## Use in command line:

@@ -111,2 +122,3 @@ ```shell

--name, -n name for the style guide or product
--syntax, -s add or override syntax filters to our main parser, this preforms a deepmerge
--help, -h Show help [boolean]

@@ -113,0 +125,0 @@

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