client/gruntfile.js
author ymh <ymh.work@gmail.com>
Thu, 10 Sep 2015 01:01:58 +0200
changeset 501 a509adc8ac10
parent 500 fb3a062bc720
child 555 49daeea94e88
permissions -rw-r--r--
small gruntfile correction + version
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
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
     5
    'use strict';
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
     6
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
     7
    var renkan_src = [
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
     8
        'dist/js/templates.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
     9
        'js/main.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    10
        'js/router.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    11
        'js/dataloader.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    12
        'js/models.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    13
        'js/defaults.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    14
        'js/i18n.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    15
        'js/full-json.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    16
        'js/save-once.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    17
        'js/ldtjson-bin.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    18
        'js/list-bin.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    19
        'js/wikipedia-bin.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    20
        'dist/js/paper-renderer.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    21
    ];
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
    22
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    23
    var renkan_banner = grunt.file.read('js/header.js').toString() +
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    24
        '\n/*! <%= pkg.name %> - v<%= pkg.version %> - Copyright © IRI ' +
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    25
        '<%= grunt.template.today("yyyy") %> */\n\n';
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
    26
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    27
    // Project configuration.
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    28
    grunt.initConfig({
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    29
        pkg: grunt.file.readJSON('package.json'),
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    30
        requirejs: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    31
            renderer: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    32
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    33
                    baseUrl: "js/",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    34
                    name: "main-renderer",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    35
                    out: "dist/js/paper-renderer.js",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    36
                    optimize: "none",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    37
                    beautify: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    38
                    paths: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    39
                        requtils: "require-utils",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    40
                        jquery: "empty:",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    41
                        underscore: "empty:",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    42
                        filesaver: "empty:",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    43
                        'ckeditor-core': "empty:",
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    44
                        'ckeditor-jquery': "empty:"
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    45
                    }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    46
                }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    47
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    48
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    49
        jst: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    50
            compile: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    51
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    52
                    namespace: 'renkanJST',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    53
                    //amd: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    54
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    55
                files: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    56
                    "dist/js/templates.js": ["templates/**/*.html"]
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    57
                }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    58
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    59
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    60
        uglify: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    61
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    62
                banner: renkan_banner,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    63
                sourceMap: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    64
                sourceMapIncludeSources: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    65
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    66
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    67
                files: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    68
                    'dist/js/renkan.min.js': renkan_src
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    69
                }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    70
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    71
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    72
        concat: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    73
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    74
                banner: renkan_banner
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    75
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    76
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    77
                files: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    78
                    'dist/js/renkan.js': renkan_src
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    79
                }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    80
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    81
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    82
        clean: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    83
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    84
                force: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    85
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    86
            renderer: ["dist/js/paper-renderer.js"],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    87
            jst: ["dist/js/templates.js"],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    88
            renkan: ["dist/"],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    89
            lib: ["lib/"],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    90
            bower: ["bower_components/"]
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    91
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    92
        cssmin: {
468
364c367df7fc add rich text editor for description
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
    93
            options: {
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    94
                banner: renkan_banner
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    95
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    96
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    97
                expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    98
                cwd: 'css/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    99
                src: ['*.css'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   100
                dest: 'dist/css',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   101
                ext: '.min.css'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   102
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   103
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   104
        copy: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   105
            vendors: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   106
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   107
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   108
                    cwd: 'vendors/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   109
                    src: ['**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   110
                    dest: 'lib/'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   111
                }],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   112
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   113
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   114
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   115
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   116
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   117
                    src: ['img/*'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   118
                    dest: 'dist/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   119
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   120
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   121
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   122
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   123
                    src: ['data/properties.json'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   124
                    dest: 'dist/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   125
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   126
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   127
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   128
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   129
                    src: ['lib/**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   130
                    dest: 'dist/'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   131
                }]
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   132
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   133
            renkan_css: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   134
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   135
                    process: function(content, srcpath) {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   136
                        return grunt.template.process(renkan_banner) + content;
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   137
                    }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   138
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   139
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   140
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   141
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   142
                    src: ['css/*'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   143
                    dest: 'dist/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   144
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   145
                }]
468
364c367df7fc add rich text editor for description
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   146
            },
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   147
            renkan_server: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   148
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   149
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   150
                    cwd: 'dist',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   151
                    src: ['**', '!data/*', '!lib/**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   152
                    dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/renkan/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   153
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   154
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   155
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   156
                    cwd: 'dist/lib',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   157
                    src: ['**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   158
                    dest: '../server/python/django/renkanmanager/static/renkanmanager/lib/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   159
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   160
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   161
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   162
                    cwd: 'dist',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   163
                    src: ['**', '!data/*', '!lib/**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   164
                    dest: '../server/php/basic/public_html/static/lib/renkan/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   165
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   166
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   167
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   168
                    cwd: 'dist/lib',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   169
                    src: ['**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   170
                    dest: '../server/php/basic/public_html/static/lib/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   171
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   172
                }]
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   173
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   174
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   175
        jshint: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   176
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   177
                curly: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   178
                eqeqeq: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   179
                eqnull: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   180
                browser: true,
501
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   181
                esnext: true,
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   182
                globals: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   183
                    jQuery: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   184
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   185
            },
501
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   186
            all: [
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   187
                'Gruntfile.js',
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   188
                'js/**/*.js',
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   189
                'data/simple-persist.js'
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   190
            ]
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   191
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   192
        bower: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   193
            install: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   194
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   195
                    targetDir: './lib',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   196
                    layout: 'byComponent',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   197
                    install: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   198
                    verbose: false,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   199
                    cleanTargetDir: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   200
                    cleanBowerDir: false,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   201
                    bowerOptions: {}
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   202
                }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   203
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   204
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   205
        watch: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   206
            css: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   207
                files: ['css/**/*.css'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   208
                tasks: ['cssmin', 'copy:renkan_css'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   209
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   210
            js: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   211
                files: ['js/**/*.js', 'templates/**/*.html'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   212
                tasks: ['jshint', 'requirejs', 'jst', 'concat', 'uglify', 'copy:renkan', 'clean:renderer'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   213
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   214
            lib: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   215
                files: ['bower.json'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   216
                tasks: ['bower:install', 'copy:vendors', 'copy:renkan'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   217
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   218
            vendors: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   219
                files: ['vendors/**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   220
                tasks: ['copy:vendors', 'copy:renkan'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   221
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   222
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   223
                interrupt: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   224
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   225
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   226
        connect: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   227
            server: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   228
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   229
                    port: 9001,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   230
                    base: '.',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   231
                    useAvailablePort: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   232
                    debug: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   233
                    middleware: function(connect, options, middlewares) {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   234
                        middlewares.push(simplePersist.middleware);
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   235
                        return middlewares;
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   236
                    }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   237
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   238
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   239
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   240
        umd: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   241
            'ckeditor-core': {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   242
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   243
                    src: 'dist/lib/ckeditor/ckeditor.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   244
                    dest: 'dist/lib/ckeditor/ckeditor-umd.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   245
                    objectToExport: 'CKEDITOR',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   246
                    amdModuleId: 'ckeditor'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   247
                }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   248
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   249
            'ckeditor-jquery': {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   250
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   251
                    src: 'dist/lib/ckeditor/adapters/jquery.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   252
                    dest: 'dist/lib/ckeditor/adapters/jquery-umd.js',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   253
                    amdModuleId: 'ckeditor-jquery',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   254
                    deps: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   255
                        'default': ['jquery', 'ckeditor'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   256
                    }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   257
                }
468
364c367df7fc add rich text editor for description
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   258
            }
500
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   259
        },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   260
        replace: {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   261
            'version-bower-package': {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   262
                src: ['package.json', 'bower.json'],
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   263
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   264
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   265
                    from: /^(\s+)\"version\"\:\s*\"([\d\.]+)\"\,[ \t]*$/m,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   266
                    to: "$1\"version\"\: \"<%= setversion.version %>\",",
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   267
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   268
            },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   269
            'version-gradle': {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   270
                src: ['../server/java/build.gradle'],
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   271
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   272
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   273
                    from: /^(\s+)version\s*\=\s*\'([\d\.]+)\'[ \t]*$/m,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   274
                    to: "$1version = \'<%= setversion.version %>\'",
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   275
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   276
            },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   277
            'version-maven': {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   278
                src: ['../server/java/pom.xml'],
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   279
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   280
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   281
                    from: /^(\s+)<version>\s*([\d\.]+)\s*<\/version>[ \t]*$/m,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   282
                    to: "$1<version><%= setversion.version %></version>",
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   283
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   284
            },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   285
            'version-django': {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   286
                src: ['../server/python/django/renkanmanager/__init__.py'],
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   287
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   288
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   289
                    from: /^(\s*)VERSION\s*=\s*\([ \t]*\d+[ \t]*,[ \t]*\d+[ \t]*,[ \t]*\d+[ \t]*,[ \t]*\"final\"[ \t]*\,[ \t]*0[ \t]*\)[ \t]*$/m,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   290
                    to: function(matchedWord, index, fullText, regexMatches) {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   291
                        var array_version = grunt.config.get('setversion.version').split('.');
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   292
                        var array_version_length = array_version.length;
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   293
                        for(let i=0;i<3-array_version_length;i++) {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   294
                            array_version.push('0');
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   295
                        }
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   296
                        return regexMatches[0]+"VERSION = (" + array_version.join(', ') + ", \"final\", 0)";
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   297
                    },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   298
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   299
            },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   300
        },
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   301
    });
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   302
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   303
    // Load the plugins.
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   304
    grunt.loadNpmTasks('grunt-contrib-requirejs');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   305
    grunt.loadNpmTasks('grunt-contrib-uglify');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   306
    grunt.loadNpmTasks('grunt-contrib-concat');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   307
    grunt.loadNpmTasks('grunt-contrib-clean');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   308
    grunt.loadNpmTasks('grunt-contrib-cssmin');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   309
    grunt.loadNpmTasks('grunt-contrib-copy');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   310
    grunt.loadNpmTasks('grunt-contrib-jshint');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   311
    grunt.loadNpmTasks('grunt-contrib-connect');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   312
    grunt.loadNpmTasks('grunt-bower-task');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   313
    grunt.loadNpmTasks('grunt-contrib-jst');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   314
    grunt.loadNpmTasks('grunt-contrib-watch');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   315
    grunt.loadNpmTasks('grunt-umd');
500
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   316
    grunt.loadNpmTasks('grunt-text-replace');
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
   317
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   318
    // Default task(s).
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   319
    grunt.registerTask('base', [
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   320
        'jshint',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   321
        'bower:install',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   322
        'copy:vendors',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   323
        'clean:renkan',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   324
        'requirejs',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   325
        'jst',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   326
        'concat',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   327
        'uglify',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   328
        'cssmin',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   329
        'copy:renkan',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   330
        'copy:renkan_css',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   331
        'clean:renderer',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   332
        'umd:ckeditor-core',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   333
        'umd:ckeditor-jquery'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   334
    ]);
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   335
    grunt.registerTask('default', ['base', 'clean:jst']);
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   336
    grunt.registerTask('copy-server', 'copy files to server part', function() {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   337
        grunt.task.run(['copy:renkan_server']);
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   338
    });
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   339
    grunt.registerTask('dev', ['base', 'connect:server', 'watch']);
500
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   340
    grunt.registerTask('set-version', function(version) {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   341
        grunt.config.set('setversion.version', version);
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   342
        grunt.task.run(['replace:version-bower-package', 'replace:version-gradle', 'replace:version-maven', 'replace:version-django']);
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   343
    });
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
   344
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
   345
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
   346
};