client/gruntfile.js
author rougeronj
Mon, 22 Dec 2014 12:34:11 +0100
changeset 347 7a5905153e66
parent 345 cb5c0007c9f9
child 416 54a9de7e2b45
permissions -rw-r--r--
extend copy-server task in grunt to copy lib folder to the right directory on the server
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
295
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
     1
var simplePersist = require('./data/simple-persist');
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     3
module.exports = function(grunt) {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     4
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     5
  'use strict';
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     6
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     7
  var renkan_src = [
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     8
      'js/main.js',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
     9
      'js/models.js',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    10
      'js/defaults.js',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    11
      'js/i18n.js',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    12
      'js/full-json.js',
320
154b121a43f1 enhance save on click (snapshot mode) and update django app
cavaliet
parents: 297
diff changeset
    13
      'js/save-once.js',
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    14
      'js/ldtjson-bin.js',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    15
      'js/list-bin.js',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    16
      'js/wikipedia-bin.js',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
      'dist/js/paper-renderer.js'
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    18
  ];
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    19
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    20
  var renkan_banner = grunt.file.read('js/header.js').toString() +
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    21
      '\n/*! <%= pkg.name %> - v<%= pkg.version %> - Copyright © IRI ' +
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    22
      '<%= grunt.template.today("yyyy") %> */\n\n';
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    23
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    24
  // Project configuration.
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    25
  grunt.initConfig({
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    26
    pkg: grunt.file.readJSON('package.json'),
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    27
    requirejs: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    28
      renderer: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    29
        options: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    30
          baseUrl: "js/",
294
d9247696a257 rename build-renderer in main-renderer
ymh <ymh.work@gmail.com>
parents: 293
diff changeset
    31
          name: "main-renderer",
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
          out: "dist/js/paper-renderer.js",
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
          optimize: "none",
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
          beautify: true,
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
          paths: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
            requtils: "require-utils",
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
            jquery: "empty:",
297
7de2652f7ee8 SaveAs project client side
ymh <ymh.work@gmail.com>
parents: 295
diff changeset
    38
            underscore: "empty:",
7de2652f7ee8 SaveAs project client side
ymh <ymh.work@gmail.com>
parents: 295
diff changeset
    39
            filesaver: "empty:"
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
          }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
        }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
      }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
    },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
    uglify: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
      options: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
        banner: renkan_banner,
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
        sourceMap: true,
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
        sourceMapIncludeSources: true
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
      },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
      renkan: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
        files : {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
          'dist/js/renkan.min.js' : renkan_src
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
        }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
      }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
    },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
    concat: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    57
      options: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
        banner: renkan_banner
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
      },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
      renkan: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
        files : {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
          'dist/js/renkan.js' : renkan_src
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
        }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
      }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
    },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
    clean: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
      options: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
        force: true
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
      },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
      renderer: ["dist/js/paper-renderer.js"],
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
      renkan: ["dist/"],
345
cb5c0007c9f9 continue bower integration
ymh <ymh.work@gmail.com>
parents: 344
diff changeset
    72
      lib: ["lib/"],
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
    },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
    cssmin: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
      options: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
        banner: renkan_banner
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
      },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
      renkan: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
        expand: true,
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
        cwd: 'css/',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
        src: ['*.css'],
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
        dest: 'dist/css',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
        ext: '.min.css'
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
      }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
    },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
    copy: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
      renkan: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
        files: [
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
          {expand: true, cwd: '', src: ['img/*'], dest: 'dist/', filter: 'isFile'},
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
          {expand: true, cwd: '', src: ['data/properties.json'], dest: 'dist/', filter: 'isFile'},
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
          {expand: true, cwd: '', src: ['lib/**'], dest: 'dist/'}
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
         ]
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
       },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
       renkan_css: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
         options: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
           process: function (content, srcpath) {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
             return grunt.template.process(renkan_banner) + content;
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
           }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
         },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
         files: [{expand: true, cwd: '', src: ['css/*'], dest: 'dist/', filter: 'isFile'}]
342
2306317213a1 publish a new version of renkan in django server part and add a grunt target to do it
ymh <ymh.work@gmail.com>
parents: 320
diff changeset
   101
       },
