Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. var getCommentsProcessor = require("./comments-processor");
  2.  
  3. module.exports = {
  4. install: function(less, pluginManager) {
  5. var CommentsProcessor = getCommentsProcessor(less);
  6. pluginManager.addPostProcessor(new CommentsProcessor());
  7. }
  8. };
  9.  
  10. var cleaner = require('./clean-css-master/lib/text/comments-processor');
  11.  
  12. module.exports = function(less) {
  13. function CommentProcessor(options) {
  14. this.options = options || {};
  15. };
  16.  
  17. CommentProcessor.prototype = {
  18. process: function (css) {
  19. var commentsProcessor = new cleaner('*', false);
  20. css = commentsProcessor.escape(css);
  21. return css;
  22. }
  23. };
  24.  
  25. return CommentProcessor;
  26. };
  27.  
  28. lessc --plugin=./less-plugin-remove-comments.js index.less
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement