Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

How to exclude files from HTML5 builds?
Started by Develephant Apr 20 2018 02:25 AM

- - - - -
7 replies to this topic
html5 web files exclude
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

What key do I use to exclude files/dirs from an HTML5 build? I've tried:

--
-- Project section
--
excludeFiles =
{
  -- Exclude unnecessary files for each platform
  all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", "server", },
  android = { "LaunchScreen.storyboardc", },
  html5 = { "lib" }
},

and

--
-- Project section
--
excludeFiles =
{
  -- Exclude unnecessary files for each platform
  all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", "server", },
  android = { "LaunchScreen.storyboardc", },
  web = { "lib" }
},

But they both give a warning and don't seem to make a difference on the output size.

WARNING: issue found in build.settings: 
WARNING: unrecognized key: settings.excludeFiles.html5[] (string)

Thanks in advance.

 

-dev



[TOPIC: post.html]
#2

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

This time 'web' keyword should be used. Something similar to:

 

--
-- Project section
--

excludeFiles =

{
web = { "Icon.png", "Icon-??.png", "Icon-???.png", "LaunchScreen.storyboardc", },
},


[TOPIC: post.html]
#3

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

For some reason that is not working for me. If I remove the directory manually and run an HTML5 build I can see the size difference is smaller on *.data, but when leaving the directory in the project folder and adding it to the "web" key the file size increases again.

--
-- Project section
--
excludeFiles =
{
  -- Exclude unnecessary files for each platform
  all = { "Icon.png", "Icon-*dpi.png", "Images.xcassets", "server", },
  android = { "LaunchScreen.storyboardc", },
  web = { "lib" }
},

-dev



[TOPIC: post.html]
#4

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

Works for me. Just right now I've added 'lib' folder in an app and applied your build.settings, 'lib' folder was excluded from build.



[TOPIC: post.html]
#5

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

Are you sure that 'lib' but not '.lib' or something similar ?



[TOPIC: post.html]
#6

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

It's really strange. Here is a video of the behavior. You can see when I remove the "lib" directory the size changes.

 

I'm on macOS High Sierra 10.13.4, Corona build 3273 if that matters.

 

 

-dev



[TOPIC: post.html]
#7

Develephant

[GLOBAL: userInfoPane.html]
Develephant
  • Corona Geek

  • 1,450 posts
  • Corona SDK

Hi,

 

I also get this warning:

WARNING: issue found in build.settings: 
WARNING: unrecognized key: settings.excludeFiles.web[] (string)

-dev



[TOPIC: post.html]
#8

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 212 posts
  • Corona SDK

Hi,

 

I also get this warning:

WARNING: issue found in build.settings: 
WARNING: unrecognized key: settings.excludeFiles.web[] (string)

-dev

fixed




[topic_controls]
[/topic_controls]