Permalink
Browse files

added Sass version of bootstrap to grunt (compiled into style.css for…

… development and application.min.css for production)
  • Loading branch information...
frederik committed Jun 15, 2014
1 parent 9da3bc8 commit 6e2db3b1a8b7050df4932605339ecc08b9467056
Showing with 5,374 additions and 91 deletions.
  1. +2 −1 .gitignore
  2. +15 −14 bower.json
  3. +3 −3 config/env/all.js
  4. +1 −2 config/env/production.js
  5. +33 −2 gruntfile.js
  6. +70 −68 package.json
  7. +5,201 −0 public/css/style.css
  8. +1 −1 public/dist/application.min.css
  9. +36 −0 public/dist/style.min.css
  10. +12 −0 style/style.scss
View
@@ -6,4 +6,5 @@ node_modules/
public/lib
app/tests/coverage/
.bower-*/
-.idea/
+.idea/
+.env
View
@@ -1,15 +1,16 @@
{
- "name": "meanjs",
- "version": "0.3.1",
- "description": "Fullstack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
- "dependencies": {
- "bootstrap": "~3",
- "angular": "~1.2",
- "angular-resource": "~1.2",
- "angular-animate": "~1.2",
- "angular-mocks": "~1.2",
- "angular-bootstrap": "~0.11.0",
- "angular-ui-utils": "~0.1.1",
- "angular-ui-router": "~0.2.10"
- }
-}
+ "name": "meanjs",
+ "version": "0.3.1",
+ "description": "Fullstack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
+ "dependencies": {
+ "bootstrap": "~3",
+ "angular": "~1.2",
+ "angular-resource": "~1.2",
+ "angular-animate": "~1.2",
+ "angular-mocks": "~1.2",
+ "angular-bootstrap": "~0.11.0",
+ "angular-ui-utils": "~0.1.1",
+ "angular-ui-router": "~0.2.10",
+ "bootstrap-sass-official": "~3.1.1+2"
+ }
+}
View
@@ -13,8 +13,7 @@ module.exports = {
assets: {
lib: {
css: [
- 'public/lib/bootstrap/dist/css/bootstrap.css',
- 'public/lib/bootstrap/dist/css/bootstrap-theme.css',
+ 'public/dist/style.css'
],
js: [
'public/lib/angular/angular.js',
@@ -25,7 +24,8 @@ module.exports = {
'public/lib/angular-bootstrap/ui-bootstrap-tpls.js'
]
},
- css: [
+ css: [
+ 'public/css/*.css',
'public/modules/**/css/*.css'
],
js: [
View
@@ -5,8 +5,7 @@ module.exports = {
assets: {
lib: {
css: [
- 'public/lib/bootstrap/dist/css/bootstrap.min.css',
- 'public/lib/bootstrap/dist/css/bootstrap-theme.min.css',
+ 'public/lib/bootstrap/dist/css/application.min.css'
],
js: [
'public/lib/angular/angular.min.js',
View
@@ -8,7 +8,8 @@ module.exports = function(grunt) {
clientViews: ['public/modules/**/views/*.html'],
clientJS: ['public/js/*.js', 'public/modules/**/*.js'],
clientCSS: ['public/modules/**/*.css'],
- mochaTests: ['app/tests/**/*.js']
+ mochaTests: ['app/tests/**/*.js'],
+ sass: 'style/{,*/}*.{scss,sass}'
};
// Project Configuration
@@ -47,6 +48,13 @@ module.exports = function(grunt) {
options: {
livereload: true
}
+ },
+ sass: {
+ files: watchFiles.sass,
+ tasks: ['sass:dev'],
+ options: {
+ livereload: true
+ }
}
},
jshint: {
@@ -135,6 +143,28 @@ module.exports = function(grunt) {
unit: {
configFile: 'karma.conf.js'
}
+ },
+ /**
+ * Sass
+ */
+ sass: {
+ dev: {
+ files: {
+ 'public/css/style.css': 'style/{,*/}*.{scss,sass}',
+ //next line is not necessary if you include your bootstrap into the *.scss files
+ //'public/css/bootstrap.css': 'public/lib/bootstrap-sass-official/vendor/assets/stylesheets/bootstrap.scss'
+ }
+ },
+ dist: {
+ //you could use this as part of the build job (instead of using cssmin)
+ options: {
+ style: 'compressed',
+ compass: false
+ },
+ files: {
+ 'public/dist/style.min.css': 'style/{,*/}*.{scss,sass}'
+ }
+ }
}
});
@@ -154,7 +184,7 @@ module.exports = function(grunt) {
});
// Default task(s).
- grunt.registerTask('default', ['lint', 'concurrent:default']);
+ grunt.registerTask('default', ['lint', 'sass:dev', 'concurrent:default']);
// Debug task.
grunt.registerTask('debug', ['lint', 'concurrent:debug']);
@@ -167,4 +197,5 @@ module.exports = function(grunt) {
// Test task.
grunt.registerTask('test', ['env:test', 'mochaTest', 'karma:unit']);
+
};
View
@@ -1,69 +1,71 @@
{
- "name": "meanjs",
- "description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
- "version": "0.3.1",
- "private": false,
- "author": "https://github.com/meanjs/mean/graphs/contributors",
- "repository": {
- "type": "git",
- "url": "https://github.com/meanjs/mean.git"
- },
- "engines": {
- "node": "0.10.x",
- "npm": "1.4.x"
- },
- "scripts": {
- "start": "grunt",
- "test": "grunt test",
- "postinstall": "bower install --config.interactive=false"
- },
- "dependencies": {
- "express": "~4.2.0",
- "express-session": "~1.1.0",
- "body-parser": "~1.2.0",
- "cookie-parser": "~1.1.0",
- "compression": "~1.0.1",
- "method-override": "~1.0.0",
- "morgan": "~1.1.0",
- "connect-mongo": "~0.4.0",
- "connect-flash": "~0.1.1",
- "helmet": "~0.2.1",
- "consolidate": "~0.10.0",
- "swig": "~1.3.2",
- "mongoose": "~3.8.8",
- "passport": "~0.2.0",
- "passport-local": "~1.0.0",
- "passport-facebook": "~1.0.2",
- "passport-twitter": "~1.0.2",
- "passport-linkedin": "~0.1.3",
- "passport-google-oauth": "~0.1.5",
- "lodash": "~2.4.1",
- "forever": "~0.11.0",
- "bower": "~1.3.1",
- "grunt-cli": "~0.1.13",
- "glob": "~3.2.9"
- },
- "devDependencies": {
- "supertest": "~0.12.1",
- "should": "~3.3.1",
- "grunt-env": "~0.4.1",
- "grunt-node-inspector": "~0.1.3",
- "grunt-contrib-watch": "~0.6.1",
- "grunt-contrib-jshint": "~0.10.0",
- "grunt-contrib-csslint": "^0.2.0",
- "grunt-ngmin": "0.0.3",
- "grunt-contrib-uglify": "~0.4.0",
- "grunt-contrib-cssmin": "~0.9.0",
- "grunt-nodemon": "~0.2.1",
- "grunt-concurrent": "~0.5.0",
- "grunt-mocha-test": "~0.10.0",
- "grunt-karma": "~0.8.2",
- "load-grunt-tasks": "~0.4.0",
- "karma": "~0.12.0",
- "karma-jasmine": "~0.2.1",
- "karma-coverage": "~0.2.0",
- "karma-chrome-launcher": "~0.1.2",
- "karma-firefox-launcher": "~0.1.3",
- "karma-phantomjs-launcher": "~0.1.2"
- }
-}
+ "name": "meanjs",
+ "description": "Full-Stack JavaScript with MongoDB, Express, AngularJS, and Node.js.",
+ "version": "0.3.1",
+ "private": false,
+ "author": "https://github.com/meanjs/mean/graphs/contributors",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/meanjs/mean.git"
+ },
+ "engines": {
+ "node": "0.10.x",
+ "npm": "1.4.x"
+ },
+ "scripts": {
+ "start": "grunt",
+ "test": "grunt test",
+ "postinstall": "bower install --config.interactive=false"
+ },
+ "dependencies": {
+ "express": "~4.2.0",
+ "express-session": "~1.1.0",
+ "body-parser": "~1.2.0",
+ "cookie-parser": "~1.1.0",
+ "compression": "~1.0.1",
+ "method-override": "~1.0.0",
+ "morgan": "~1.1.0",
+ "connect-mongo": "~0.4.0",
+ "connect-flash": "~0.1.1",
+ "helmet": "~0.2.1",
+ "consolidate": "~0.10.0",
+ "swig": "~1.3.2",
+ "mongoose": "~3.8.8",
+ "passport": "~0.2.0",
+ "passport-local": "~1.0.0",
+ "passport-facebook": "~1.0.2",
+ "passport-twitter": "~1.0.2",
+ "passport-linkedin": "~0.1.3",
+ "passport-google-oauth": "~0.1.5",
+ "lodash": "~2.4.1",
+ "forever": "~0.11.0",
+ "bower": "~1.3.1",
+ "grunt-cli": "~0.1.13",
+ "glob": "~3.2.9",
+ "dotenv": "^0.2.8",
+ "grunt-contrib-sass": "^0.7.3"
+ },
+ "devDependencies": {
+ "supertest": "~0.12.1",
+ "should": "~3.3.1",
+ "grunt-env": "~0.4.1",
+ "grunt-node-inspector": "~0.1.3",
+ "grunt-contrib-watch": "~0.6.1",
+ "grunt-contrib-jshint": "~0.10.0",
+ "grunt-contrib-csslint": "^0.2.0",
+ "grunt-ngmin": "0.0.3",
+ "grunt-contrib-uglify": "~0.4.0",
+ "grunt-contrib-cssmin": "~0.9.0",
+ "grunt-nodemon": "~0.2.1",
+ "grunt-concurrent": "~0.5.0",
+ "grunt-mocha-test": "~0.10.0",
+ "grunt-karma": "~0.8.2",
+ "load-grunt-tasks": "~0.4.0",
+ "karma": "~0.12.0",
+ "karma-jasmine": "~0.2.1",
+ "karma-coverage": "~0.2.0",
+ "karma-chrome-launcher": "~0.1.2",
+ "karma-firefox-launcher": "~0.1.3",
+ "karma-phantomjs-launcher": "~0.1.2"
+ }
+}
Oops, something went wrong.

3 comments on commit 6e2db3b

@manuelescamilla

This comment has been minimized.

Show comment
Hide comment
@manuelescamilla

manuelescamilla Dec 25, 2014

Thanks for sharing I'll try it.

Thanks for sharing I'll try it.

@fedepeon

This comment has been minimized.

Show comment
Hide comment
@fedepeon

fedepeon Jan 14, 2015

Thanks a lot !. You save me a precious time

Thanks a lot !. You save me a precious time

@frederik

This comment has been minimized.

Show comment
Hide comment
@frederik

frederik Jan 14, 2015

Owner

Glad it's useful

Owner

frederik replied Jan 14, 2015

Glad it's useful

Please sign in to comment.