Skip to content
Browse files

added main g-p css less compile.

  • Loading branch information...
1 parent 38a2ea4 commit 361d670d5abe4a949cf4d1016bf78024f6c8dd6c @mikevalstar committed
Showing with 22 additions and 3 deletions.
  1. +1 −0 .gitignore
  2. +19 −3 app.js
  3. +2 −0 style/g-p.less
View
1 .gitignore
@@ -1,5 +1,6 @@
# Compiled Files
public/css/bootstrap.css
+public/css/css.css
# Included packages
node_modules
View
22 app.js
@@ -32,7 +32,10 @@ app.configure('production', function(){
});
// Build (Stylesheets)
-var lessParser = new(less.Parser)({
+var lessParser1 = new(less.Parser)({
+ paths: ['.', './style'], // Specify search paths for @import directives
+});
+var lessParser2 = new(less.Parser)({
paths: ['.', './style'], // Specify search paths for @import directives
});
@@ -40,15 +43,28 @@ var lessBootstrapFile = path.join(__dirname, 'style/bootstrap.less');
var cssBootstrapFile = path.join(__dirname, 'public/css/bootstrap.css');
fs.readFile(lessBootstrapFile, 'utf8', function (e, data) {
- lessParser.parse(data, function (e, tree) {
+ lessParser1.parse(data, function (e, tree) {
//tree.toCSS({ compress: true }); // Minify CSS output
- fs.writeFile(cssBootstrapFile,tree.toCSS(), function (err) {
+ fs.writeFile(cssBootstrapFile, tree.toCSS(), function (err) {
if (err) throw err;
console.log(cssBootstrapFile + ' Written to disk!');
});
});
});
+var lessGPFile = path.join(__dirname, 'style/g-p.less');
+var cssGPFile = path.join(__dirname, 'public/css/css.css');
+
+fs.readFile(lessGPFile, 'utf8', function (e, data) {
+ lessParser2.parse(data, function (e, tree) {
+ //tree.toCSS({ compress: true }); // Minify CSS output
+ fs.writeFile(cssGPFile, tree.toCSS(), function (err) {
+ if (err) throw err;
+ console.log(cssGPFile + ' Written to disk!');
+ });
+ });
+});
+
// Routes
app.get('/', routes.index);
View
2 style/g-p.less
@@ -0,0 +1,2 @@
+// Core variables from twitter bootstrap
+@import "variables.less";

0 comments on commit 361d670

Please sign in to comment.
Something went wrong with that request. Please try again.