Expand config for localisation

This commit is contained in:
James Cole 2018-02-06 10:56:17 +01:00
parent b72e8db7b1
commit e77a1e403f
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
3 changed files with 35 additions and 0 deletions

View File

@ -78,6 +78,7 @@ return [
// own stuff:
TwigBridge\ServiceProvider::class,
PragmaRX\Google2FALaravel\ServiceProvider::class,
Mariuzzo\LaravelJsLocalization\LaravelJsLocalizationServiceProvider::class,
/*

View File

@ -0,0 +1,23 @@
<?php
return [
/*
* Set the names of files you want to add to generated javascript.
* Otherwise all the files will be included.
*
* 'messages' => [
* 'validation',
* 'forum/thread',
* ],
*/
'messages' => [
'components',
'list',
],
/*
* The default path to use for the generated javascript.
*/
'path' => public_path('messages.js'),
];

View File

@ -11,5 +11,16 @@ let mix = require('laravel-mix');
|
*/
const WebpackShellPlugin = require('webpack-shell-plugin');
// Add shell command plugin configured to create JavaScript language file
mix.webpackConfig({
plugins:
[
new WebpackShellPlugin({onBuildStart:['php artisan lang:js resources/assets/js/messages.js --no-lib --quiet'], onBuildEnd:[]})
]
});
mix.js('resources/assets/js/app.js', 'public/js')
.sass('resources/assets/sass/app.scss', 'public/css');