0.8.3 • Published 8 years ago

inuit-scss-comment-parser v0.8.3

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

scss-comment-parser Build Status

Parse /// comments and extracts context from SCSS.

Note

This is a fork of the original SassDoc's SCSS parser. The only modification I made was to allow block comments, to try and use it with the comment style of inuitcss.

Thanks for the original authors for the great tool and @pascalduez for pointing me in this direction here.

Install

npm install --save scsscommentparser

Usage

var ScssCommentParser = require('scsscommentparser');

var annotations = {
  _: {
    alias: {
      'aliasTest': 'annotationTest'
    }
  },
  annotationTest: function ( commentLine ) {
    return 'Working';
  }
};

var parser = new ScssCommentParser( annotations );


var scss = /* Load Scss */
var comments = parser.parse ( scss );

console.log(comments);

Changelog

0.8.2 -> this fork only

  • Allow CSS block comments.

0.8.1

  • Fix CSS line numbers, expected by SassDoc.

0.8.0

  • Allow CSS context parsing.

0.7.0

  • Update to cdocparser@0.14.0

0.6.0

  • Update to cdocparser@0.13.0
  • Make changes needed for SassDoc 2.0

0.5.1-rc1

  • Update to cdocparser@0.5.0
  • Add support for configuration passed to the extractor.

0.5.0

  • Update to cdocparser@0.4.0
  • Add support for configuration passed to the extractor.

0.4.0

  • Update to cdocparser@0.3.0 supporting /// comments
  • Include a context.line with start, end value for each detected code part

0.3.2

  • Added context.code to type placeholder.

0.3.1

0.3.0

  • Add placeholder support (thanks to callum)

0.2.4

  • Remove first opening and last closing brace in context.code

0.2.3

  • Fixed wrong code extraction for function and mixin. (See #11)

0.2.2

  • Added context.code to type function and mixin containing the whole code.

0.2.1

  • Fix bug in detection of comment blocks

0.1.2

  • Update dependencys

0.1.1

  • Fix multiline annotations to include @

0.1.0

  • Initial release