2306317213a1 publish a new version of renkan in django server part and add a grunt target to do it
ymh <ymh.work@gmail.com>
parents: 320
diff changeset
   102
       renkan_server: {
347
7a5905153e66 extend copy-server task in grunt to copy lib folder to the right directory on the server
rougeronj
parents: 345
diff changeset
   103
         files: [
7a5905153e66 extend copy-server task in grunt to copy lib folder to the right directory on the server
rougeronj
parents: 345
diff changeset
   104
                 {expand: true, cwd: 'dist', src: ['**', '!data/*', '!lib/**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/renkan/', filter: 'isFile'},
7a5905153e66 extend copy-server task in grunt to copy lib folder to the right directory on the server
rougeronj
parents: 345
diff changeset
   105
                 {expand: true, cwd: 'dist/lib', src: ['**'], dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/', filter: 'isFile'}
7a5905153e66 extend copy-server task in grunt to copy lib folder to the right directory on the server
rougeronj
parents: 345
diff changeset
   106
         ]
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
       }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
    },
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
    jshint: {
293
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   110
      options: {
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   111
        curly: true,
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   112
        eqeqeq: true,
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   113
        eqnull: true,
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   114
        browser: true,
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   115
        globals: {
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   116
          jQuery: true
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   117
        },
fba23fde14ba Correct jshint errors and force it on build
ymh <ymh.work@gmail.com>
parents: 292
diff changeset
   118
      },
295
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
   119
      all: ['Gruntfile.js', 'js/**/*.js', 'data/simple-persist.js']
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
    },
344
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   121
    bower: {
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   122
        install: {
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   123
            options: {
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   124
                targetDir: './lib',
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   125
                layout: 'byComponent',
345
cb5c0007c9f9 continue bower integration
ymh <ymh.work@gmail.com>
parents: 344
diff changeset
   126
                install: true,
344
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   127
                verbose: false,
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   128
                cleanTargetDir: false,
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   129
                cleanBowerDir: false,
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   130
                bowerOptions: {}
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   131
            }
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   132
        }
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   133
    },
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
    connect: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
        server: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
          options: {
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
            port: 9001,
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
            base: '.',
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
            keepalive: true,
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
            useAvailablePort: true,
295
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
   141
            debug: true,
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
   142
            middleware: function(connect, options, middlewares) {
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
   143
              middlewares.push(simplePersist.middleware);
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
   144
              return middlewares;
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
   145
            }
bcac9ea07d04 add simple-persist in grunt connect
ymh <ymh.work@gmail.com>
parents: 294
diff changeset
   146
          },
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
        }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
    }
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
  });
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
  // Load the plugin that provides the "uglify" task.
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
  grunt.loadNpmTasks('grunt-contrib-requirejs');
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
  grunt.loadNpmTasks('grunt-contrib-uglify');
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
  grunt.loadNpmTasks('grunt-contrib-concat');
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   155
  grunt.loadNpmTasks('grunt-contrib-clean');
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   156
  grunt.loadNpmTasks('grunt-contrib-cssmin');
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   157
  grunt.loadNpmTasks('grunt-contrib-copy');
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   158
  grunt.loadNpmTasks('grunt-contrib-jshint');
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   159
  grunt.loadNpmTasks('grunt-contrib-connect');
344
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   160
  grunt.loadNpmTasks('grunt-bower-task');
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   161
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   162
  // Default task(s).
344
e616c4fff297 start adding bower. remove and forget lib folder. this folder is now managed by grunt
ymh <ymh.work@gmail.com>
parents: 342
diff changeset
   163
  grunt.registerTask('default', ['jshint', 'requirejs', 'concat', 'uglify', 'cssmin', 'bower:install', 'copy:renkan', 'copy:renkan_css', 'clean:renderer']);
342
2306317213a1 publish a new version of renkan in django server part and add a grunt target to do it
ymh <ymh.work@gmail.com>
parents: 320
diff changeset
   164
  grunt.registerTask('copy-server', 'copy files to server part', function(){
2306317213a1 publish a new version of renkan in django server part and add a grunt target to do it
ymh <ymh.work@gmail.com>
parents: 320
diff changeset
   165
      grunt.task.run(['copy:renkan_server']);
2306317213a1 publish a new version of renkan in django server part and add a grunt target to do it
ymh <ymh.work@gmail.com>
parents: 320
diff changeset
   166
  });
290
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   167
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   168
8a6eb26ac87f move client build to Grunt and relocate it into client folder. Adjust server to work with the new build.
ymh <ymh.work@gmail.com>
parents:
diff changeset
   169
};