Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
eranshmil authored and gkatsev committed Nov 5, 2018
1 parent 2d27b6a commit eb5de19
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build/grunt.js
Expand Up @@ -31,6 +31,7 @@ module.exports = function(grunt) {
},
copy: {
fonts: { cwd: 'node_modules/videojs-font/fonts/', src: ['*'], dest: 'build/temp/font/', expand: true, filter: 'isFile' },
lang: { cwd: 'lang/', src: ['*'], dest: 'dist/lang/', expand: true, filter: 'isFile' },
dist: { cwd: 'build/temp/', src: ['**/**', '!test*'], dest: 'dist/', expand: true, filter: 'isFile' },
a11y: { src: 'sandbox/descriptions.html.example', dest: 'sandbox/descriptions.test-a11y.html' }, // Can only test a file with a .html or .htm extension
examples: { cwd: 'docs/examples/', src: ['**/**'], dest: 'dist/examples/', expand: true, filter: 'isFile' }
Expand Down Expand Up @@ -189,6 +190,7 @@ module.exports = function(grunt) {
'shell:cssmin',

'copy:fonts',
'copy:lang',
'vjslanguages'
]);

Expand Down

0 comments on commit eb5de19

Please sign in to comment.