Commit d0cd5f63 authored by Madhur's avatar Madhur

more grunt

parent 02ef4f8c
module.exports = function(grunt)
{
var appConfig = grunt.file.readJSON('package.json') ||
{};
// Project configuration.
grunt.initConfig(
{
pkg: grunt.file.readJSON('package.json'),
uglify:
banner: '/*! <%= pkg.description %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n',
usebanner:
{
options:
dist:
{
banner: '/*! <%= pkg.description %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
options:
{
position: 'top',
banner: '<%= banner %>'
},
files:
{
src: ['dist/js/*.js', 'dist/css/*.css']
}
}
},
connect:
{
server:
{
options:
{
port: 8000,
hostname: '*',
}
}
},
watch:
{
files: ['css/*.css', 'js/*.js', '*.html'],
},
copy:
{
main:
{
src: 'img/*',
dest: 'dist/',
},
},
uglify:
{
build:
{
files:
{
'dist/emoji.min.js': ['js/app.js', 'js/emojiDirectives.js', 'js/emojiFilters.js', 'js/util.js', 'js/jquery.emojiarea.js', 'js/nanoscroller.js']
'dist/js/emoji.min.js': ['js/app.js', 'js/emojiDirectives.js', 'js/emojiFilters.js', 'js/util.js', 'js/jquery.emojiarea.js', 'js/nanoscroller.js']
}
}
},
......@@ -35,15 +77,28 @@ module.exports = function(grunt)
{
target:
{
options:
{
banner: '/*! <%= pkg.description %> <%= pkg.version %> <%= grunt.template.today("yyyy-mm-dd") %> */\n'
},
files:
{
'dist/emoji.min.css': ['css/nanoscroller.css','css/style.css']
'dist/css/emoji.min.css': ['css/nanoscroller.css', 'css/style.css']
}
}
},
compress:
{
main:
{
options:
{
archive: 'emoji.zip'
},
files: [
{
src: ['dist/**'],
dest: '/',
}
]
}
}
});
......@@ -51,11 +106,15 @@ module.exports = function(grunt)
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-compress');
// Default task(s).
grunt.registerTask('default', ['uglify', 'jshint', 'cssmin']);
grunt.registerTask('default', ['uglify', 'jshint', 'cssmin', 'usebanner', 'copy', 'compress']);
grunt.registerTask('serve', ['connect', 'watch']);
};
#Angular Emoji Popup
\ No newline at end of file
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