-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added grunt for compiling LESS and auto-prefixing CSS
- Loading branch information
Showing
12 changed files
with
108 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
## Directory-based project format | ||
.idea/ | ||
|
||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
var path = require('path'); | ||
|
||
|
||
var appContext = { | ||
paths: { | ||
scripts: { | ||
|
||
}, | ||
styles: { | ||
root: './assets/styles/' | ||
} | ||
} | ||
}; | ||
|
||
module.exports = function(grunt) { | ||
|
||
var tasks = { | ||
styles: ['less', 'autoprefixer'], | ||
watch: ['watch'], | ||
all: ['less', 'autoprefixer'] | ||
}; | ||
tasks.all = [].concat(tasks.styles, tasks.scripts); | ||
|
||
grunt.initConfig({ | ||
pkg: grunt.file.readJSON('package.json'), | ||
|
||
less: { | ||
options: { | ||
compress: true, | ||
sourceMap: true, | ||
sourceMapFilename: appContext.paths.styles.root + 'site.css.map' | ||
}, | ||
files: { | ||
src: [ appContext.paths.styles.root + 'site.less' ], | ||
dest: appContext.paths.styles.root + 'site.css' | ||
} | ||
}, | ||
|
||
autoprefixer: { | ||
|
||
options: { | ||
browsers: ['last 8 versions', 'ie 8', 'ie 9'] | ||
}, | ||
|
||
single_file: { | ||
options: {}, | ||
src: appContext.paths.styles.root + 'site.css', | ||
dest: appContext.paths.styles.root + 'site.css' | ||
}, | ||
sourcemap: { | ||
options: { | ||
map: true | ||
} | ||
} | ||
}, | ||
watch: { | ||
css: { | ||
files: '**/*.less', | ||
tasks: tasks.styles | ||
} | ||
} | ||
}); | ||
|
||
grunt.loadNpmTasks('grunt-contrib-less'); | ||
grunt.loadNpmTasks('grunt-autoprefixer'); | ||
grunt.loadNpmTasks('grunt-contrib-watch'); | ||
|
||
|
||
grunt.registerTask('styles', tasks.styles); | ||
grunt.registerTask('watcher', tasks.watch); | ||
grunt.registerTask('default', tasks.all); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
@-webkit-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } | ||
@-moz-keyframes fadeIn { from { opacity:0; } to { opacity:1; } } | ||
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } } | ||
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } } | ||
|
||
.animation-fade-in { | ||
// make things invisible upon start | ||
opacity: 0; | ||
|
||
// call our keyframe named fadeIn, use animation ease-in and repeat it only 1 time | ||
.animation(fadeIn ease-in 1); | ||
animation: fadeIn ease-in 1; | ||
|
||
// this makes sure that after animation is done we remain at the last keyframe value (opacity: 1) | ||
.animation-fill-mode(forwards); | ||
animation-fill-mode: forwards; | ||
|
||
.animation-duration(0.5s); | ||
animation-duration: 0.5s; | ||
} | ||
|
||
.animation-delay-1 { | ||
.animation-delay(0.7s); | ||
animation-delay: 0.7s; | ||
} | ||
.animation-delay-2 { | ||
.animation-delay(1.2s); | ||
animation-delay: 1.2s; | ||
} | ||
.animation-delay-3 { | ||
.animation-delay(1.6s); | ||
animation-delay: 1.6s; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
html { | ||
font-family: @base-font-family; | ||
.text-size-adjust(100%); | ||
text-size-adjust: 100%; | ||
} | ||
|
||
img { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
// EXTENDED RESETS | ||
*, *:before, *:after { | ||
.box-sizing(border-box); | ||
box-sizing: border-box; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
@import "vendors.less"; | ||
@import "utilities.less"; | ||
@import "grid.less"; | ||
@import "nav.less"; | ||
|
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "keithdaulton.com", | ||
"version": "0.0.1", | ||
"description": "Parsonal website of Keith Daulton", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/d13/keithdaulton.com.git" | ||
}, | ||
"author": "Keith Daulton", | ||
"private": true, | ||
"scripts": { | ||
"build": "grunt all" | ||
}, | ||
"devDependencies": { | ||
"grunt": "^0.4.5", | ||
"grunt-autoprefixer": "^2.2.0", | ||
"grunt-contrib-less": "^1.0.0", | ||
"grunt-contrib-watch": "^0.6.1" | ||
} | ||
} |