Skip to content

Commit eb5de19

Browse files
eranshmilgkatsev
authored andcommitted
feat(lang): copy language JSON files into dist dir (#5549)
This helps with ESM import and bundler users can then import the JSON files directly and register the languages manually. For example: ```js import es from 'video.js/dist/lang/es.json'; videojs(element, { language: 'es', languages: { es } }); ``` Related issue: #5092
1 parent 2d27b6a commit eb5de19

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build/grunt.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ module.exports = function(grunt) {
3131
},
3232
copy: {
3333
fonts: { cwd: 'node_modules/videojs-font/fonts/', src: ['*'], dest: 'build/temp/font/', expand: true, filter: 'isFile' },
34+
lang: { cwd: 'lang/', src: ['*'], dest: 'dist/lang/', expand: true, filter: 'isFile' },
3435
dist: { cwd: 'build/temp/', src: ['**/**', '!test*'], dest: 'dist/', expand: true, filter: 'isFile' },
3536
a11y: { src: 'sandbox/descriptions.html.example', dest: 'sandbox/descriptions.test-a11y.html' }, // Can only test a file with a .html or .htm extension
3637
examples: { cwd: 'docs/examples/', src: ['**/**'], dest: 'dist/examples/', expand: true, filter: 'isFile' }
@@ -189,6 +190,7 @@ module.exports = function(grunt) {
189190
'shell:cssmin',
190191

191192
'copy:fonts',
193+
'copy:lang',
192194
'vjslanguages'
193195
]);
194196

0 commit comments

Comments
 (0)