### Start Weex Debug Console Source: https://github.com/weexteam/website/blob/master/docs/zh/guide/debug/debug.md After installation, run this command to launch the Weex debugging console. This will automatically open the debug interface in your browser. ```Shell weex debug ``` -------------------------------- ### Install Weex Toolkit Globally Source: https://github.com/weexteam/website/blob/master/docs/zh/guide/debug/debug.md This snippet shows how to install the `weex-toolkit` globally using npm and verify the installation by checking its version. The `@beta` tag specifies installing the beta version. ```Shell npm i weex-toolkit@beta -g weex -v // Check for successful installation ``` -------------------------------- ### Example of Using a Registered Weex Module Source: https://github.com/weexteam/website/blob/master/docs/guide/extend/extend-web.md This JavaScript code illustrates how to retrieve and use a previously registered Weex module. It uses `weex.requireModule('guide')` to get an instance of the 'guide' module and then calls its `greeting` and `farewell` methods. This demonstrates the standard way to interact with custom or built-in Weex modules. ```javascript //import module const guide = weex.requireModule('guide') // use the methods of module guide.greeting() guide.farewell() ``` -------------------------------- ### Create and Run a New Weex Project Source: https://github.com/weexteam/website/blob/master/docs/guide/develop/create-a-new-app.md Demonstrates how to initialize a new Weex + Vue.js project, navigate into its directory, install necessary dependencies, and start the development server for local preview in a web browser. ```bash weex create awesome-app cd awesome-app npm install npm start ``` -------------------------------- ### Example of Registering a Custom Weex Module Source: https://github.com/weexteam/website/blob/master/docs/guide/extend/extend-web.md This JavaScript snippet provides a concrete example of how to register a custom module named 'guide' using `weex.registerModule`. The module defines two methods, `greeting` and `farewell`, which simply log messages to the console. This demonstrates the structure for creating and registering custom functionalities as Weex modules. ```javascript weex.registerModule('guide', { greeting () { console.log('Hello, nice to meet you. I am your guide.') }, farewell () { console.log('Goodbye, I am always at your service.') } }) ``` -------------------------------- ### Install Weex CLI on macOS and Windows Source: https://github.com/weexteam/website/blob/master/docs/guide/develop/setup-develop-environment.md This snippet provides commands to install the Weex CLI (weex-toolkit) globally using npm for both macOS and Windows. It also includes a step for macOS to adjust directory permissions and commands to verify the installation. ```bash $ sudo chmod -R 777 /usr/local/lib/node_modules/ $ npm i -g weex-toolkit // Do not use sudo $ weex -v ``` ```bash $ npm i -g weex-toolkit $ weex -v ``` -------------------------------- ### Rax.js Example for Weex Video Component Source: https://github.com/weexteam/website/blob/master/docs/zh/docs/components/video.md This Rax.js example demonstrates the usage of `rax-video`, a higher-level wrapper component that abstracts the underlying `