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

Commit fd9f7c5

Browse files
committed
Add support for ES modules
1 parent 62db904 commit fd9f7c5

15 files changed

+79476
-377
lines changed

.jshintrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"esversion": 6
3+
}

gruntfile.js

+27-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ module.exports = function(grunt) {
22
grunt.initConfig({
33
pkg: grunt.file.readJSON('package.json'),
44
jshint: {
5-
files: ['gruntfile.js', 'lib/js/emojione.js']
5+
files: ['gruntfile.js', 'lib/js/src/**'],
6+
options: {
7+
jshintrc: true
8+
}
69
},
710
jsonlint: {
811
files: {
@@ -48,7 +51,26 @@ module.exports = function(grunt) {
4851
// run QUnit tests
4952
qunit: {
5053
all: ['lib/js/tests/tests.html']
51-
}
54+
},
55+
rollup: {
56+
umd: {
57+
options: {
58+
format: 'umd',
59+
moduleName: 'emojione'
60+
},
61+
files: {
62+
'./lib/js/emojione.js': './lib/js/src/index.js',
63+
}
64+
},
65+
es: {
66+
options: {
67+
format: 'es'
68+
},
69+
files: {
70+
'lib/js/emojione.es.js': 'lib/js/src/index.js'
71+
}
72+
},
73+
},
5274

5375
});
5476
grunt.loadNpmTasks('grunt-contrib-sass');
@@ -58,6 +80,7 @@ module.exports = function(grunt) {
5880
grunt.loadNpmTasks('grunt-contrib-watch');
5981
grunt.loadNpmTasks('grunt-contrib-cssmin');
6082
grunt.loadNpmTasks('grunt-contrib-qunit');
61-
grunt.registerTask('default', ['jshint','jsonlint', 'sass', 'uglify', 'cssmin']);
62-
grunt.registerTask('travis', ['qunit']);
83+
grunt.loadNpmTasks('grunt-rollup');
84+
grunt.registerTask('default', ['jshint','jsonlint', 'sass', 'uglify', 'cssmin', 'rollup']);
85+
grunt.registerTask('travis', ['rollup', 'qunit']);
6386
};

0 commit comments

Comments
 (0)