tntbuild --ignore - ignoring files during packaging
Closed this issue · 4 comments
I've noticed .git
folders are included in packaged apps. Is it possible to ignore specific folders during packaging with tntbuild
? Or should we use a sub-directory for sources? When referencing 'main:src/main.js' in package.json
, tntbuild
fails.
What's the recommended file structure for packaged apps to avoid including unnecessary files?
This is actually already a feature. It's within package.json, see below:
{
"name": "shortname",
"longname": "My Application Name",
"namespace": "com.trueinteractions",
"version": "2.0.1",
"description": "App description, no more than 50 characters",
"author": "Company Name, or Your Name",
"sources": {
"directory":".",
"exclude":".git"
},
"icon": {
"osx":["./tintruntime.png"],
"windows":["./tintruntime.png"]
},
"main": "lib/main.js",
"repository": {
"type": "git",
"url": "https://github.com/some/repo.git"
},
"bugs": {
"url": "https://github.com/some/repo/issues"
},
"license": "MIT",
"copyright": "2014 True Interactions"
}
The exclude field is a regular expression where you can match multiple files with a class, I just realized we did not add this to our documentation at www.trueinteractions.com/docs, i'll get it added today.
Feel free to close this out if you feel its been resolved.
I'm not sure this is working correctly. I'm using:
"sources": {
"directory": ".",
"exclude":"learning-paths|build|.git|.gitignore|.gitmodules|.DS_Store"
},
The learning-paths
folder is being excluded, but I still see build,.git,.gitignore,.gitmodules and .DS_Store in the Resources folder of the packaged app.
UPDATE : It does work.
The problem is that calling tntbuild --clean
doesn't really wipe the tmp
folder completely. The unwanted files remained inside, so they were used in the final build. After manually removing the build folder, everything's working as expected.
@ricardoalcocer The "exclude" is a regular expression you'll need to escape the . character as its a class for any or none, so for example "learning-paths|build|.git|.gitignore|.gitmodules|.DS_Store". Hopefully that should alleviate your issues, if you still have problems please feel free to reopen this bug.
Thanks,
Trevor