I'm building up a Vue 3 app using the latest tooling which includes Vite.
I'm also using valet to render the built site, so I set my outDir in build to public
It creates a proper build html file with links to the assets folder, which is also created properly ... but Valet will not display anything in the public directory.
Do I seriously have to build my own driver? Why is this not working?
Related
I have a modular JavaFX application. It perfectly loads all stylesheets when I run it using the IDE IntelliJ.
However, when I publish the application as PKG for Mac platform and try to run, no CSS is applied to the application. The PKG file successfully installs the JavaFX application on Mac but no stylesheet is loaded.
The app run as expected but without any css applied.
I am using openJDK-15.0.2 and generating the PKG file using jpackage.
Folder Structure:
Folder structure
To get the resources:
Class clazz = SocketClientFX.class;
Scene scene = new Scene(root);
scene.getStylesheets().add(clazz.getResource("/styles/Styles.css").toString());
I solved this problem by adding "opens" in module-info.java for each resource folder.
For example:
opens styles.common;
opens jsonFiles;
opens images.common;
opens styles.stevePane;
etc...
In the code, each resource is accessed as follows:
containerBorderPane.getStylesheets().add("/styles/stevePane/loadingWindow.css");
Then I built the project again and create a new PKG file. When I installed and run it again, all resources including the CSS files were loaded.
When the resource is accessed via getResource(), as below, we do not need to add opens directive in the module-info.java.
scene.getStylesheets().add(clazz.getResource("/styles/Styles.css").toString());
Thank you, #James_D and #Slaw, for your comments.
I am creating a demo site using ASP.NET. Just wondering why my bootstrap css is not working in my production server. It works fine in my development pc. I have uploaded all the content folder and bootstrap.css.
Below is my bundleconfig.vb
Public Module BundleConfig
' For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkID=303951
Public Sub RegisterBundles(bundles As BundleCollection)
bundles.Add(New ScriptBundle("~/bundles/WebFormsJs").Include(
"~/Scripts/WebForms/WebForms.js",
"~/Scripts/WebForms/WebUIValidation.js",
"~/Scripts/WebForms/MenuStandards.js",
"~/Scripts/WebForms/Focus.js", "~/Scripts/WebForms/GridView.js",
"~/Scripts/WebForms/DetailsView.js",
"~/Scripts/WebForms/TreeView.js",
"~/Scripts/WebForms/WebParts.js"))
' Order is very important for these files to work, they have explicit dependencies
bundles.Add(New ScriptBundle("~/bundles/MsAjaxJs").Include(
"~/Scripts/WebForms/MsAjax/MicrosoftAjax.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxApplicationServices.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxTimer.js",
"~/Scripts/WebForms/MsAjax/MicrosoftAjaxWebForms.js"))
' Use the Development version of Modernizr to develop with and learn from. Then, when you’re
' ready for production, use the build tool at http://modernizr.com to pick only the tests you need
bundles.Add(New ScriptBundle("~/bundles/modernizr").Include(
"~/Scripts/modernizr-*"))
ScriptManager.ScriptResourceMapping.AddDefinition("respond", New ScriptResourceDefinition() With {
.Path = "~/Scripts/respond.min.js",
.DebugPath = "~/Scripts/respond.js"})
End Sub
End Module
How do I troubleshoot further?
Regards,
Steve
In the Tools drop down menu in Visual Studio, select Nuget Package Manager --> Manage Nuget Packages for Solution. Then search for, select and install the latest (v3+) version of Bootstrap. This will automatically set it up properly in your project space.
It looks like someone installed it manually in the project, then never made the required changes to the Bundling class. In DEBUG mode, minified and bundled classes are ignored. However, in RELEASE mode, as when deploying, only the files in the Bundling class are referenced, unless you have some other specified in the head section of your pages.
Ok I'm new to Polymer, after seeing the main page and Google IO 2016 video, I wanted to try it out, and right now I created a basic web application with it.
I managed to get it build and running it through the "polymer serve" command, but now that I want to release it to a production environment (I have an nginx cluster), how do I build the application to just a bunch of static website files?
I executed "polymer build" and I see the build folder and it contains 2 folders: bundled and unbundled, and inside them there are the bower_components, src and test folders as well as other stuff for running it through "polymer serve" but there's not a build/dist of build/static folder that I can copy into nginx so the application is served through it.
BTW, what I mean about a dist folder is without a readme, bower.json, test, bower_components, etc. just the pure needed HTML, CSS, JS, etc files that need to be served through nginx (or any other web server) as static file web content.
I went through the documentation but there's no details on how to do such task.
Any suggestions on how to build a static content folder for serving my polymer web app through nginx?
Thanks!
As of Polymer-CLI v0.11.0, there's no built-in way to filter out files from the bundle, but it's a requested feature. Also, the build output currently includes extraneous files (a bug), such as the test directory.
As an alternative, you could use Polymer Starter Kit 1.3.0, whose dist folder doesn't include the extra files (although it does include required bower_components as-is).
I was trying to install bower into meteor and after I did that i tried to instal Polymer through bower .I run the meteor command on my project to start the local database and it presents me a massive error :
Public/components/polymer/test/unit/dynamic-imports/dynamic-element.html:1:
Can't set DOCTYPE here. (Meteor sets for you)
Public/components/polymer/src/lib/template/x-repeat.html:87: bad
formatting in HTML template
This error appears like 50 times the only thing that is changing is the html file.
Thanks in advance :)
You should use public instead of Public to store polymer elements files.
I'm using angular-meteor library to develop a meteor application with angular as a front-end.
I need to add an angular directive called angular-file-upload.
When I use this directive in my node/angular app, it is installed via bower, and has this folder structure:
angular-file-upload folder contains
angular-file-upload.js
as well as a sub-folder named src,
which contains 3 files:
intro.js, module.js and outro.js
What is the process of installing such third party angular directives?
Is this done with meteor add command, or by placing these files manually into specific directories?
Check out this link, if those are the actual packages which serve your purpose then you can directly add them to you Meteor app by using meteor add <package-name> command in the terminal.
While the alternate way to do this is by adding these .js files manually to public or lib folder and link them to your corresponding HTML pages. But I would personally prefer the 1st way to do this.
You can create the library by yourself. There are few alternatives to do that.
Basically it goes down to these steps:
add package.js in root directory
meteor publish --create
The complete details how to do that can be found here: http://angular-meteor.com/tutorial/step_19