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.9.6 to 0.10.0

2

lib/filter-array/lib/syntax.js

@@ -83,3 +83,3 @@ 'use strict';

wrietName: {
writeName: {
description: 'If you want the file name to be different than the title, for instance setting up an index page.',

@@ -86,0 +86,0 @@ notes: 'There is no need to provide a file extension',

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

@@ -5,0 +5,0 @@ "author": {

live-guide
---
`live-guide` is a subset of Markdown that allows developers one place to create both documentation and a styleguide for their end users. **Simply write comments, get styleguides!**
**THIS IS VERY MUCH UNDER DEVELOPMENT, API IS SURE TO CHANGE**
## Example:
```css
/**
* ### Links
* Link do not need any special class names to match stylistically, however they should follow some convetions
* - links should direct users through the page
* - links should direct pages to outside pages or pages of content within the site structure
* - links **should not** be used to trigger user actions such as modals.
*
* @example html
* <a href="#">I am a link</a>
*/
a {
display: inline-block;
color: var(--accent);
text-decoration: none;
vertical-align: middle;
font-weight: 700;
border-bottom: 1px solid transparent;
}
Use as module:
a + a {
margin-top: 1vw;
}
a:hover {
border-bottom: 1px solid var(--primary-dk);
}
```
## Use as module:
```javascript

@@ -21,3 +50,43 @@ const styleguide = require('live-guide');

Use in command line:
### Options
##### input
**type:** `path`
**description:** Glob pattern to files to read comments from.
**required:** true
**default:** *none*
##### output
**type:** `path`
**description:** Where to export HTML files.
**required:** false
**default:** *./styleguide*
##### resources
**type:** `Array`
**description:** Path (relative or absolute) to files to import into styleguide examples
**required:** false
**default:** *none*
##### name
**type:** `String`
**description** name of style guide
**required:** false
**default:** *Styleguide*
## Use in command line:
```bash

@@ -41,7 +110,6 @@ $ npm install --global live-guide

## Module API
## Comments Syntax
#### @author
**Description:** Contribute the code to someone.
**Example:**

@@ -54,6 +122,4 @@ ```

#### @description
**Description:** Set a description for this section of the styleguide, generally used after an `@title`
**Example:**

@@ -66,3 +132,2 @@ ```

#### @example

@@ -73,3 +138,2 @@ **Description:** A code example, similar to writing code blocks in Markdown

`.*
**Example:**

@@ -88,3 +152,2 @@ ```

#### @skip

@@ -94,4 +157,2 @@ **Description:** Allows line to be skipped on output

#### @title

@@ -101,4 +162,2 @@ **Description:** The title of the component, module or API you are developing

#### @todo

@@ -108,4 +167,2 @@ **Description:** Let users know what needs to be done in this section of your styleguide

#### @url

@@ -115,9 +172,5 @@ **Description:** Add a link to the styleguide, automatically opens in a new tab

#### @wrietName
#### @writeName
**Description:** If you want the file name to be different than the title, for instance setting up an index page.
*There is no need to provide a file extension*
## Todo

@@ -124,0 +177,0 @@ - Log whats happening.

@@ -6,6 +6,6 @@ 'use strict';

syntaxAPI = require(path.resolve(__dirname, '../lib/filter-array/lib/syntax')),
readmeRegex = /## module api(.|\n)*## TODO/gi;
readmeRegex = /## comments syntax(.|\n)*## TODO/gi;
const syntaxString = function(key, obj) {
obj.description = obj.description ? `**Description:** ${obj.description}` : '';
obj.description = obj.description ? `**Description:** ${obj.description}\n` : '';
obj.notes = obj.notes ? `*${obj.notes}*\n` : '';

@@ -16,6 +16,3 @@ obj.example = obj.example ? `**Example:**\n\`\`\`\n${obj.example.join('\n\n')}\n\`\`\`` : '';

#### @${key}
${obj.description}
${obj.notes}
${obj.example}
`;
${obj.description}${obj.notes}${obj.example}`;

@@ -33,3 +30,3 @@ return retStr;

readme = readme.replace(readmeRegex, function() {
const start = '## Module API\n',
const start = '## Comments Syntax\n',
end = '## Todo';

@@ -36,0 +33,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