I have a Durandal 1.2 project which is built using require.js. The directory structure looks a lot like the below. (Much more than this, just a snippet). Each directory contains an index.js file for the require module js, and an index.html for it's view. I'm wanting to minify and concatenate these files into one (as that seems to be the whole point of using require...), but I'm not having any luck with my build scripts. Are there any suggestions on how to go about this? All Durandal docs seem to only reference 2.0 now, so I'm not getting any help there. Many thanks!
You can download a version of Durandal 1.2 docs at http://durandaljs.com/version/1_2_0/Documentation.zip and #JohnHunter uploaded them to github : https://github.com/johnhunter/durandal-1.2-docs
Assuming you're using a OOTB 1.2 layout running optimizer.exe in app/durandal/amd should be all that's needed.
Related
Is there any easy way to remove any query to google font api "fonts.gstatic.com" in Nuxt.Js ? I would rather provide font files myself.
So far I tried to remove any mention of fonts.gstatic.com from .nuxt/components/index.js, but it seems that the command build reset my modifications, so nothing changed.
My configuration is quite simple, I initialized an app with #nuxt/content-theme-docs.
Since the concern is more aimed towards GAFAM (avoid the usage of Google fonts), the solution would be to fork the package for the Nuxt team and strip the related module.
Here is where to find it: https://github.com/nuxt/content/search?q=fonts
This module of Nuxt is aimed towards so fast, pain-free and easy to setup documentation. Hence probably why, Nuxt's team was using such package (since it's still the goto as of today to use Google fonts).
You can follow this answer if you want to use a module on build time: https://stackoverflow.com/a/68166329/8816585
Otherwise, you can use this website to have your fonts locally (link those to your CSS file and you should be fine): https://google-webfonts-helper.herokuapp.com/fonts
I'm having a hard time trying to set up dojo build in my project.
Basically, I have my js folder with all my custom widgets and components. I simply want to combine all javascript files form js folder into one single file.
dojo sources are located outside this folder. The structure looks similar to this:
/public
/prod
/dojo-1.9
/dijit
/dojo
/dojox
/js
myScript1.js
myScript2.js
Do you have any idea on how should I configure the package.json and profile.js? The documentation doesn't seem to help since all I am getting is an output folder with the same contents as the js folder (no javascript is merged).
You can start by reading this article:
https://dojotoolkit.org/reference-guide/1.10/build/simpleExample.html
It provides a simplified overview of dojo build system.
Additional there is dojo boilerplate with a sample of folder structure and profile.js configuration for quick start here:
https://github.com/csnover/dojo-boilerplate
I definitely suggest you to use the boilerplate as start for your project as it simplify a lot initial configurations.
I migrated to 2.2.1 one week ago and I am encountring some serious issues, my project worked fine in 2.1.5.
Since earliest play2 versions, I have been using the following procedure to access my public assets (copy pasted from the official doc):
-> routes file :
GET /assets/*file controllers.Assets.at(path="/public", file)
in template file:
<link href="#{routes.Assets.at("stylesheets/bootstrap.css")}" rel="stylesheet">
without any problem.
However, now that I upgraded to 2.2.1, it's only working in DEV mode (play debug / run), in PROD, all my assets URLs return 404 errors.
I tought it was a packaging problem, checked the main jar file, I could see the public folder and the various *.js and *css files so they seem to be properly included. Also the generated URLs look clean :
http://localhost:9000/assets/stylesheets/bootstrap.css
I use a single module layout and develop on windows 7. I tried deploying on a linux debian 6 but had exactly the same issue.
I would appreciate any help, it seems that I am not the only one having this problem but no information about a possible fix yet... Reverting to 2.1.5 would be a difficult task because 2.2 introduced some serious incompatibilities in the API and required many code changes.
You should have /assets/*file instead of /assets*file in your routes file but I doubt this will resolve your problem.
If you have other specific routes for some assets, make sure the general GET /assets/*file is the last one in your routes file.
I finally found the cause of the problem by removing all dependencies from my project one by one.
One of the plugin I am using (Japid) was compiled with an earlier version of play 2.2.x and was incompatible with 2.2.1, that caused problems with assets routing.
Fortunately, japid author has been very responsive and fixed the issue. (see release 0.9.14.1)
I am trying to use DTCoreText and I have followed the setup documentation to the T. Everything seems to be working find and my project builds correctly, however, when I try to import some classes to try them out in my view controller I get a file not found.
I didn't make any changes to this project for simplicity its a Single View bare bones template with DTCoreText configured to work with it after following the setup instructions on DTCoreText's github
I have posted a zipped version of my project here:
Is there something I am missing here?
Any and all help is greatly appreciated-
symfony1.x followed a good standart that the whole framework lies somewhere outside and is available to any project. Today I started to read symfony2 documentation and actually downloaded the 'with vendors' 2.0.1 package which is presented on download page. After opening the package I was a bit surprised of what I've seen. But after looking around the package I found that the only folder I need is 'vendors' one - so I copied its content to my '...\lib\vendor\symfony2' folder (near '...\lib\vendor\symfony' and '...\lib\vendor\ext'). I added it to include path and proceed reading documentation. And then I found a problem - a command listed 'php app/console generate:bundle --namespace=Acme/HelloBundle --format=yml' produced simple questions. Did they miss to explain how to generate a project (structure, preconfiguration, command-line files, etc)? And what about '.bat' and '.sh' files?
Symfony2 is very, very different than symfony 1 - especially when it comes to the directory structure. You can't simply drop in the vendors dir and expect it to work. This page explains how to setup a new Symfony2 project.
I recommend you to forget Symfony... and to think with Symfony2 about another think completely different than S1.
Installation is really simple and you will need some advanced PHP knowledge just to understand how it works... But if you have worked with S1, I expect you will have not much problems :)