h5bp build script - update css reference automatically? - html5boilerplate

When I build my h5bp project, the published html files do not include an updated reference to the versioned css file (they still point to 'css/style.css' rather than the newly made css file). The index.html file is the one exception to this.
Is there a step that I am missing while creating the site or while running $ ant build?
Thanks

It seems there is a mismatch between the stable h5bp version and the current version of their ant-build script. The ant-build script assumes a different directory layout for JS files.
Anyway, they've included some compatibility options in "/build/config/project.properties". Look for the paragraph starting with "# Compatibility with older versions of html5boilerplate", uncomment the following lines and build again. It should work now.

Related

How to update source map file (css.map) from css and min.css files in Visual Studio 2019

In Visual Studio 2019, is there any easy tool to update source map file (css.map) from a css and min.css files?
I have a default.less file in a project which contains a default.css and then nested to it two files: default.css.map and default.min.css
+ default.less
|
|-----+ default.css
|
|-----+ default.css.map
|
|-----+ default.min.css
I have never worked with less. This project was build by other people. It seems there is installed a nuget package called dotless in the project. I am completely new in this project assigned, I have to maintain it.
When asp.net mvc app is executed I get an error which says it cannot parse content for default.css.map file. It seems default.css.map file is not correctly updated from default.css and default.min.css.
So now I am trying to update default.css.map file from default.css and default.min.css. I have no idea on how to do it. Any ideas?
I have always found using explicit .map files annoying. Near all LESS compilers come with an option to compile the map source into the .css file. This is the best option as it is always up to date and then you can just make a prod config that does not include the map.
I mostly use WebCompiler in my mvc apps, although webpack also has this functionality.

Including a file in WEB-INF/lib

I am porting AXIS 2 SOAP webservice to an existing grails 2.4.4 project.
It works flawlessly when run from the IDE but not fram a WAR.
I have tracked this down to addresing.mar NOT being copied to the WEB-INF lib directory. If I copy this file myself then ever thing works fine.
We are using Jenkins for CI and using the Grails plugin to do the compilation of and packaging of the WAR file.
This does not include the addresing.mar file. Also when running the Grails war command it is not included.
I have tried many way to get this to be included. The AXIS plug in just wrecks the compile to teh extent that it is unusable.
I have just spent 2 days googling and tried ever thing I can find in just about every combination.
We are now getting to the point we we are considering post processing the war file and adding the addresing.mar file directly.
Though that will work it would not help my understanding of what I am doing wrong!
Any help most appreciated.
Try saving your file inside the /src file. Grails autowires external libraries when saved inside this folder.
Note: This is only applicable to Grails versions running less than 3.x.x
I don't know too much about AXIS 2 SOAP and the mentioned addressing.mar file but if it's available in the project while building the war file you could use the grails.war.resources parameter in BuildConfig.groovy and simply copy it into the lib directory in the following way:
grails.war.resources = { stagingDir, args ->
copy(file: "path/to/addressing.mar", todir: "${stagingDir}/WEB-INF/lib/")
}
more info about grails.war.resources in the manual

How to include a folder when serve the project

i generated the scaffold of a famo.us project with Yeoman (yo famous)
i set up i small working project
i tried to launch it with 'grunt serve' command
it all works but no image is loaded because the folder content/images is not loaded
how can i include it?
thanks
I'm Myles the author of the Famous-Generator. The images in '/content/images/' should be able to be loaded as an absolute or relative path... although I have just updated the generated 'main.js' to use an absolute path for the sake of being explicit.
Remember that when you famous code is run it will be running inside of index.html, and therefore have the same "relative path" for included assets. As well, since you are serving via a development server, you are able to reference anything with absolute paths relative to the root directory of the project.
You should not have to touch requireConfig at all to be honest. It is only used to add vendor code installed in 'lib' to your path within require so you can reference modules by name rather than path. 'underscore' rather than '../lib/underscore'. This becomes nice as you begin to nest folders and don't want to have to manage relative paths. This also makes your code a lot more portable!
A nice sidebar, you should install all vendor code with 'bower install --save $LIB_NAME'. This will save the library / version to your bower.json and inject the path for the module into you requireConfig. Basically you can bower install anything and just start requiring!
yo famous is working just fine!
it was my mistake to try to set relative paths inside requireConfig including images: that is not working but i don't know if it is supposed to!
you have to use relative paths for every image and everything will be ok!

