Skip to content

Commit

Permalink
Initial CSSComb commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
garetht committed Jan 25, 2014
0 parents commit b4f14e6
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
node_modules
1 change: 1 addition & 0 deletions .npmignore
@@ -0,0 +1 @@
.gitignore
20 changes: 20 additions & 0 deletions LICENSE
@@ -0,0 +1,20 @@
The MIT License (MIT)

Copyright (c) 2014 garetht

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
4 changes: 4 additions & 0 deletions README.md
@@ -0,0 +1,4 @@
csscomb-brunch
==============

Gives Brunch workflows the ability to sort CSS properties.
40 changes: 40 additions & 0 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions package.json
@@ -0,0 +1,26 @@
{
"name": "csscomb-brunch",
"version": "1.7.0",
"description": "Gives Brunch workflows the ability to sort CSS properties.",
"main": "lib/index",
"scripts": {
"prepublish": "rm -f lib/* && coffee -cbo lib/ src/"
},
"repository": {
"type": "git",
"url": "git://github.com/garetht/csscomb-brunch.git"
},
"keywords": [
"brunch",
"csscomb"
],
"author": "Gareth Tan",
"license": "MIT",
"bugs": {
"url": "https://github.com/garetht/csscomb-brunch/issues"
},
"homepage": "https://github.com/garetht/csscomb-brunch",
"dependencies": {
"csscomb": "~2.0.4"
}
}
20 changes: 20 additions & 0 deletions src/index.coffee
@@ -0,0 +1,20 @@
Comb = require 'csscomb'

module.exports = class CsscombCompiler
brunchPlugin: yes
type: "stylesheet"
extension: "css"
pattern: /\.(?:css|scss|sass|less)$/

This comment has been minimized.

Copy link
@tonyganch

tonyganch Jan 31, 2014

CSScomb does not support sass syntax yet.


constructor: (@config) ->
{encoding} = @config.csscomb ? {encoding: 'zen'}
@comb = new Comb encoding

compile: ({data, path, map}, callback) ->
try @comb.processPath path
catch error
callback(error, {data, map})




0 comments on commit b4f14e6

Please sign in to comment.