Skip to content

Commit

Permalink
restore backwards compatibility with old browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
runerune-sgt committed May 9, 2018
1 parent 01def12 commit 36ba997
Show file tree
Hide file tree
Showing 6 changed files with 1,663 additions and 4 deletions.
13 changes: 11 additions & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = (grunt) ->

concat:
app:
src: ['js/jsOTP.js', 'js/sha_dev.js']
src: ['js/babel-fix.js', 'js/jsOTP.js', 'js/sha_dev.js']
dest: 'dist/jsOTP.js'

uglify:
Expand All @@ -25,18 +25,27 @@ module.exports = (grunt) ->
"""
files:
'dist/jsOTP.min.js': ['dist/jsOTP.js']
'dist/jsOTP-es5.min.js': ['dist/jsOTP-es5.js']

watch:
app:
files: 'src/*.coffee'
tasks: ['default']

babel:
options:
presets: ['es2015']
dist:
files:
'dist/jsOTP-es5.js': 'dist/jsOTP.js'

# These plugins provide necessary tasks.
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.loadNpmTasks 'grunt-contrib-concat'
grunt.loadNpmTasks 'grunt-contrib-uglify-es'
grunt.loadNpmTasks 'grunt-babel'

# Default task.
grunt.registerTask 'default', ['coffee', 'concat', 'uglify']
grunt.registerTask 'default', ['coffee', 'concat', 'babel']

Loading

0 comments on commit 36ba997

Please sign in to comment.