Composer Installation

Step 1: Download Composer:
Download and run Composer-Setup.exe.
During Installation it will download latest composer version and set up path so that we can just call “composer” from any directory using command line.

Step 2: Run the Composer-Setup.exe file:

click on next button.

Step 3: Next step is to set up PHP file path setup (default path is already set by-default)

click on next button.

Step 4: Next step is to setup Proxy, if required. We don’t need it, so can skip this step:

click on next button.

Step 5: Install Composer (Composer is ready to install now)

click on “Install” button.

Step 6: Finish (Installation is done)

click on “Finish” button

Composer setup successfully completed.

RequireJS – Hello World Program

The RequireJS’s get started with RequireJS page has a good explanation on “how RequireJS works”.

First, we will download the RequireJS library from here and save it to local folder named scripts inside our project.

Then, we will create the following file:

<!-- File: hello-world.html -->
<!DOCTYPE html>
<html>
    <head>
        <title>Hello World Program</title>
        <!-- data-main attribute tells require.js to load
             scripts/main.js after require.js loads. -->
        <script data-main="scripts/main" src="scripts/require.js"></script>
        <script src="scripts/main.js"></script>
    </head>
    <body>
        <h1>Hello World Program</h1>
    </body>
</html>

next, we will create the following file:

<!-- File: scripts/main.js -->
requirejs([], function() {
    alert("Hello World");
});

and when we load our HTML page in browser. We will see it alert with “Hello World”.

Cheers, we are done with ‘Hello World Program’ in alert box.

RequireJS Intro

RequireJS loads plain JavaScript files as well as more defined modules. It is optimized for in-browser use, including in a Web Worker, but it can be used in other JavaScript environments, like Rhino and Node. It implements the Asynchronous Module API.

RequireJS uses plain script tags to load modules/files, so it should allow for easy debugging. It can be used simply to load existing JavaScript files, so you can add it to your existing project without having to re-write your JavaScript files.

RequireJS includes an optimization tool you can run as part of your packaging steps for deploying your code. The optimization tool can combine and minify your JavaScript files to allow for better performance.

If the JavaScript file defines a JavaScript module via define(), then there are other benefits RequireJS can offer: improvements over traditional CommonJS modules and loading multiple versions of a module in a page. RequireJS also has a plugin system that supports features like i18n string bundles, and text file dependencies.

RequireJS does not have any dependencies on a JavaScript framework.

RequireJS works in IE 6+, Firefox 2+, Safari 3.2+, Chrome 3+, and Opera 10+.

You can grab/download Latest Release fromĀ here

Note:- reference

© 2025 Faraz Jafri All rights reserved. Privacy Policy

Proudly powered by WordPress. Special thanks to Bootstrap, FontAwesome & Open Source Community.