Вход Регистрация
Файл: time/Gruntfile.js
Строк: 78
<?php
module
.exports = function(grunt) {
  
'use strict';

  
grunt.loadNpmTasks('grunt-contrib-jshint');
  
grunt.loadNpmTasks('grunt-contrib-jasmine');
  
grunt.loadNpmTasks('grunt-contrib-less');
  
grunt.loadNpmTasks('grunt-contrib-uglify');
  
grunt.loadNpmTasks('grunt-contrib-watch');

  
grunt.initConfig({
    
pkggrunt.file.readJSON('package.json'),
    
meta: {
      
project'bootstrap-timepicker',
      
version'0.2.3'
    
},
    
jasmine: {
      
build: {
        
src : ['spec/js/libs/jquery/jquery.min.js''spec/js/libs/bootstrap/js/bootstrap.min.js''spec/js/libs/autotype/index.js''js/bootstrap-timepicker.js'],
        
options: {
          
specs 'spec/js/*Spec.js',
          
helpers 'spec/js/helpers/*.js',
          
timeout 100
        
}
      }
    },
    
jshint: {
      
options: {
        
browsertrue,
        
camelcasetrue,
        
curlytrue,
        
eqeqeqtrue,
        
eqnulltrue,
        
immedtrue,
        
indent2,
        
latedeftrue,
        
newcaptrue,
        
noargtrue,
        
quotmarktrue,
        
subtrue,
        
stricttrue,
        
trailingtrue,
        
undeftrue,
        
unusedtrue,
        
whitefalse,
        
globals: {
          
jQuerytrue,
          $: 
true,
          
expecttrue,
          
ittrue,
          
beforeEachtrue,
          
afterEachtrue,
          
describetrue,
          
loadFixturestrue,
          
consoletrue,
          
moduletrue
        
}
      },
      
files: ['js/bootstrap-timepicker.js''Gruntfile.js''package.json''spec/js/*Spec.js']
    },
    
less: {
      
dev: {
        
options: {
          
paths: ['css']
        },
        
files: {
          
'css/bootstrap-timepicker.css': ['less/*.less']
        }
      },
      
prod: {
        
options: {
          
paths: ['css'],
          
yuicompresstrue
        
},
        
files: {
          
'css/bootstrap-timepicker.min.css': ['less/*.less']
        }
      }
    },
    
uglify: {
      
options: {
        
banner'/*! <%= meta.project %> v<%= meta.version %> n' +
          
'* http://jdewit.github.com/bootstrap-timepicker n' +
          
'* Copyright (c) <%= grunt.template.today("yyyy") %> Joris de Wit n' +
          
'* MIT License n' +
          
'*/'
      
},
      
build: {
        
src: ['<banner:meta.banner>','js/<%= pkg.name %>.js'],
        
dest'js/<%= pkg.name %>.min.js'
      
}
    },
    
watch: {
      
js: {
        
files: ['js/bootstrap-timepicker.js''spec/js/*Spec.js'],
        
tasks: ['jshint''jasmine'],
        
options: {
          
livereloadtrue
        
}
      },
      
less: {
        
files: ['less/timepicker.less'],
        
tasks: ['less:dev'],
        
options: {
          
livereloadtrue
        
}
      }
    }
  });

  
grunt.registerTask('default', ['jshint''jasmine''less:dev']);
  
grunt.registerTask('test', ['jasmine''jshint']);
  
grunt.registerTask('compile', ['jshint''jasmine''uglify''less:prod']);
};
?>
Онлайн: 0
Реклама