Skip to content

Commit

Permalink
Now using Stylus instead of SASS, to work around node-sass issue (sas…
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddentao committed May 30, 2014
1 parent 31905c7 commit 6c0b209
Show file tree
Hide file tree
Showing 17 changed files with 555 additions and 452 deletions.
27 changes: 13 additions & 14 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
test: 'test',
bower: 'public/bower_components',
src: {
sass: 'public/src/sass',
stylus: 'public/src/stylus',
js: 'public/src/js'
},
build: {
Expand All @@ -25,9 +25,9 @@
files: ['<%= config.src.js %>/{,*/}{,*/}*.js'],
tasks: ['js']
},
sass: {
files: ['<%= config.src.sass %>/{,*/}{,*/}*.scss'],
tasks: ['sass']
stylus: {
files: ['<%= config.src.stylus %>/{,*/}{,*/}*.styl'],
tasks: ['stylus']
}
},
jshint: {
Expand All @@ -39,14 +39,13 @@
'<%= config.backend %>/{,*/}{,*/}{,*/}*.js'
]
},
sass: {
stylus: {
build: {
options: {
noLineComments: true,
outputStyle: 'compressed'
compress: true,
},
files: {
'<%= config.build.css %>/style.css': '<%= config.src.sass %>/style.scss'
'<%= config.build.css %>/style.css': '<%= config.src.stylus %>/style.styl'
}
}
},
Expand All @@ -57,10 +56,10 @@
},
src: [
'<%= config.bower %>/jquery/dist/jquery.js',
'<%= config.bower %>/sass-bootstrap/js/transition.js',
'<%= config.bower %>/sass-bootstrap/js/dropdown.js',
'<%= config.bower %>/sass-bootstrap/js/collapse.js',
'<%= config.bower %>/sass-bootstrap/js/modal.js',
'<%= config.bower %>/bootstrap-stylus/js/transition.js',
'<%= config.bower %>/bootstrap-stylus/js/dropdown.js',
'<%= config.bower %>/bootstrap-stylus/js/collapse.js',
'<%= config.bower %>/bootstrap-stylus/js/modal.js',
],
dest: '<%= config.build.js %>/base.js'
},
Expand Down Expand Up @@ -95,7 +94,7 @@
{
expand: true,
flatten: true,
src: '<%= config.bower %>/font-awesome/fonts/*',
src: '<%= config.bower %>/font-awesome-stylus/fonts/*',
dest: '<%= config.build.fonts %>/',
filter: 'isFile'
}
Expand Down Expand Up @@ -145,7 +144,7 @@

grunt.registerTask('build', [
'jshint',
'sass',
'stylus',
'copy',
'js',
'test'
Expand Down
11 changes: 4 additions & 7 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@
],
"license": "MIT",
"private": true,
"dependencies": {
"history.js": "~1.8.0",
"jquery-form": "~3.46.0"
},
"devDependencies": {
"font-awesome": "~4.0.3",
"bootstrap": "~3.1.1",
"sass-bootstrap": "~3.0.2"
"history.js": "~1.8.0",
"jquery-form": "~3.46.0",
"font-awesome-stylus": "*",
"bootstrap-stylus": "~3.1.1"
}
}
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "melkor",
"description": "Simple, fast wiki powered by Node.js and Git",
"version": "1.2.3",
"version": "1.2.4",
"author": {
"name": "Ramesh Nair",
"email": "ram@hiddentao.com"
Expand Down Expand Up @@ -34,7 +34,6 @@
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-watch": "~0.6.1",
"grunt-sass": "~0.12.1",
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-uglify": "~0.4.0",
"shelljs": "~0.2.6",
Expand All @@ -43,7 +42,8 @@
"supertest": "~0.10.0",
"lodash": "~2.4.1",
"cheerio": "~0.15.0",
"grunt-mocha": "~0.4.10"
"grunt-mocha": "~0.4.10",
"grunt-contrib-stylus": "~0.16.0"
},
"repository": {
"type": "git",
Expand Down
6 changes: 5 additions & 1 deletion public/build/css/style.css

Large diffs are not rendered by default.

Binary file modified public/build/fonts/FontAwesome.otf
Binary file not shown.
Binary file modified public/build/fonts/fontawesome-webfont.eot
Binary file not shown.
848 changes: 469 additions & 379 deletions public/build/fonts/fontawesome-webfont.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified public/build/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file modified public/build/fonts/fontawesome-webfont.woff
Binary file not shown.
2 changes: 1 addition & 1 deletion public/build/js/base.js

Large diffs are not rendered by default.

32 changes: 0 additions & 32 deletions public/src/sass/_bootstrap.scss

This file was deleted.

12 changes: 0 additions & 12 deletions public/src/sass/_variables.scss

This file was deleted.

32 changes: 32 additions & 0 deletions public/src/stylus/_bootstrap.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// Core variables and mixins
@import "../../bower_components/bootstrap-stylus/stylus/variables";
@import "../../bower_components/bootstrap-stylus/stylus/mixins";

// Reset
@import "../../bower_components/bootstrap-stylus/stylus/normalize";
@import "../../bower_components/bootstrap-stylus/stylus/print";

// Core CSS
@import "../../bower_components/bootstrap-stylus/stylus/scaffolding";
@import "../../bower_components/bootstrap-stylus/stylus/type";
@import "../../bower_components/bootstrap-stylus/stylus/code";
@import "../../bower_components/bootstrap-stylus/stylus/grid";
@import "../../bower_components/bootstrap-stylus/stylus/tables";
@import "../../bower_components/bootstrap-stylus/stylus/forms";
@import "../../bower_components/bootstrap-stylus/stylus/buttons";

// Components
@import "../../bower_components/bootstrap-stylus/stylus/component-animations";
@import "../../bower_components/bootstrap-stylus/stylus/dropdowns";
@import "../../bower_components/bootstrap-stylus/stylus/button-groups";
@import "../../bower_components/bootstrap-stylus/stylus/modals";
@import "../../bower_components/bootstrap-stylus/stylus/navs";
@import "../../bower_components/bootstrap-stylus/stylus/navbar";
@import "../../bower_components/bootstrap-stylus/stylus/labels";
@import "../../bower_components/bootstrap-stylus/stylus/alerts";
@import "../../bower_components/bootstrap-stylus/stylus/close";
@import "../../bower_components/bootstrap-stylus/stylus/wells";

// Utility classes
@import "../../bower_components/bootstrap-stylus/stylus/utilities";
@import "../../bower_components/bootstrap-stylus/stylus/responsive-utilities";
12 changes: 12 additions & 0 deletions public/src/stylus/_fonts.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@import "../../bower_components/font-awesome-stylus/stylus/variables"
@import "../../bower_components/font-awesome-stylus/stylus/mixins"
@import "../../bower_components/font-awesome-stylus/stylus/path"
@import "../../bower_components/font-awesome-stylus/stylus/core"
@import "../../bower_components/font-awesome-stylus/stylus/larger"
@import "../../bower_components/font-awesome-stylus/stylus/fixed-width"
@import "../../bower_components/font-awesome-stylus/stylus/list"
@import "../../bower_components/font-awesome-stylus/stylus/bordered-pulled"
@import "../../bower_components/font-awesome-stylus/stylus/spinning"
// @import "../../bower_components/font-awesome-stylus/stylus/rotated-flipped"
@import "../../bower_components/font-awesome-stylus/stylus/stacked"
@import "../../bower_components/font-awesome-stylus/stylus/icons"
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ Copied from highlight.js zenburn theme
*/

pre code {
display: block; padding: 0.5em;
display: block;
padding: 0.5em;
background: #3F3F3F;
color: #DCDCDC;
}
Expand Down
12 changes: 12 additions & 0 deletions public/src/stylus/_variables.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// font-awesome

$fa-font-path = "../fonts" !default;

// bootstrap

$brand-primary = #428bca;
$brand-success = #5cb85c;
$brand-warning = #f0ad4e;
$brand-danger = #d9534f;
$brand-info = #5bc0de;

4 changes: 2 additions & 2 deletions public/src/sass/style.scss → public/src/stylus/style.styl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "_variables";
@import "_bootstrap";
@import "_highlight";
@import "../../bower_components/font-awesome/scss/font-awesome";
@import "_fonts";


a i span {
Expand All @@ -27,7 +27,7 @@ main {
}

.pageHeader {
@include clearfix();
clearfix();

.actions {
float: right;
Expand Down

0 comments on commit 6c0b209

Please sign in to comment.