What to upload to web sever for deploying a cocos2d html5 project?

What content should I upload to web sever to deploy a cocos2d html5 project? The whole project folder? Or Is there any reduced content for deploying?

Hey, I asked the question as you but no one answered yet, I am also interested to know if you have to upload the whole project files because if you do that means you have to sell your source code to the clients, and that’s not something that you always want to do.
Anyway, let us know if you find your answer.

The deployment project to WEB to upload all the JS files and resources.
JS is a very transparent, everyone can see it.

If you do not want to let people see the code, You can try advanced compression your code.
Although the code will still be seen, but has been difficult to read.
This is a Chinese docuement: http://www.html5china.com/thread-1231-1-1.html

Compression will be only one JS file, you only need to add this file and html file upload to the server

I mean whether we can remove some js files which are not used in project when uploading to web server. Or we must upload the whole directory of project, every file in the directory and sub directory must be upload?

Hi @camel_liu~
You can remove some js files which are not used in project, but mutually dependent js files must be uploaded.

The team provide a simple according to the module of the download mode, you can try it.
http://cocos2d-x.org/filecenter/jsbuilder/
This is just a simple compression engine.

Hi,

You can also use project.json to config modules you want

http://www.cocos2d-x.org/docs/manual/framework/html5/v3/project-json/en
http://www.cocos2d-x.org/docs/manual/framework/html5/v3/moduleconfig-json/en

Then when you want to deploy your project, just use this command to generate a runnable minimum version to upload to your server

cocos compile -p web -m release

After this command, you will find a folder html5 in publish folder, just copy it to upload to your server. This version will contain only the necessary modules that you configured in project.json

Kind of complicated, hope I made myself clear

1 Like

thank for the info pandamicro.
I cannot find the cocos tool (im doing an html5 project (v3.0).
Im on Windows 7

Thanks in advance

Nicolas

Please refer to this document: http://www.cocos2d-x.org/docs/manual/framework/html5/v2/cocos-console/en

thaks will try this asap.