Commit 7808a4b7 authored by Julien Fastré's avatar Julien Fastré

improve site & tasks

parent 4b406107
bower_components
node_modules
#should be generated by grunt tasks
website/js/*
website/css/*
website/img/*
website/fonts/*
src/js/all.js
src/js/bootstrap.js
temp/*
#used by deploy task
.ftppass
sftpCache.json
......@@ -8,6 +8,7 @@ module.exports = function(grunt) {
'js': '<%= website.folders.web %>/js',
'bower': './bower_components',
'src': './src',
'temp': './temp',
'less': '<%= website.folders.src %>/less'
}
},
......@@ -60,21 +61,65 @@ module.exports = function(grunt) {
}
},
concat: {
bootstrap: {
dest: '<%= website.folders.temp %>/js/bootstrap.js',
src: [
//'<%= website.folders.bower %>/bootstrap/js/transition.js',
//'<%= website.folders.bower %>/bootstrap/js/alert.js',
//'<%= website.folders.bower %>/bootstrap/js/button.js',
//'<%= website.folders.bower %>/bootstrap/js/carousel.js',
//'<%= website.folders.bower %>/bootstrap/js/collapse.js',
//'<%= website.folders.bower %>/bootstrap/js/dropdown.js',
//'<%= website.folders.bower %>/bootstrap/js/modal.js',
'<%= website.folders.bower %>/bootstrap/js/tooltip.js',
'<%= website.folders.bower %>/bootstrap/js/popover.js',
//'<%= website.folders.bower %>/bootstrap/js/scrollspy.js',
'<%= website.folders.bower %>/bootstrap/js/tab.js',
//'<%= website.folders.bower %>/bootstrap/js/affix.js'
]
},
jquery_bootstrap: {
dest: '<%= website.folders.temp %>/js/all.js',
src: [
'<%= website.folders.bower %>/jquery/dist/jquery.js',
'<%= website.folders.temp %>/js/bootstrap.js'
]
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'<%= website.folders.js %>/all.js':
'<%= website.folders.js %>/all.min.js':
[
'<%= website.folders.bower %>/jquery/dist/js/jquery.js',
'<%= website.folders.bower %>/bootstrap/dist/js/bootstrap.js'
'<%= website.folders.temp %>/js/all.js'
]
}
}
},
'sftp-deploy': {
build: {
auth: {
host: 'srv0.champs-libres.coop',
port: 22,
authKey: 'chill.social'
},
cache: 'sftpCache.json',
src: '<%= website.folders.web %>',
dest: '/srv/www/chill.social',
exclusions: ['/path/to/source/folder/**/.DS_Store', '/path/to/source/folder/**/Thumbs.db', 'dist/tmp'],
serverSep: '/',
concurrency: 4,
progress: true
}
},
watch: {
files: ['<%= website.folders.less %>/*.less'],
tasks: ['less']
......@@ -87,9 +132,12 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-bower-task');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-sftp-deploy');
grunt.registerTask('default', ['uglify', 'bootlint', 'less']);
grunt.registerTask('install', ['bower', 'uglify', 'copy:img', 'copy:css']);
grunt.registerTask('default', ['concat', 'uglify', 'bootlint', 'less']);
grunt.registerTask('install', ['bower', 'concat', 'less', 'uglify', 'copy:img', 'copy:css']);
grunt.registerTask('deploy', ['install', 'sftp-deploy']);
};
......
......@@ -9,10 +9,12 @@
"devDependencies": {
"grunt-bootlint": "^0.9.0",
"grunt-bower-task": "^0.4.0",
"grunt-contrib-concat": "^0.5.1",
"grunt-contrib-copy": "^0.8.0",
"grunt-contrib-less": "^1.0.1",
"grunt-contrib-uglify": "^0.9.1",
"grunt-contrib-watch": "^0.6.1"
"grunt-contrib-watch": "^0.6.1",
"grunt-sftp-deploy": "^0.2.4"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
......
p.slogan {
margin-top: 3em;
}
p.next_meeting {
margin-top: 3em;
}
......
......@@ -25,7 +25,7 @@
//@import "dropdowns.less";
//@import "button-groups.less";
//@import "input-groups.less";
//@import "navs.less";
@import "navs.less";
//@import "navbar.less";
//@import "breadcrumbs.less";
//@import "pagination.less";
......@@ -46,7 +46,7 @@
// Components w/ JavaScript
//@import "modals.less";
//@import "tooltip.less";
//@import "popovers.less";
@import "popovers.less";
//@import "carousel.less";
// Utility classes
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment