KVM
KVM

Reputation: 919

Html5 Boilerplate Build Script

I used Initializr to set up a new HTML5 project.
I am trying to use Ant Build Script to optimize the files for production : minization , and all that stuff.

I followed every instructions in the ReadMe, basically :

I have this error :

Buildfile: build.xml does not exist!
Build failed

Is this a file I'am supposed to write myself ? If so then I think it's weird the readme doesn't mention it at all.

Edit : Sorry I made a mistake in the path, I already was in the /build subfolder as specified in the readme.

Edit2 : Also I realize now that I skipped the "Add the build script to your project" part. When I execute "git checkout -b ant-build-script" I have the error :

fatal: Not a git repository (or any of the parent directories): .git

So I guess I need to set a git repo in my project first. Is there a way to retrieve the right files without using git ?

Edit3 : I set up a git repo and followed the instructions, but now I have errors during the build process. The problem seems to be concat.js. The errors seem to indicate missing files, for instance :

[concat] C:\wamp\www\MoviesLouis\intermediate\index.html does not exist.

The intermediate folder is made by Ant build script, I have no control on it. The build still finishes with "BUILD SUCCESSFUL".

The result is in the /publish folder, and I can see that all my javascript files are missing (except the ones in the /js/vendor folder).

Should I make a new question ?

Upvotes: 0

Views: 862

Answers (3)

roblarsen
roblarsen

Reputation: 452

You can change the file.root.page property, in your project.properties to point to whatever file you want

Upvotes: 1

KVM
KVM

Reputation: 919

The build script wasn't working because I renamed index.html to index.php. For now I will rename it back to html every time I want to build, but I'm still looking for an automated solution.

Upvotes: 0

mastazi
mastazi

Reputation: 1672

As you can see in the file build.xml here: https://github.com/h5bp/ant-build-script/blob/master/build.xml in line 3 basedir is ../, and then it explains why: "one back since we're in build" it means that you have to execute from the build sub folder, not from the project's root. Also, in runscript.bat https://github.com/h5bp/ant-build-script/blob/master/runbuildscript.bat it says: "If you're on a mac or linux, just run ant build from this folder in Terminal", where "this folder" is again the build subfolder.

Upvotes: 0

Related Questions