mix

Laravel 5.4 Mix How to Mangle / Uglify / Obfuscate Scripts

北慕城南 提交于 2019-12-13 07:05:59
问题 Laravel 5.4 - Mix How to Mangle / Uglify / Obfuscate Scripts I use gulp on previous version. Thank you 回答1: From the Laravel Mix documentation: mix.options({ extractVueStyles: false, processCssUrls: true, purifyCss: false, uglify: {}, postCss: [] }); You can use the uglify option to merge any custom uglify options that your project requires 来源: https://stackoverflow.com/questions/42870454/laravel-5-4-mix-how-to-mangle-uglify-obfuscate-scripts

Laravel 5 mix app.js file creation

半城伤御伤魂 提交于 2019-12-13 00:33:04
问题 I created a custom JavaScript file with a simple function: function picture(soemthing){ document.getElementById('idXYZ').src = "example.com"; } Then I added this file to the webpack.mix.js config: mix.js(['resources/assets/js/app.js', 'resources/assets/js/xyz.js'], 'public/js') .sass('resources/assets/sass/app.scss', 'public/css'); and run: npm run dev. npm compiled my script and the picture function was included in the app.js file. Now I'd like to use the "picture" function in a blade.php

Could not compile dependency :idna after adding “timex” dependency.

天大地大妈咪最大 提交于 2019-12-12 19:48:31
问题 After adding "timex" dependency I am facing this issue here is the error ===> Command bare not found ** (Mix) Could not compile dependency :idna, "/usr/bin/rebar3 bare compile --paths "phoenix/_build/dev/lib/*/ebin"" command failed. You can recompile this dependency with "mix deps.compile idna", update it with "mix deps.update idna" or clean it with "mix deps.clean idna" 来源: https://stackoverflow.com/questions/36838824/could-not-compile-dependency-idna-after-adding-timex-dependency

Elixir application with multiple/dynamic config files

家住魔仙堡 提交于 2019-12-12 15:37:58
问题 I have an elixir application, an application server, that would benefit from start up parameters. This application uses an ecto repository, so I can store an app server's configuration there, but I'd still need a configuration key for what to retrieve from the db. Presently I've been using config.exs for the server application (the whole application is an umbrella project), but obviously this only handles one static configuration. My question is: Can I use mix to specify what config file I'd

Adding datatable to laravel mix files

与世无争的帅哥 提交于 2019-12-11 15:05:08
问题 I have installed datatables with npm by help of this doc, now I'm not sure how I can add datatables css and js files to my app.css and app.js Downloaded files by NPM Code my webpack.mix.js const mix = require('laravel-mix'); //laravel default to make app.css and app.js // I want add Datatables to these files mix.js('resources/js/app.js', 'public/js') .sass('resources/sass/app.scss', 'public/css'); //my template files mix.combine([ 'public/theme/primary/js/jquery.min.js', 'public/theme/primary

PyAudio - How mix wave file into a continuous stream

穿精又带淫゛_ 提交于 2019-12-11 14:22:26
问题 I want to write a very basic application that passes audio from microphone to speakers. This is very simple with pyaudio as described on https://people.csail.mit.edu/hubert/pyaudio/ . def passthrough(): WIDTH = 2 CHANNELS = 1 RATE = 44100 p = pyaudio.PyAudio() def callback(in_data, frame_count, time_info, status): return (in_data, pyaudio.paContinue) stream = p.open(format=p.get_format_from_width(WIDTH), channels=CHANNELS, rate=RATE, input=True, output=True, stream_callback=callback) stream

Workbox's precache manifest file contains invalid URL strings in Laravel Mix setting

懵懂的女人 提交于 2019-12-11 01:56:54
问题 I'm using Workbox 3.0 (webpack-plugin) and Laravel Mix (5.6) to auto-generate a ServiceWorker file. When running the webpack compiler, the manifest file generated by Workbox for pre-cached assets looks like this: self.__precacheManifest = [ { "revision": "89c25ce71806a695a25e", "url": "//js/app.js" }, { "revision": "89c25ce71806a695a25e", "url": "//css/app.css" } ]; Obviously, the URL strings are wrong and cause errors on the actual web page. Here is my webpack.mix.js : (relevant parts) const

Laravel mix versioning doesn't remove old built files

本小妞迷上赌 提交于 2019-12-08 16:07:34
I am using Laravel 5.4 with mix to version my javascript and scss files. The problem is: it doesn't clean the previous built files and simply add a new one with a different file name i.e. app.9d3e179e85922aad6ccf.js In a new project I started, I do not have this issue. Mix correctly replaces the old file with the latest built version. Is there somewhere where I can make the change? This is an issue with the laravel-mix library which can't be addressed here. There are many open issues on GitHub referring to the same problem. You can check the most recent one for some workarounds till the

In elixir, How do i install packages globally?

家住魔仙堡 提交于 2019-12-08 15:13:12
问题 Can I use mix to install some packages globally? I'd like a behaviour like npm 's global option or gem 's install - it could be useful for packages I use everywhere like csv or yaml . 回答1: There is no such thing in Elixir, you always use dependencies in the context of a project. Solutions like archives or escripts are meant to solve specific problems, they do not allow package sharing between projects. However, there is no need to worry about sharing frequently used packages. Hex, the package

Laravel mix versioning doesn't remove old built files

五迷三道 提交于 2019-12-08 04:40:53
问题 I am using Laravel 5.4 with mix to version my javascript and scss files. The problem is: it doesn't clean the previous built files and simply add a new one with a different file name i.e. app.9d3e179e85922aad6ccf.js In a new project I started, I do not have this issue. Mix correctly replaces the old file with the latest built version. Is there somewhere where I can make the change? 回答1: This is an issue with the laravel-mix library which can't be addressed here. There are many open issues on