Forum

Ignore files on compile/deploy

09 March 2016 19:27
Is there any way to ignore some files within the project structure on the compilation stage?
We are aware of the css_ignore and js_ignore arrays on .b4w_project, but these would flag files to not be minified; we were looking for a way to exclude some files altogether.

Case in point, our project has some html/css layered on top of the canvas; we edit the styles in a .sass file in the project, which outputs a minified css. We need not to have the original sass file in the bundled deploy folder; currently we delete it manually before delivery, we were wondering if there is a more streamlined way to do this.

Thanks!
09 March 2016 19:32
Is there any way to ignore some files within the project structure on the compilation stage?
We are aware of the css_ignore and js_ignore arrays on .b4w_project, but these would flag files to not be minified; we were looking for a way to exclude some files altogether.
Currently there is no such way but we'll thinks about it. Thanks for suggesting this!
The Founder | Twitter | Facebook | Linkedin
25 April 2018 13:17
We had the same problem, so I wrote a small bash script to build the project, then clean the build directory.:

It uses Blend4Web's
 project.py
so you should check in Copy Project Management Script when creating a new project or copy it to the old ones.

You need to place a
.buildignore
file in the root of your project, it can contain any kind of glob expressions supported by your bash, seperated by lines.

Example:
# use b4w-build.sh script
node_modules
.*
*.sass


then rum my scrip in the same directory.

It should work without installing any dependency on Linux and Mac, on Windows you have multiple ways to get bash working.
 
Please register or log in to leave a reply.