-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
41 changed files
with
348 additions
and
481 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ language: node_js | |
node_js: | ||
- 0.6 | ||
script: | ||
- "node test" | ||
- "node tests/main-test" | ||
notifications: | ||
email: | ||
- [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
(function(){ | ||
|
||
var log = require('./console'), | ||
fs = require('fs'), | ||
path = require('path'), | ||
less = require('less'), | ||
args = process.argv.slice(2); | ||
|
||
log('i', 'Compiling CSS to ' + args + ' folder'); | ||
|
||
fs.readFile('../less/bootstrap.less', function(e, file){ | ||
if(e){ | ||
log('e', 'Reading .less file failed: ' + e); | ||
} else { | ||
var file_string = file.toString(), | ||
options = { | ||
paths: ['../less'], | ||
outputDir: args.toString(), | ||
optimization: 1, | ||
filename: 'bootstrap.less', | ||
compress: true, | ||
yuicompress: true | ||
}; | ||
|
||
log('i', '.less read'); | ||
|
||
options.outputfile = options.filename.split(".less")[0] + (options.compress ? ".min" : "") + ".css"; | ||
options.outputDir = path.resolve( process.cwd(), options.outputDir) + "/"; | ||
ensureDirectory(options.outputDir); | ||
|
||
less.render(file_string, options, function(err, output){ | ||
if(err){ | ||
log('e', 'Compilation failed: ' + err); | ||
} else { | ||
log('i', '.less compiled'); | ||
|
||
fs.writeFile(options.outputDir + options.outputfile, output.css, function(error){ | ||
if(error){ | ||
log('e', 'writing file failed: ' + error); | ||
} else { | ||
log('i', 'Compilation complete'); | ||
} | ||
}); | ||
} | ||
}); | ||
} | ||
}); | ||
|
||
function ensureDirectory(filepath) { | ||
var dir = path.dirname(filepath), | ||
existsSync = fs.existsSync || path.existsSync; | ||
if (!existsSync(dir)) { fs.mkdirSync(dir); } | ||
}; | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
killall node | ||
npm install | ||
cd './build' | ||
node 'compile-css.js' $1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.