What I want to achieve is to combine all js/css into the index.html, I have achieved this with svelte as it only has a single js file. But don't know how to do it with flutter as it has many files built.
Flutter web doesn't use .css, just .js and a boot-strapping .html file. Mixed-mode files are hard to edit, and the .js file is updated for every build, so it'd be bad to overwrite the index.html if it had localizations, like other JS packages or font references or Google Analytics.
Related
after building the flutter project for desktop, flutter copies all asset files inside the assets directory into the build/flutter_assets/assets which are easily accessible and modifiable (which is not secure at all!), user can change the whole images easily and do some kind of modding the app with no experience required! or even in the worst situation with modifying the AssetManifest he could change the runtime dynamic libs with the malicious libs and get a hook from the app.
most modern frameworks/languages have the option to embed the resources inside a single file (that makes it harder to modify the files / repack the resource file) for example C#(WPF/Win32) embeds the resources in the resource Resource section or even Electron (Javascript) embed the whole resources into a file (it's easy but better than nothing)
I didn't find any similar behavior in Flutter Desktop (Windows/Mac/Linux) is there any alternative for flutter?
For now [12/12/22] it seems flutter desktop won't use resources to bundle the resources into a single file.
So I've created two separate libraries to achieve this
https://github.com/kooroshh/bundler that compresses the whole given assets into a single file and encrypts it with AES-128
https://github.com/kooroshh/flutter_bundler that reads the bundle file from and decrypts it into the memory that can be used with Image.memory or Direct file access using Virtual Files.
I hope an official solution gets implemented in the flutter framework.
I get different documents in different screens. now I want to read these files. Is there any package that can read all files like docx,pptx, pdf and so on through a single package? I used pdf viewer package to read pdf files. but like this, i have to use different packages to read the different files. is there any single package that can read all of my files
I'm hosting a site/page on Github, however, it is only reading the index.html file and not applying the css or js files to the site. I'm listing the file path for both the css and js files in a relative format (develop/style.css & develop/script.js) - I've tried reformatting this multiple times and have friend quite a few threads on stack overflow, nothing seems to be working :(. Can anyone find the missing link? Here's a link to the Github repo: https://github.com/emblair96/HW3-password-generator (it's an assignment for a coding Bootcamp I'm in -- so this is all very new to me).
The src tag is case sensitive. Your folder is Develop with a capital "D," but your HTML src tags both use develop with a lowercase "d."
I'm developing a new Hugo site and in this case I thought to create also a template so.I can use for future site.
Well in the template there are tons of vendor files and library because depending of the pages that the site will implement these library will be used. The problem is on the deploy. For example I use Line icons library that has a lot of .png files. (For example 200 files).
Well in the template I put all the files but could happen that in the site that implement this template I use only five icons. Is there a way that look around the final HTML and the usage of the icons and delete in the public folder the not necessary files?
Not directly.
You would need to add an utility script to your template, in order for any user implementing said template to be able to call this script on demand.
That script should then be able to:
analyze the HTML files generated in public_html
cleanup the icons accordingly
I'm creating a new Ionic app that I need to take a lot of styling from an old app for. The new app is ionic 2, the old is ionic 1. The ionic 1 app is pulling a lot of styles from lib/ionic/css/ionic.css. I can't find a similar thing in the ionic 2 app. Where do I find this? Do I just need to copy the file over? And will there be collision issues with ionic 2?
The css files would be under theme folder, app.core.scss where you define the folder path.
For example,
-App
--Pages
---Login(folder inside pages)
----Login.html
----Login.js
----Login.scss
---MainPage(folder inside pages)
--Theme
---app.core.scss(inside theme folder)
and define the folder path in app.core.scss :
#import "../pages/Login/Login";
Do note that the css styles are separated in ionic 2, but for my ionic 2 version, there are instances where same html ID css get mixed up, thus it would be better to have different IDs for different pages.
What boilerplate template did you use to create you app? There might be different structure for the folders and files. But the idea is that there will be bunch of .scss files in different folders which should be compiled to one css file when you build/serve the app.
For example there could be structure as indicated by #Gene or the main scss files could be in /app/app.scss and /theme/variables.scss, and individual components scss will be in the component directories