Skip to content

Commit

Permalink
Updating the library to use Grunt instead of a makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
travist committed Mar 4, 2021
1 parent 41762b2 commit 961f6d0
Show file tree
Hide file tree
Showing 73 changed files with 101,384 additions and 8,264 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*CVS*
.DS_Store
tools
node_modules
6 changes: 6 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[submodule "minplayer"]
path = minplayer
url = https://github.com/travist/minplayer.git
[submodule "lib/iscroll"]
path = lib/iscroll
url = https://github.com/cubiq/iscroll.git
86 changes: 86 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
module.exports = function(grunt) {

var iscroll = [
'lib/screenfull.js/dist/screenfull.min.js'
];

var iscrollPath = 'src/osmplayer.iscroll.js';

var files = [
'src/osmplayer.js',
'src/osmplayer.parser.default.js',
'src/osmplayer.parser.youtube.js',
'src/osmplayer.parser.rss.js',
'src/osmplayer.parser.asx.js',
'src/osmplayer.parser.xspf.js',
'src/osmplayer.playlist.js',
'src/osmplayer.pager.js',
'src/osmplayer.teaser.js'
];

var template = [
'templates/default/js/osmplayer.playLoader.default.js',
'templates/default/js/osmplayer.controller.default.js',
'templates/default/js/osmplayer.playlist.default.js',
'templates/default/js/osmplayer.teaser.default.js',
'templates/default/js/osmplayer.pager.default.js',
'templates/default/js/osmplayer.default.js'
];

// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
all: ['Gruntfile.js'].concat(files).concat(template)
},
concat: {
options: {
separator: '',
},
screenfull: {
options: {
banner: "var osmplayer = osmplayer || {};\n(function(exports) {",
footer: "\n})(osmplayer);"
},
files: {
'src/osmplayer.iscroll.js': iscroll
}
},
build: {
files: {
'bin/osmplayer.js': ['minplayer/bin/minplayer.min.js', iscrollPath].concat(files)
}
}
},
uglify: {
options: {
banner: ''
},
build: {
files: {
'bin/osmplayer.compressed.js': ['bin/osmplayer.js'],
'bin/osmplayer.min.js': ['bin/osmplayer.js'],
'templates/default/osmplayer.default.js': template
}
}
},
jsdoc : {
dist : {
src: files,
options: {
template: 'node_modules/grunt-jsdoc/node_modules/ink-docstrap/template',
destination: 'doc'
}
}
}
});

// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-jsdoc');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');

// Default task(s).
grunt.registerTask('default', ['jshint', 'concat', 'uglify', 'jsdoc']);
};
224 changes: 3 additions & 221 deletions bin/osmplayer.compressed.js

Large diffs are not rendered by default.

Loading

0 comments on commit 961f6d0

Please sign in to comment.