Skip to content

Commit 9ef359b

Browse files
committed
fix
1 parent 04389fa commit 9ef359b

File tree

5 files changed

+38
-12
lines changed

5 files changed

+38
-12
lines changed

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ $ php artisan migrate
2626
[Configuration][]
2727
[Version Notes][]
2828

29-
#### 2.6.10 Adds React App UI as an alternative to WebUI
29+
#### 2.6.16 Adds React App UI as an alternative to WebUI
3030

3131
![React_UI](../../wiki/images/React_UI.png)
3232

resources/assets/js/readme.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,33 @@
1-
![clear](js/img/clear.png)
1+
# React App UI for Laravel Translation Manager
2+
3+
To have the pre-compiled files included in your mix based asset compilation add the following
4+
lines to your Laravel project's `webpack.mix.js`, after compilation of your assets.
5+
6+
```js
7+
mix.copy(['vendor/vsch/laravel-translation-manager/public/js/index.js'], 'public/vendor/laravel-translation-manager/js/index.js')
8+
.copy(['vendor/vsch/laravel-translation-manager/public/css/index.css'], 'public/vendor/laravel-translation-manager/css/index.css')
9+
.copy(['vendor/vsch/laravel-translation-manager/public/images'], 'public/vendor/laravel-translation-manager/images')
10+
;
11+
```
12+
13+
If you want to build this app as part of your asset compilation then you will need to add the
14+
following to your `webpack.mix.js` (assuming this package is under
15+
`vendor/vsch/laravel-translation-manager` directory):
16+
17+
```js
18+
mix.react('vendor/vsch/laravel-translation-manager/resources/assets/js/index.js', 'public/vendor/laravel-translation-manager/js')
19+
.sass('vendor/vsch/laravel-translation-manager/resources/assets/sass/index.scss', 'public/vendor/laravel-translation-manager/css')
20+
.setResourceRoot('/vendor/laravel-translation-manager/')
21+
;
22+
```
23+
24+
If you are not using mix compilation and the `public/mix-manifest.json` does not exist or does
25+
not get modified then you need to add the following lines to this file:
26+
27+
```json
28+
{
29+
"/vendor/laravel-translation-manager/js/index.js": "/vendor/laravel-translation-manager/js/index.js",
30+
"/vendor/laravel-translation-manager/css/index.css": "/vendor/laravel-translation-manager/css/index.css",
31+
}
32+
```
33+

versioninfo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ The 1.x.x versions are for Laravel 4.2, 2.1.x versions are for Laravel 5.1+, 2.3
55

66
#### 2.6.16
77

8-
* [ ] Fix: add instructions for react manifest mods react ui files are found by mix
9-
* [ ] Fix: add instructions for config options for react ui: disable ui, disable link
8+
* Add: instructions for react manifest mods react ui files are found by mix
9+
* Add: instructions for config options for react ui: disable ui, disable link
1010
* Fix: use ltm translation files for React UI translations if not available in the database
1111
* Fix: cached translations not being used if namespace was not '' or '*'
1212
* Fix: modal to be easier to use.

webpack.mix.js

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,12 @@ mix.react('resources/assets/js/index.js', 'public/js')
1818
;
1919

2020
/*
21-
// add the following lines to your webpack.mix.js to have LTM React files copied and added to the mix-manifest.json
21+
// add the following lines to your Laravel project's webpack.mix.js to have LTM React files copied and added to the mix-manifest.json
2222
mix.copy(['vendor/vsch/laravel-translation-manager/public/js/index.js'], 'public/vendor/laravel-translation-manager/js/index.js')
2323
.copy(['vendor/vsch/laravel-translation-manager/public/css/index.css'], 'public/vendor/laravel-translation-manager/css/index.css')
2424
.copy(['vendor/vsch/laravel-translation-manager/public/images'], 'public/vendor/laravel-translation-manager/images')
2525
;
2626
*/
27-
/*
28-
mix.copy(['public/js/index.js'], 'public/vendor/laravel-translation-manager/js/index.js')
29-
.copy(['public/css/index.css'], 'public/vendor/laravel-translation-manager/css/index.css')
30-
.copy(['public/images'], 'public/vendor/laravel-translation-manager/images')
31-
;
32-
*/
3327

3428
if (!mix.inProduction()) {
3529
mix.webpackConfig({

0 commit comments

Comments
 (0)