Skip to content
This repository has been archived by the owner on Jan 17, 2022. It is now read-only.

Commit

Permalink
Adding sass support
Browse files Browse the repository at this point in the history
  • Loading branch information
ffffranklin committed Aug 20, 2014
1 parent 0d22ffc commit b058e2e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 8 deletions.
1 change: 1 addition & 0 deletions app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ TumblrGenerator.prototype.createThemr = function createthemr() {
};
TumblrGenerator.prototype.demoTheme = function demotheme() {
this.copy('theme.tumblr', 'app/theme.tumblr');
this.copy('jquery-1.6.4.min.js', 'app/theme/scripts/jquery-1.6.4.min.js');
this.copy('theme.scss', 'app/theme/styles/main.scss');
this.copy('theme.js', 'app/theme/scripts/main.js');
};
28 changes: 23 additions & 5 deletions app/templates/Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,30 @@ module.exports = function(grunt) {
watch: {
scripts: {
files: [
'**/*.js',
'**/*.tumblr',
'**/*.css'
'app/theme/scripts/*.js',
'app/theme.tumblr',
],
options:{
livereload: true
}
},
styles: {
files: ['app/theme/styles/*.scss'],
tasks: ['sass'],
options:{
livereload: true
}
}
},
sass: {
dist: {
files: [{
expand: true,
cwd: 'app/theme/styles',
src: ['*.scss'],
dest: 'app/theme/styles',
ext: '.css'
}]
}
},
connect: {
Expand All @@ -30,7 +47,8 @@ module.exports = function(grunt) {
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-open');
grunt.registerTask('default', ['server'])
grunt.registerTask('server', ['connect', 'open', 'watch'])
grunt.registerTask('default', ['server']);
grunt.registerTask('server', ['sass', 'connect', 'open', 'watch']);
};
1 change: 1 addition & 0 deletions app/templates/_package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.0.0",
"dependencies": {},
"devDependencies": {
"grunt-contrib-sass": "^0.7.4",
"grunt-contrib-watch": "~0.5.3",
"grunt": "~0.4.2",
"grunt-contrib-connect": "~0.5.0",
Expand Down
6 changes: 3 additions & 3 deletions app/templates/theme.tumblr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{block:tumblrThemr}
<link rel="stylesheet" href="themes/demo/demo.css" type="text/css" media="screen"/>
<link rel="stylesheet" href="theme/styles/main.css" type="text/css" media="screen"/>
<style type="text/css">{CustomCSS}</style>

<div id="wrapper">
Expand Down Expand Up @@ -192,6 +192,6 @@
</div>
<div class="clear"></div>
</div>
<script type="text/javascript" src="themes/demo/jquery-1.5.1.min.js"></script>
<script type="text/javascript" src="themes/demo/demo.js"></script>
<script type="text/javascript" src="theme/scripts/jquery-1.6.4.min.js"></script>
<script type="text/javascript" src="theme/scripts/main.js"></script>
{/block:tumblrThemr}

0 comments on commit b058e2e

Please sign in to comment.