1
0
mirror of https://github.com/dutchcoders/transfer.sh.git synced 2020-11-18 19:53:40 -08:00

bump transfer.sh-web

This commit is contained in:
Andrea Spacca 2019-01-19 23:38:19 +01:00
parent af80d889af
commit 0db3e70b34
4 changed files with 6066 additions and 1159 deletions

View File

@ -12,6 +12,8 @@ module.exports = function (grunt) {
// show elapsed time at the end // show elapsed time at the end
require('time-grunt')(grunt); require('time-grunt')(grunt);
grunt.loadNpmTasks('grunt-npm-command');
// configurable paths // configurable paths
var yeomanConfig = { var yeomanConfig = {
app: require('./bower.json').appPath || 'src', app: require('./bower.json').appPath || 'src',
@ -37,11 +39,11 @@ module.exports = function (grunt) {
livereload: '<%= connect.options.livereload %>' livereload: '<%= connect.options.livereload %>'
}, },
files: [ files: [
'<%= yeoman.app %>/*.html', '<%= yeoman.app %>/*.html',
'{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css', '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
'{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js', '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
'<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}' '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}'
], ],
tasks: ['includes:server'] tasks: ['includes:server']
} }
}, },
@ -56,19 +58,19 @@ module.exports = function (grunt) {
options: { options: {
open: true, open: true,
base: [ base: [
'.tmp', '.tmp',
'<%= yeoman.app %>' '<%= yeoman.app %>'
] ]
} }
}, },
test: { test: {
options: { options: {
port: 9001, port: 9001,
base: [ base: [
'.tmp', '.tmp',
'test', 'test',
'<%= yeoman.app %>' '<%= yeoman.app %>'
] ]
} }
}, },
dist: { dist: {
@ -82,11 +84,11 @@ module.exports = function (grunt) {
files: [{ files: [{
dot: true, dot: true,
src: [ src: [
'.tmp', '.tmp',
'<%= yeoman.dist %>/*', '<%= yeoman.dist %>/*',
'!<%= yeoman.dist %>/.git*' '!<%= yeoman.dist %>/.git*'
] ]
}] }]
}, },
server: '.tmp' server: '.tmp'
}, },
@ -96,11 +98,11 @@ module.exports = function (grunt) {
reporter: require('jshint-stylish') reporter: require('jshint-stylish')
}, },
all: [ all: [
'Gruntfile.js', 'Gruntfile.js',
'<%= yeoman.app %>/scripts/{,*/}*.js', '<%= yeoman.app %>/scripts/{,*/}*.js',
'!<%= yeoman.app %>/scripts/vendor/*', '!<%= yeoman.app %>/scripts/vendor/*',
'test/spec/{,*/}*.js' 'test/spec/{,*/}*.js'
] ]
}, },
@ -153,11 +155,11 @@ module.exports = function (grunt) {
dist: { dist: {
files: { files: {
src: [ src: [
'<%= yeoman.dist %>/scripts/{,*/}*.js', '<%= yeoman.dist %>/scripts/{,*/}*.js',
'<%= yeoman.dist %>/styles/{,*/}*.css', '<%= yeoman.dist %>/styles/{,*/}*.css',
'<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}', '<%= yeoman.dist %>/images/{,*/}*.{png,jpg,jpeg,gif,webp,svg}',
'<%= yeoman.dist %>/fonts/{,*/}*.*' '<%= yeoman.dist %>/fonts/{,*/}*.*'
] ]
} }
} }
}, },
@ -181,7 +183,7 @@ module.exports = function (grunt) {
cwd: '<%= yeoman.app %>/images', cwd: '<%= yeoman.app %>/images',
src: '{,*/}*.{png,jpg,jpeg}', src: '{,*/}*.{png,jpg,jpeg}',
dest: '<%= yeoman.dist %>/images' dest: '<%= yeoman.dist %>/images'
}] }]
} }
}, },
@ -189,9 +191,9 @@ module.exports = function (grunt) {
dist: { dist: {
files: { files: {
'<%= yeoman.dist %>/styles/main.css': [ '<%= yeoman.dist %>/styles/main.css': [
'.tmp/styles/{,*/}*.css', '.tmp/styles/{,*/}*.css',
'<%= yeoman.app %>/styles/{,*/}*.css' '<%= yeoman.app %>/styles/{,*/}*.css'
] ]
} }
} }
}, },
@ -213,10 +215,24 @@ module.exports = function (grunt) {
cwd: '<%= yeoman.app %>', cwd: '<%= yeoman.app %>',
src: '*.html', src: '*.html',
dest: '<%= yeoman.dist %>' dest: '<%= yeoman.dist %>'
}] }]
} }
}, },
copy: { 'npm-command': {
'videojs-install': {
options: {
cwd: '<%= yeoman.app %>/bower_components/videojs/'
}
},
'videojs-build': {
options: {
cmd: 'run-script',
args: ['build'],
cwd: '<%= yeoman.app %>/bower_components/videojs/'
}
}
}
,copy: {
dist: { dist: {
files: [{ files: [{
expand: true, expand: true,
@ -224,53 +240,55 @@ module.exports = function (grunt) {
cwd: '<%= yeoman.app %>', cwd: '<%= yeoman.app %>',
dest: '<%= yeoman.dist %>', dest: '<%= yeoman.dist %>',
src: [ src: [
'*.{ico,png,txt}', '*.{ico,png,txt}',
'fonts/{,*/}*.*', 'fonts/{,*/}*.*',
'.htaccess', '.htaccess',
'index.txt', 'index.txt',
'404.txt', '404.txt',
'images/{,*/}*.{webp,gif,svg}' 'images/{,*/}*.{webp,gif,svg}'
] ]
}] }]
}, },
server: { server: {
files: [{ files: [{
expand: true, expand: true,
dot: true, dot: true,
cwd: '<%= yeoman.app %>/bower_components/font-awesome/fonts/', cwd: '<%= yeoman.app %>/bower_components/font-awesome/fonts/',
dest: '<%= yeoman.app %>/fonts/font-awesome', dest: '<%= yeoman.app %>/fonts/font-awesome',
src: ['*'] src: ['*']
}, { }, {
expand: true, expand: true,
dot: true, dot: true,
cwd: '<%= yeoman.app %>/bower_components/bootstrap/dist/fonts/', cwd: '<%= yeoman.app %>/bower_components/bootstrap/dist/fonts/',
dest: '<%= yeoman.app %>/fonts/glyphicons', dest: '<%= yeoman.app %>/fonts/glyphicons',
src: ['*'] src: ['*']
}] }]
} }
}, },
concurrent: { concurrent: {
dist: [ dist: [
'less', 'less',
'imagemin', 'imagemin',
'htmlmin' 'htmlmin'
] ]
} }
}); });
grunt.loadNpmTasks('grunt-npm-command');
grunt.registerTask('serve', function (target) { grunt.registerTask('serve', function (target) {
if (target === 'dist') { if (target === 'dist') {
return grunt.task.run(['build', 'connect:dist:keepalive']); return grunt.task.run(['build', 'connect:dist:keepalive']);
} }
grunt.task.run([ grunt.task.run([
'clean:server', 'clean:server',
'less', 'less',
'includes:server', 'includes:server',
'copy:server', 'copy:server',
'connect:livereload', 'connect:livereload',
'watch' 'watch'
]); ]);
}); });
grunt.registerTask('server', function () { grunt.registerTask('server', function () {
@ -279,30 +297,30 @@ module.exports = function (grunt) {
}); });
grunt.registerTask('test', [ grunt.registerTask('test', [
'clean:server', 'clean:server',
'less', 'less',
'copy:server', 'copy:server',
'connect:test', 'connect:test',
]); ]);
grunt.registerTask('build', [ grunt.registerTask('build', [
'clean:dist', 'clean:dist',
'npm-command',
'copy:server',
'useminPrepare',
'concurrent',
'cssmin',
'concat',
'includes:build',
'uglify',
'copy',
'usemin',
'copy:server', ]);
'useminPrepare',
'concurrent',
'cssmin',
'concat',
'includes:build',
'uglify',
'copy',
'usemin',
]);
grunt.registerTask('default', [ grunt.registerTask('default', [
'jshint', 'jshint',
'test', 'test',
'build' 'build'
]); ]);
}; };

File diff suppressed because it is too large Load Diff

View File

@ -13,6 +13,7 @@
"tests" "tests"
], ],
"dependencies": { "dependencies": {
"videojs": "~7.4.2",
"bootstrap": "~3.0.0", "bootstrap": "~3.0.0",
"modernizr": "~2.6.2", "modernizr": "~2.6.2",
"uri.js": "~1.14.1", "uri.js": "~1.14.1",

View File

@ -20,6 +20,7 @@
"grunt-contrib-watch": "~0.6.1", "grunt-contrib-watch": "~0.6.1",
"grunt-include-replace": "^2.0.0", "grunt-include-replace": "^2.0.0",
"grunt-includes": "^0.4.5", "grunt-includes": "^0.4.5",
"grunt-npm-command": "^0.1.2",
"grunt-rev": "~0.1.0", "grunt-rev": "~0.1.0",
"grunt-svgmin": "1.0.0", "grunt-svgmin": "1.0.0",
"grunt-usemin": "~2.4.0", "grunt-usemin": "~2.4.0",