RequireJS Study Guideline

- - posted in module, requirejs,

Directory Structure

www
|—-index.html
|—-js
|   |---main.js
|
|--css
|   |---main.scss
|
|--img
|—–lib
    |———jquery/jquery-min.js
    |———requirejs/require.js
    |———bootstrap/bootstrap.js
1
2
3
4
5
6
7
8
9
10
11

requirejs.config({
    baseUrl: lib,
    paths: {
        jquery: jquery/jquery,
        main: ../js/main
    },
    shim: {
        bootstrap: ['jquery']
    }
});

待續…

Comments