Disable aurelia-bundler just on dev machine? - gulp

I've been working on an Aurelia app without gulp and it has gone well. Now I want to use gulp b/c the page loads are terrible with 100+ separate files being requested. I install aurelia-bundler from the skeleton and can get it working using gulp. But there are two problems:
1. I have to gulp bundle after EVERY change to refresh the page
2. The error messages make no sense b/c everything is minified now.
I can deal with #1 b/c of gulp-watch (even though that still takes time), but I can't handle the minified files and not being able to debug my code.
So, is there and easy way to switch back to the non-bundled files for development on my machine and only use the bundled files when I deploy to Heroku server? It seems like aurelia-bundle now points to the dist folder by default.
Oh yeah, I tried modifying config.js to point to "src" instead of "dist" but it still looks for the aurelia-xxx.js file instead of the non-bundled files.
Thanks.

If you are using the latest build files you can gulp watch in dev which should use the src files without bundling - of course, this is slower, but in conjunction with browser-sync you shouldn't have to do loads of refreshes.
Check your paths.js and other config files against the skeleton if gulp watch is also bundling.

Related

Shopware 6 Hot Module Reloading in Production mode does not reload compiled files

I am using the production version of Shopware 6.4.7 with my own custom theme installed and activated. When I start the watcher via bin/watch-storefront.sh the live reload server seems to start normally and compiles my files. When I go to the live reload URL with the supplied port (http://shopware1.local:8889) I can see my website and previous SCSS changes are compiled.
What does not happen is the following:
JS changes are not compiled
I do not see any logging I would expect when running HMR
SCSS changes are not reloaded, even though my terminal output states they are recompiled
JS changes are not reloaded, even though my terminal output states they are recompiled
When I run a full build using bin/build-storefront.sh all assets are compiled as expected. What could be the issue here?
For anyone who also ran into this: After re-installing my setup I figured it out; you should set up the site in dev mode in order for livereload to work. Contrary to what the SW6 training video's specify.

which files are the ones I should upload to a host

I learned to do a working environment based bower, from there install yoeman and gulp and materialize, I made a web page to root of all this, now I want to upload a host (like 000webhost or firebase) but I do not know which files are the ones I should upload
thx
You should upload everything except bower_components directory since it's content is used only when you compile down the things using gulp on your local machine. Once all your source files are piped through gulp, they are not required on the destination location. None of those files is or should be used during a http request.
I don't know exactly what is your project's structure, but because you specified what you use (bower, gulp) then I can deduct.
So after gulp finishes it's work, you have a public directory where all your combined, minified and copied assets live. This is obviously needed on the server, in your markup, you should refer to those files, not the ones fetched by bower when you've done bower install library1 --save. bower install library2 --save.

Incorporating gulp to compile js in apostrophe?

Has anyone rolled gulp into apostrophe for compiling assets? I'd like to use ES6, as I'm using a frontend framework that has all of the js nicely split up into separate assets, and have the compilation of that into one minified file part of the normal apostrophe build process (I'm using apostrophe-assets to reference a single root js file which imports everything else).
Great question. You're going to want to build your JavaScript with Gulp into one file before pushing that file to the browser using Apostrophe's asset pipeline.
For example you might have a /src directory at the root of your project that has your JavaScript files. You can pipe these files into your apostrophe-assets directory or some other named directory that is a subclass of apostrophe-module in /lib/modules/.
You can then push your compiled file to the browser as usual: http://apostrophecms.org/docs/tutorials/getting-started/pushing-assets.html#configuring-java-script-for-the-browser

Hygieia Specific,UI, Gulp - How To

Query related to opensource tool Hygieia. On the Gulp scripts https://github.com/capitalone/Hygieia/blob/v2.0.0/UI/gulpfile.js
Gulp serve serves the application. here are few queries i need help with
In version 1.5.0 gulp task runner had gulp serve:dist, which served only minified content, 2.0 does not seem to do that
gulp serve starts the app # port 3000, how do i control it for each instance, as i intend to run couple of instances(diff versions) on the same vm.
When UI is served # localhost:3000/ , all the content is served from
localhost:3000/# and localhost:3000/bower_components .. etc..
i want to move the content to be served under localhost:3000/WebApp/
So that all the URLs are under a specific Virt Directory.
Any pointers are greatly appreciated.
TIA,
Tx
your question not much clear. still if i understand your question correctly-
your current hygieia configuration working correctly. you just want to run multiple instances of same application.
for that you have to make changes in UI>gulpfile.js

asset versioning (js and css) and browser not pulling the most recent asset

I am currently using asset versioning on my symfony2 projects when ever I have a new update to the site, before doing assetic dump I changed the asset number first and then I ran
sudo php app/console assetic:dump --env=prod
then I cleared the cache. However on my windows machine when I tried it still uses the old assets before the update and hence messing a lot of the layout. What is the best way to prevent this from happening?
I think that you you messed with assets and Assetic library. Assetic library gives you ability to process your css and js resources. And so assetic:dump is just processing your js and css files (minimizing it, compile many files in one or any other processing).
To make your assets be accessible you need to run php app/console assets:install. If you want it be always up to date with your Resources folder you can just add --symlink option to this command. It will create symlink web/bundles/yourbundle pointing to your src/YourBundle/Resources/public.