SASS --watch command not fully working

I have a pretty basic SASS setup running, which includes the following folder structure:
css
style.css
-modules
_all.scss
_globals.scss
partials
_base.scss
_normalize.scss
_styles.scss
vendor
-empty
I am telling SASS to watch the following sass --watch modules/_all.scss:style.css --style compact.
The issue is, that one one machine a change to ANY file included in _all.scss is recorded and output properly. On another machine, completely up to date, a change to a partial file thats included in _all.scss does not record a change, and therefore no styles are output. I have to reset SASS to watch the partial _all.scss once more for the change to be recorded.
Has anyone experienced these inconsistencies before? I'm not looking to watch an entire directory as I wish to have only a single stylesheet output...
Both builds have the same version of sass, ruby and command line tools running.
It seems like the sass-cache is not being busted when you make the change. You can try disabling the cache on the broken machine to see if the problem resolves. If it does, check manually delete the cache directory and try again.
Side note, you shouldn't have to use the watch command with rails (unless you're doing something unique). Sprockets is supposed to have plugins which do this automatically when serving assets.
In fact, I suspect that this may even be a conflict between sprocket's SASS engine configuration and the sass watcher binary configuration.
See the default cache configuration for the sass binary here: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#cache_location-option

Build script not working with HTML5Boilerplate new download

My first problem was that, though the documentation warned the JDK was required, and though I set the bin directory to that of the JDK, tools.jar was being searched for in the JRE folder. This made no sense, but I copied the tools.jar file over and it got past that problem. The next problem I had was the build script failing due to a failure to find a main.css file. I'm on a Windows 7 machine, and this is what I did to attempt the build:
Downloaded WinAnt v7 and installed it, specifying the jdk1.7.0_04/bin folder when asked for a Java directory.
Downloaded and unpacked a brand new package from HTML5Boilerplate, keeping the extra comments and such.
Downloaded the build project, unpacked it, and dropped its contents into a build folder at the root of the HTML5Boilerplate folder.
Opened a command prompt, navigated to the build directory, and ran the ant command.
The only thing I could think of that was causing the JDK/JRE problem was that this is a 64-bit system. That's just a guess, but the copied file worked OK for now.
This process performs some of the work without complaint, creating intermediate and publish directories, but then fails out, saying that it can't find a main.css file to copy. I want to stress that I didn't make any modifications at all to the files, so I'm confused as to why the build script can't find a file I didn't remove or rename. In the config/default.properties file of the build folder, on lines 74 and 80, it hard-codes main.js and main.css as file names used. I'm not sure if those are supposed to be dynamically generated, or if they must be manually created and included in the project for the build script to run. If so, why doesn't the default structure downloaded from the website have them? If they're dynamically created, I need advice on what is going wrong.
I'd really like to get this up and running so I can get started using HTML5Boilerplate, but I'm a little lost here.
-edit
After renaming the styles.css file to main.css, the build completed correctly, but the resulting files aren't correct. I read that the script would update the html file references to css and javascript files, but it didn't. For instance, I ended up with e68668b.css after the script ran, but the html file still referenced styles.css. Same for the javascript file. Help!
I found the problem. The build script is now a separate project, which I downloaded from github. I downloaded the HTML5Boilerplate zip file from the HTML5Boilerplate website, which unfortunately still has the old folder structure. I went to github and downloaded the HTML5Boilerplate template there, and that made the difference.
The HTML5Boilerplate website's link points to github's 3.0.2 version
The github's link points to version 3.0.2-69
And that's all she wrote. The names of some files changes, as well as some of the folder structure, between these two versions, and the build script I downloaded referenced the newest structures.

Resources