soulim / ember-cli-bootstrap-datepicker

Datepicker component for Ember CLI
http://sul.im/ember-cli-bootstrap-datepicker
MIT License
68 stars 57 forks source link

Importing locales from /vendor doesn't work #111

Open Macxim opened 6 years ago

Macxim commented 6 years ago

In the documentation it says:

When you need another language, you should import a locale file using your ember-cli-build.js. Just import vendor/bootstrap-datepicker-locales/bootstrap-datepicker..js, e.g.:

// ember-cli-build.js app.import('vendor/bootstrap-datepicker-locales/bootstrap-datepicker.de.js');

This returns: `Error: ENOENT: no such file or directory, open '/../tmp/source_map_concat-input_base_path-FkhxKBxt.tmp/vendor/bootstrap-datepicker-locales/bootstrap-datepicker.nl.js'

Importing directly from node_modules seems to work fine though:

app.import('node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.nl.min.js');

jelhan commented 5 years ago

Path in documentation seems to be wrong. Import from vendor/ works fine if you add missing .min.js:

app.import('vendor/bootstrap-datepicker-locales/bootstrap-datepicker.<LANGUAGE_CODE>.min.js');
app.import('vendor/bootstrap-datepicker-locales/bootstrap-datepicker.de.min.js');