How to auto reload a Bunto project website? - static-site

I'm working on a new project with Bunto, and it looks like the auto reload functionality is only triggered by updates to .md and .wiki files with the command bunto --auto --server.
How can I trigger an auto-reload for other file types like HTML, CSS3, JavaScript, NuxRB files in the _layouts folder with Bunto?

As of version 3.2.1, Bunto will auto-watch by default. It watched for changes, and regenerated automatically. Simply run the command bunto serve.
For disable auto-regeneration use bunto serve --no-watch.

Related

Can I deploy a file on change inside PhpStorm?

I am using PhpStorm as my IDE and configured Sass to compile into my css file for my WordPress site. I have set up auto upload, which works on the file I am working on but not my style.css as my node watcher is updating it, not me.
Any ideas or solutions?

How to work with css and js files in moodle plugin

I need to develop a plugin for Moodle, and i need to have some js and css files in plugin. But i have the next problem - how to work with them from installed plugin? Of course, i can hardcode their path via to moodle structure, but it's a very dirty and bad way. Also, i know that i can place all js and css code inline, but i think that it's a bad decision too. Is there a built-in way to serve assets from plugin? I tried to find it in documentations, but found nothing.
Thanks
I assume you want to know how to include CSS and JS files into your plugin.
You can include a JS file via the command:
$PAGE->requires->js( /relative/path/your_script.js');
You can then call a JS function once the page has been downloaded with the command:
$PAGE->requires->js_init_call ( your_JS_function_name, array_of_parameters_here, bool: on DOM ready);
For example:
$PAGE->requires->js_init_call('init', array($USER->lang), true);
Be sure to make the $PAGE available with global $PAGE;, first.
Your CSS file can be named styles.css and put into the root folder of your plugin. The file will be automatically read by the system and included. It will take precedence over (will overwrite the settings of) the system CSS files. After that you will have to reload the theme caches.

How to automatically synchronize/refresh SCSS/CSS file on change?

Recently my client switched from Eclipse to Intellij. In both IDEs I was editing SCSS files externally and running "compass watch" in terminal. This worked great in Eclipse. immediately after compiling SCSS file I was able to simply refresh browser and see the changes.
In Intellij it takes up to 30 seconds to see the changes, or if I enable "synchronize files on frame activation" I have to switch to browser first, then back to Intellij, and then back again to browser in order to force refresh. Third option is to manually sync "css" folder, which is not convenient. I had a same issue when I was editing and compiling SCSS files in Intellij.
How can I force Intellij to detect CSS file change faster?
I've found the solution.
Open "Settings / File Watchers" and go to SCSS. Make sure that field "Output paths to refresh" has the same value for the output as "Arguments" field.
For example, this is my setup:
Arguments:
--no-cache --update $FileName$:$FileParentDir$\css\$FileNameWithoutExtension$.css
Output paths to refresh:
$FileParentDir$\css\$FileNameWithoutExtension$.css

CSS and JS files don't update in Phalcon app

I have a Phalcon app where I added some HTML (in volt), JS and SCSS. I compiled my CSS into the public directory and my JS files are also there. Everything works. Then I try to change my JS or CSS, but Phalcon ignores all changes. If I delete the files and refresh the page, the page style is gone and when I put them back, the new files effectively show up.
It seems like Phalcon is saving a cached version of my assets, but where? And how do I clear this cache?
We just solved this issue in vagrant by disabling send file support with sendfile off; parameter to nginx site.

Pharo add configurations to startup preferences

I'd like to add some configuration to the startup-pref.st file so that they will be loaded automatically whenever I download a new version of pharo.
Specifically I would like to download my projects repositories from smalltalkhub, so that I don't have to do it manually every time.
you should have a look at my automatic setup gists: https://gist.github.com/Uko/7672537
There is a file called installDFlow.st that installs DFlow project. In a same way you can install whatever you want. These files have to be put into ~/Library/Preferences/pharo/