arulkumar-lab / amd-javascript-example

AMD module using gulp task / direct loading to HTML

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

amd-javascript-example

AMD module with requireJS / jquery using gulp task and direct loading to HTML

npm install

Windows CLI to bundle the dist folder

r.js.cmd -o build.js

Bundle the dist folder

r.js -o build.js

Load global compressed file (i.e index.html)

<script data-main="../dist/scripts/global" src="lib/require.js"></script>

Load direct JS module (i.e index.html)

<script data-main="./scripts/config" src="lib/require.js"></script>

*Note: To enable debugging add debugger; or un-comment //debugger; from app.js.

Reference: https://requirejs.org/docs/optimization.html

image

image

About

AMD module using gulp task / direct loading to HTML

License:MIT License


Languages

Language:JavaScript 72.9%Language:HTML 26.5%Language:CSS 0.6%