Cocos Console Command

Source: Internet
Author: User

Create a new project
    • Create a COCOS2D-JS project:

      cocos new projectName -l js
    • Create a project that supports only Web platforms:

      cocos new projectName -l js --no-native
    • To create a project to the specified directory:

      cocos new projectName -l js -d ./Projects
Run the project
    • To run a Web version project using a browser:

      cd directory/to/projectcocos run -p web
    • Compress scripts and publish Web versions using closure compiler Advanced Mode:

      cd directory/to/projectcocos compile -p web -m release --advanced
    • Compile and run the project on the native platform:

      cd directory/to/projectcocos compile -p ios|mac|android|win32cocos run -p ios|mac|win32|android
    • Options

      -p platform : 平台:ios|mac|android|win32|web.-s source   : 项目目录,如果没有指明会使用当前路径。-q          : 静默模式,不打印log信息。-m mode     : 选择debug或release模式,默认为debug模式--source-map: 生成source-map文件。(仅限Web平台)--advanced  : 使用Closure Compiler高级模式压缩脚本。(仅限Web平台)
Help commands

If you have any questions about using it, you can use it after the command -h to get help with the corresponding command. Here are all the commands:

    • Create:new
    • Compile:compile
    • Run:run

Original address: http://www.cocos.com/doc/article/index?type=cocos2d-x&url=/doc/cocos-docs-master/manual/framework/ Html5/v2/cocos-console/zh.md

Cocos Console Command

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.