Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Commit

Permalink
Add support for ES modules
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson committed May 24, 2017
1 parent 62db904 commit fd9f7c5
Show file tree
Hide file tree
Showing 15 changed files with 79,476 additions and 377 deletions.
3 changes: 3 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"esversion": 6
}
31 changes: 27 additions & 4 deletions gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['gruntfile.js', 'lib/js/emojione.js']
files: ['gruntfile.js', 'lib/js/src/**'],
options: {
jshintrc: true
}
},
jsonlint: {
files: {
Expand Down Expand Up @@ -48,7 +51,26 @@ module.exports = function(grunt) {
// run QUnit tests
qunit: {
all: ['lib/js/tests/tests.html']
}
},
rollup: {
umd: {
options: {
format: 'umd',
moduleName: 'emojione'
},
files: {
'./lib/js/emojione.js': './lib/js/src/index.js',
}
},
es: {
options: {
format: 'es'
},
files: {
'lib/js/emojione.es.js': 'lib/js/src/index.js'
}
},
},

});
grunt.loadNpmTasks('grunt-contrib-sass');
Expand All @@ -58,6 +80,7 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.registerTask('default', ['jshint','jsonlint', 'sass', 'uglify', 'cssmin']);
grunt.registerTask('travis', ['qunit']);
grunt.loadNpmTasks('grunt-rollup');
grunt.registerTask('default', ['jshint','jsonlint', 'sass', 'uglify', 'cssmin', 'rollup']);
grunt.registerTask('travis', ['rollup', 'qunit']);
};
Loading

0 comments on commit fd9f7c5

Please sign in to comment.