Pinch: Fix jslint errors
[framework/web/web-ui-fw.git] / Gruntfile.js
1 module.exports = function( grunt ) {
2         "use strict";
3
4         grunt.loadNpmTasks( "grunt-contrib-requirejs" );
5
6         // Project configuration.
7         grunt.config.init({
8                 pkg: grunt.file.readJSON( "package.json" ),
9                 requirejs: {
10                         js: {
11                                 options: {
12                                         baseUrl: "./src/js",
13                                         paths: {
14                                                 "libs": "../../libs/js",
15                                                 "jqm": "../../libs/js/jquery-mobile-1.2.0/js"
16                                         },
17                                         packages: [
18                                                 {
19                                                         name: "jquery",
20                                                         location : '../../libs/js/jquery-mobile-1.2.0/js',
21                                                         main: 'jquery.js'
22                                                 }
23                                         ],
24
25                                         optimize: "none",
26
27                                         //Finds require() dependencies inside a require() or define call.
28                                         findNestedDependencies: true,
29
30                                         //If skipModuleInsertion is false, then files that do not use define()
31                                         //to define modules will get a define() placeholder inserted for them.
32                                         //Also, require.pause/resume calls will be inserted.
33                                         //Set it to true to avoid this. This is useful if you are building code that
34                                         //does not use require() in the built project or in the JS files, but you
35                                         //still want to use the optimization tool from RequireJS to concatenate modules
36                                         //together.
37                                         skipModuleInsertion: true,
38
39                                         include: ( grunt.option( "modules" ) || "jquery.mobile.tizen.full" ).split( "," ),
40
41                                         out: "build/tizen-web-ui-fw/tizen-web-ui-fw.full.js",
42
43                                         pragmasOnSave: {
44                                                 jqmBuildExclude: true
45                                         },
46
47                                         onBuildWrite: function (moduleName, path, contents) {
48                                                 return contents.replace(/__version__/g, grunt.config.process( "\"<%= pkg.version %>\"" ) );
49                                         }
50                                 }
51                         }
52                 }
53         });
54
55
56         grunt.registerTask( "js", [ "requirejs" ] );
57 };