4 changed files with 192 additions and 0 deletions
@ -0,0 +1,120 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
module.exports = function(grunt){ |
||||
|
|
||||
|
// Configurable paths
|
||||
|
var config = { |
||||
|
tmp: '.tmp', |
||||
|
base: 'couchpotato' |
||||
|
}; |
||||
|
|
||||
|
grunt.initConfig({ |
||||
|
|
||||
|
// Project settings
|
||||
|
config: config, |
||||
|
|
||||
|
// Make sure code styles are up to par and there are no obvious mistakes
|
||||
|
jshint: { |
||||
|
options: { |
||||
|
reporter: require('jshint-stylish'), |
||||
|
unused: false, |
||||
|
camelcase: false, |
||||
|
devel: true |
||||
|
}, |
||||
|
all: [ |
||||
|
'<%= config.base %>/{,**/}*.js' |
||||
|
] |
||||
|
}, |
||||
|
|
||||
|
// Compiles Sass to CSS and generates necessary files if requested
|
||||
|
sass: { |
||||
|
options: { |
||||
|
compass: true |
||||
|
}, |
||||
|
dist: { |
||||
|
files: [{ |
||||
|
expand: true, |
||||
|
cwd: '<%= config.base %>/styles', |
||||
|
src: ['*.scss'], |
||||
|
dest: '<%= config.tmp %>/styles', |
||||
|
ext: '.css' |
||||
|
}] |
||||
|
}, |
||||
|
server: { |
||||
|
files: [{ |
||||
|
expand: true, |
||||
|
cwd: '<%= config.base %>/', |
||||
|
src: ['**/*.scss'], |
||||
|
dest: '<%= config.tmp %>/styles', |
||||
|
ext: '.css' |
||||
|
}] |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// Add vendor prefixed styles
|
||||
|
autoprefixer: { |
||||
|
options: { |
||||
|
browsers: ['> 1%', 'Android >= 2.1', 'Chrome >= 21', 'Explorer >= 7', 'Firefox >= 17', 'Opera >= 12.1', 'Safari >= 6.0'] |
||||
|
}, |
||||
|
dist: { |
||||
|
files: [{ |
||||
|
expand: true, |
||||
|
cwd: '<%= config.tmp %>/styles/', |
||||
|
src: '{,**/}*.css', |
||||
|
dest: '<%= config.tmp %>/styles/' |
||||
|
}] |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// COOL TASKS ==============================================================
|
||||
|
watch: { |
||||
|
scss: { |
||||
|
files: ['**/*.{scss,sass}'], |
||||
|
tasks: ['sass:server', 'autoprefixer'], |
||||
|
options: { |
||||
|
'livereload': true |
||||
|
} |
||||
|
}, |
||||
|
js: { |
||||
|
files: [ |
||||
|
'<%= config.base %>/scripts/**/*.js' |
||||
|
], |
||||
|
tasks: ['jshint'], |
||||
|
options: { |
||||
|
'livereload': true |
||||
|
} |
||||
|
}, |
||||
|
livereload: { |
||||
|
options: { |
||||
|
livereload: 35729 |
||||
|
}, |
||||
|
files: [ |
||||
|
'<%= config.base %>/{,*/}*.html', |
||||
|
'<%= config.tmp %>/styles/{,*/}*.css', |
||||
|
'<%= config.base %>/react/{,*/}*.js', |
||||
|
'<%= config.base %>/images/{,*/}*' |
||||
|
] |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
concurrent: { |
||||
|
options: { |
||||
|
logConcurrentOutput: true |
||||
|
}, |
||||
|
tasks: ['sass:server', 'watch'] |
||||
|
} |
||||
|
|
||||
|
}); |
||||
|
|
||||
|
grunt.loadNpmTasks('grunt-contrib-jshint'); |
||||
|
//grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
|
grunt.loadNpmTasks('grunt-contrib-sass'); |
||||
|
//grunt.loadNpmTasks('grunt-contrib-cssmin');
|
||||
|
grunt.loadNpmTasks('grunt-contrib-watch'); |
||||
|
grunt.loadNpmTasks('grunt-autoprefixer'); |
||||
|
grunt.loadNpmTasks('grunt-concurrent'); |
||||
|
grunt.loadNpmTasks('grunt-contrib-concat'); |
||||
|
|
||||
|
grunt.registerTask('default', ['sass', 'concurrent']); |
||||
|
|
||||
|
}; |
@ -0,0 +1,45 @@ |
|||||
|
# First, require any additional compass plugins installed on your system. |
||||
|
# require 'zen-grids' |
||||
|
require 'susy' |
||||
|
# require 'breakpoint' |
||||
|
|
||||
|
|
||||
|
# Toggle this between :development and :production when deploying the CSS to the |
||||
|
# live server. Development mode will retain comments and spacing from the |
||||
|
# original Sass source and adds line numbering comments for easier debugging. |
||||
|
environment = :development |
||||
|
# environment = :development |
||||
|
|
||||
|
# In development, we can turn on the FireSass-compatible debug_info. |
||||
|
firesass = false |
||||
|
# firesass = true |
||||
|
|
||||
|
|
||||
|
# Location of the your project's resources. |
||||
|
|
||||
|
|
||||
|
# Set this to the root of your project. All resource locations above are |
||||
|
# considered to be relative to this path. |
||||
|
http_path = "/" |
||||
|
|
||||
|
# To use relative paths to assets in your compiled CSS files, set this to true. |
||||
|
# relative_assets = true |
||||
|
|
||||
|
|
||||
|
## |
||||
|
## You probably don't need to edit anything below this. |
||||
|
## |
||||
|
|
||||
|
sass_dir = "./" |
||||
|
css_dir = "./static/style_compiled" |
||||
|
|
||||
|
# You can select your preferred output style here (can be overridden via the command line): |
||||
|
# output_style = :expanded or :nested or :compact or :compressed |
||||
|
output_style = (environment == :development) ? :expanded : :compressed |
||||
|
|
||||
|
# To disable debugging comments that display the original location of your selectors. Uncomment: |
||||
|
# line_comments = false |
||||
|
|
||||
|
# Pass options to sass. For development, we turn on the FireSass-compatible |
||||
|
# debug_info if the firesass config variable above is true. |
||||
|
sass_options = (environment == :development && firesass == true) ? {:debug_info => true} : {} |
@ -0,0 +1,25 @@ |
|||||
|
{ |
||||
|
"name": "couchpotato_develop", |
||||
|
"repository": { |
||||
|
"type": "git", |
||||
|
"url": "" |
||||
|
}, |
||||
|
"scripts": { |
||||
|
"start": "grunt" |
||||
|
}, |
||||
|
"dependencies": { |
||||
|
}, |
||||
|
"devDependencies": { |
||||
|
"grunt": "~0.4.5", |
||||
|
"grunt-autoprefixer": "^2.0.0", |
||||
|
"grunt-concurrent": "~1.0.0", |
||||
|
"grunt-contrib-concat": "^0.5.0", |
||||
|
"grunt-contrib-cssmin": "~0.10.0", |
||||
|
"grunt-contrib-jshint": "~0.10.0", |
||||
|
"grunt-contrib-less": "~0.12.0", |
||||
|
"grunt-contrib-sass": "^0.8.1", |
||||
|
"grunt-contrib-uglify": "~0.6.0", |
||||
|
"grunt-contrib-watch": "~0.6.1", |
||||
|
"jshint-stylish": "^1.0.0" |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue