martinlindhe / laravel-vue-i18n-generator

Generates a vue-i18n compatible include file from your Laravel translations
MIT License
306 stars 207 forks source link

Reload npm to watch latest translation changes in vue-i18n-locales.generated.js file #30

Closed SagarNaliyapara closed 6 years ago

SagarNaliyapara commented 7 years ago

I'm promattically run following command to generate latest changes in vue-i18n-locales.generated.js file, Artisan::queue('vue-i18n:generate'); after this command executed translations does not update until i run npm run dev/production any solution for this?

martinlindhe commented 7 years ago

I cannot know how you have your task runners set up. There should be no issue as you are describing.

I am using this myself with godo successfully:

        p.Task("locale-js", nil, func(c *do.Context) {
        c.Run("php artisan vue-i18n:generate")
    }).Src("resources/lang/**/*.{php}")
SagarNaliyapara commented 7 years ago

@martinlindhe it's working fine it generates js file and when js file gets updated i must have to run npm run dev to see it's effect in output as i'm generating app.js using https://laravel.com/docs/5.5/mix

martinlindhe commented 7 years ago

@SagarNaliyapara I understand, I'm just not sure how that is affected by this package (We are not shipping any npm parts). It seems to me this is not an actual issue with laravel-vue-i18n-generator, but with your build pipeline.

Do you have an suggestion how we could resolve this by changes in this package?

SagarNaliyapara commented 7 years ago

@martinlindhe Even i don't know but now instead of this i'm passing props array for lang translation to overcome the issue..

Thank you for your support 👍

martinlindhe commented 7 years ago

Glad you worked around it. Is it ok if I close this issue then?