Skip to content

Commit

Permalink
Merge pull request #10 from mariez/master
Browse files Browse the repository at this point in the history
minify js
  • Loading branch information
mariez committed Nov 10, 2016
2 parents 39fd677 + 2a43daf commit d2ddda0
Show file tree
Hide file tree
Showing 5 changed files with 394 additions and 6 deletions.
5 changes: 1 addition & 4 deletions footer_minified.inc
Expand Up @@ -17,10 +17,7 @@

<script type="text/javascript" src="ui/phplist-ui-bootstrap/js/jquery-1.12.1.min.js"></script>
<script type="text/javascript" src="js/phplistapp.js"></script>
<script type="text/javascript" src="ui/phplist-ui-bootstrap/js/phpList3ToBootstrap.js"></script>
<script type="text/javascript" src="ui/phplist-ui-bootstrap/bootstrap/dist/js/bootstrap.min.js"></script>
<script type="text/javascript" src="ui/phplist-ui-bootstrap/js/jcarousellite_1.0.1.min.js"></script>
<script type="text/javascript" src="ui/phplist-ui-bootstrap/js/phplist.js?v=<?php echo filemtime(dirname(__FILE__).'/js/phplist.js'); ?>"></script>
<script type="text/javascript" src="ui/phplist-ui-bootstrap/js/dist/phpList_ui_bootstrap.min.js"></script>

<script>
/* do not remove this from here */
Expand Down
25 changes: 23 additions & 2 deletions gruntfile.js
Expand Up @@ -2,6 +2,26 @@ module.exports = function(grunt) {
require('jit-grunt')(grunt);

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: ';'
},
dist: {
src: ['js/phpList3ToBootstrap.js','bootstrap/dist/js/bootstrap.min.js','js/jcarousellite_1.0.1.min.js','js/phplist.js'],
dest: 'js/dist/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n'
},
dist: {
files: {
'js/dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>']
}
}
},
less: {
development: {
options: {
Expand All @@ -24,6 +44,7 @@ module.exports = function(grunt) {
}
}
});

grunt.registerTask('default', ['less', 'watch']);
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.registerTask('default', ['less', 'watch','concat','uglify']);
};

0 comments on commit d2ddda0

Please sign in to comment.