mirror of
https://github.com/MinimalBible/MinimalBible.github.io
synced 2024-12-21 06:08:19 -05:00
Add Grunt build script
This commit is contained in:
parent
4cb5b40d14
commit
eadc79e066
20
.jshintrc
Normal file
20
.jshintrc
Normal file
@ -0,0 +1,20 @@
|
||||
{
|
||||
"bitwise": true,
|
||||
"browser": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"eqnull": true,
|
||||
"es5": false,
|
||||
"esnext": true,
|
||||
"immed": true,
|
||||
"jquery": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"node": true,
|
||||
"strict": false,
|
||||
"trailing": false,
|
||||
"undef": true,
|
||||
"multistr": true,
|
||||
"expr": true
|
||||
}
|
107
Gruntfile.js
Normal file
107
Gruntfile.js
Normal file
@ -0,0 +1,107 @@
|
||||
'use strict';
|
||||
module.exports = function(grunt) {
|
||||
|
||||
grunt.initConfig({
|
||||
jshint: {
|
||||
options: {
|
||||
jshintrc: '.jshintrc'
|
||||
},
|
||||
all: [
|
||||
'Gruntfile.js',
|
||||
'assets/js/*.js',
|
||||
'assets/js/plugins/*.js',
|
||||
'!assets/js/scripts.min.js'
|
||||
]
|
||||
},
|
||||
recess: {
|
||||
dist: {
|
||||
options: {
|
||||
compile: true,
|
||||
compress: true
|
||||
},
|
||||
files: {
|
||||
'assets/css/main.min.css': [
|
||||
'assets/less/main.less'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
uglify: {
|
||||
dist: {
|
||||
files: {
|
||||
'assets/js/scripts.min.js': [
|
||||
'assets/js/plugins/*.js',
|
||||
'assets/js/_*.js'
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
imagemin: {
|
||||
dist: {
|
||||
options: {
|
||||
optimizationLevel: 7,
|
||||
progressive: true
|
||||
},
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'images/',
|
||||
src: '{,*/}*.{png,jpg,jpeg}',
|
||||
dest: 'images/'
|
||||
}]
|
||||
}
|
||||
},
|
||||
svgmin: {
|
||||
dist: {
|
||||
files: [{
|
||||
expand: true,
|
||||
cwd: 'images/',
|
||||
src: '{,*/}*.svg',
|
||||
dest: 'images/'
|
||||
}]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
less: {
|
||||
files: [
|
||||
'assets/less/*.less',
|
||||
'assets/less/bootstrap/*.less'
|
||||
],
|
||||
tasks: ['recess']
|
||||
},
|
||||
js: {
|
||||
files: [
|
||||
'<%= jshint.all %>'
|
||||
],
|
||||
tasks: ['jshint','uglify']
|
||||
}
|
||||
},
|
||||
clean: {
|
||||
dist: [
|
||||
'assets/css/main.min.css',
|
||||
'assets/js/scripts.min.js'
|
||||
]
|
||||
}
|
||||
});
|
||||
|
||||
// Load tasks
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
grunt.loadNpmTasks('grunt-contrib-jshint');
|
||||
grunt.loadNpmTasks('grunt-contrib-uglify');
|
||||
grunt.loadNpmTasks('grunt-contrib-watch');
|
||||
grunt.loadNpmTasks('grunt-recess');
|
||||
grunt.loadNpmTasks('grunt-contrib-imagemin');
|
||||
grunt.loadNpmTasks('grunt-svgmin');
|
||||
|
||||
// Register tasks
|
||||
grunt.registerTask('default', [
|
||||
'clean',
|
||||
'recess',
|
||||
'uglify',
|
||||
'imagemin',
|
||||
'svgmin'
|
||||
]);
|
||||
grunt.registerTask('dev', [
|
||||
'watch'
|
||||
]);
|
||||
|
||||
};
|
@ -34,7 +34,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<!-- For all browsers -->
|
||||
<link rel="stylesheet" href="{{ site.url }}/assets/css/main.css">
|
||||
<link rel="stylesheet" href="{{ site.url }}/assets/css/main.min.css">
|
||||
<!-- Webfonts -->
|
||||
<link href="http://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic" rel="stylesheet" type="text/css">
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
|
||||
<script>window.jQuery || document.write('<script src="{{ site.url }}/assets/js/vendor/jquery-1.9.1.min.js"><\/script>')</script>
|
||||
<script src="{{ site.url }}/assets/js/main.js"></script>
|
||||
<script src="{{ site.url }}/assets/js/scripts.min.js"></script>
|
||||
{% if site.google_analytics %}
|
||||
<!-- Asynchronous Google Analytics snippet -->
|
||||
<script>
|
||||
|
3664
assets/css/main.css
3664
assets/css/main.css
File diff suppressed because it is too large
Load Diff
25
assets/css/main.min.css
vendored
Normal file
25
assets/css/main.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
26
assets/js/_main.js
Normal file
26
assets/js/_main.js
Normal file
@ -0,0 +1,26 @@
|
||||
/*! Plugin options and other jQuery stuff */
|
||||
|
||||
// dl-menu options
|
||||
$(function() {
|
||||
$( '#dl-menu' ).dlmenu({
|
||||
animationClasses : { classin : 'dl-animate-in', classout : 'dl-animate-out' }
|
||||
});
|
||||
});
|
||||
|
||||
// FitVids options
|
||||
$(function() {
|
||||
$("article").fitVids();
|
||||
});
|
||||
|
||||
$(".close-menu").click(function () {
|
||||
$(".menu").toggleClass("disabled");
|
||||
$(".links").toggleClass("enabled");
|
||||
});
|
||||
|
||||
$(".about").click(function () {
|
||||
$("#about").css('display','block');
|
||||
});
|
||||
|
||||
$(".close-about").click(function () {
|
||||
$("#about").css('display','');
|
||||
});
|
1114
assets/js/main.js
1114
assets/js/main.js
File diff suppressed because it is too large
Load Diff
1
assets/js/scripts.min.js
vendored
Normal file
1
assets/js/scripts.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
25
package.json
Normal file
25
package.json
Normal file
@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "hpstr-theme",
|
||||
"author": "Michael Rose <michael@mademistakes.com>",
|
||||
"homepage": "http://mmistakes.github.io/hpstr-jekyll-theme/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mmistakes/hpstr-jekyll-theme.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/mmistakes/hpstr-jekyll-theme/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-jshint": "~0.6.3",
|
||||
"grunt-contrib-uglify": "~0.2.2",
|
||||
"grunt-contrib-watch": "~0.5.2",
|
||||
"grunt-recess": "~0.3.5",
|
||||
"grunt-contrib-imagemin": "~0.2.0",
|
||||
"grunt-svgmin": "~0.2.0"
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user