client/gruntfile.js
author durandn
Thu, 21 Apr 2016 15:18:19 +0200
changeset 605 13d355fd09bf
parent 600 e12243191095
child 647 eaaa1efce396
permissions -rw-r--r--
updated uri to allow optional trailing slash on single resource URIs (django automatic redirects don't carry over the Authorization header that can sometimes be needed, for instance with OAuth)
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:",
555
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
    44
                        'screenfull': "empty:"
600
e12243191095 correct jquery dependency in renkan renderer + problem with CKEditor + version
ymh <ymh.work@gmail.com>
parents: 598
diff changeset
    45
                    },
e12243191095 correct jquery dependency in renkan renderer + problem with CKEditor + version
ymh <ymh.work@gmail.com>
parents: 598
diff changeset
    46
                    include: [ "jquery-private"],
497
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
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    50
        jst: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    51
            compile: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    52
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    53
                    namespace: 'renkanJST',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    54
                    //amd: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    55
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    56
                files: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    57
                    "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
    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
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    61
        uglify: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    62
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    63
                banner: renkan_banner,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    64
                sourceMap: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    65
                sourceMapIncludeSources: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    66
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    67
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    68
                files: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    69
                    '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
    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
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    73
        concat: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    74
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    75
                banner: renkan_banner
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    76
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    77
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    78
                files: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    79
                    '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
    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
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    83
        clean: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    84
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    85
                force: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    86
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    87
            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
    88
            jst: ["dist/js/templates.js"],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    89
            renkan: ["dist/"],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    90
            lib: ["lib/"],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    91
            bower: ["bower_components/"]
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    92
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    93
        cssmin: {
468
364c367df7fc add rich text editor for description
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
    94
            options: {
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    95
                banner: renkan_banner
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    96
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    97
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    98
                expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
    99
                cwd: 'css/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   100
                src: ['*.css'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   101
                dest: 'dist/css',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   102
                ext: '.min.css'
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
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   105
        copy: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   106
            vendors: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   107
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   108
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   109
                    cwd: 'vendors/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   110
                    src: ['**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   111
                    dest: 'lib/'
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
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   114
            renkan: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   115
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   116
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   117
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   118
                    src: ['img/*'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   119
                    dest: 'dist/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   120
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   121
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   122
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   123
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   124
                    src: ['data/properties.json'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   125
                    dest: 'dist/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   126
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   127
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   128
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   129
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   130
                    src: ['lib/**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   131
                    dest: 'dist/'
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
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   134
            renkan_css: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   135
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   136
                    process: function(content, srcpath) {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   137
                        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
   138
                    }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   139
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   140
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   141
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   142
                    cwd: '',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   143
                    src: ['css/*'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   144
                    dest: 'dist/',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   145
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   146
                }]
468
364c367df7fc add rich text editor for description
ymh <ymh.work@gmail.com>
parents: 444
diff changeset
   147
            },
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   148
            renkan_server: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   149
                files: [{
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   150
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   151
                    cwd: 'dist',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   152
                    src: ['**', '!data/*', '!lib/**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   153
                    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
   154
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   155
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   156
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   157
                    cwd: 'dist/lib',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   158
                    src: ['**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   159
                    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
   160
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   161
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   162
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   163
                    cwd: 'dist',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   164
                    src: ['**', '!data/*', '!lib/**'],
598
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   165
                    dest: '../server/python/django2/renkanmanager/static/renkanmanager/lib/renkan/',
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   166
                    filter: 'isFile'
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   167
                }, {
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   168
                    expand: true,
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   169
                    cwd: 'dist/lib',
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   170
                    src: ['**'],
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   171
                    dest: '../server/python/django2/renkanmanager/static/renkanmanager/lib/',
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   172
                    filter: 'isFile'
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   173
                }, {
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   174
                    expand: true,
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   175
                    cwd: 'dist',
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   176
                    src: ['**', '!data/*', '!lib/**'],
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   177
                    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
   178
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   179
                }, {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   180
                    expand: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   181
                    cwd: 'dist/lib',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   182
                    src: ['**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   183
                    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
   184
                    filter: 'isFile'
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   185
                }]
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   186
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   187
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   188
        jshint: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   189
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   190
                curly: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   191
                eqeqeq: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   192
                eqnull: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   193
                browser: true,
501
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   194
                esnext: true,
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   195
                globals: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   196
                    jQuery: true
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   197
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   198
            },
501
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   199
            all: [
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   200
                'Gruntfile.js',
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   201
                'js/**/*.js',
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   202
                'data/simple-persist.js'
a509adc8ac10 small gruntfile correction + version
ymh <ymh.work@gmail.com>
parents: 500
diff changeset
   203
            ]
497
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
        bower: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   206
            install: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   207
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   208
                    targetDir: './lib',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   209
                    layout: 'byComponent',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   210
                    install: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   211
                    verbose: false,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   212
                    cleanTargetDir: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   213
                    cleanBowerDir: false,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   214
                    bowerOptions: {}
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   215
                }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   216
            }
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
        watch: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   219
            css: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   220
                files: ['css/**/*.css'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   221
                tasks: ['cssmin', 'copy:renkan_css'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   222
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   223
            js: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   224
                files: ['js/**/*.js', 'templates/**/*.html'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   225
                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
   226
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   227
            lib: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   228
                files: ['bower.json'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   229
                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
   230
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   231
            vendors: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   232
                files: ['vendors/**'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   233
                tasks: ['copy:vendors', 'copy:renkan'],
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   234
            },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   235
            options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   236
                interrupt: true,
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
        connect: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   240
            server: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   241
                options: {
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   242
                    port: 9001,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   243
                    base: '.',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   244
                    useAvailablePort: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   245
                    debug: true,
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   246
                    middleware: function(connect, options, middlewares) {
600
e12243191095 correct jquery dependency in renkan renderer + problem with CKEditor + version
ymh <ymh.work@gmail.com>
parents: 598
diff changeset
   247
                        middlewares.unshift(simplePersist.middleware);
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   248
                        return middlewares;
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   249
                    }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   250
                },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   251
            }
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   252
        },
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   253
        umd: {
555
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
   254
            'screenfull': {
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
   255
                options: {
561
5feabdc61980 correct grunt for correct handling of screenfull in umd. publish new version
ymh <ymh.work@gmail.com>
parents: 555
diff changeset
   256
                    src: 'lib/screenfull/screenfull.js',
555
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
   257
                    dest: 'lib/screenfull/screenfull-umd.js',
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
   258
                    objectToExport: 'screenfull',
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
   259
                    amdModuleId: 'screenfull'
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
   260
                }
49daeea94e88 New library to handle fullscreen : screenfull.js
rougeronj
parents: 501
diff changeset
   261
            },
500
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   262
        },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   263
        replace: {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   264
            'version-bower-package': {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   265
                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
   266
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   267
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   268
                    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
   269
                    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
   270
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   271
            },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   272
            'version-gradle': {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   273
                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
   274
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   275
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   276
                    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
   277
                    to: "$1version = \'<%= setversion.version %>\'",
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   278
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   279
            },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   280
            'version-maven': {
574
de0d488a0a1b add call to grunt to build client before compilation of java server and correct maven spring version problem
ymh <ymh.work@gmail.com>
parents: 561
diff changeset
   281
                src: ['../server/java/pom.xml', '../server/java/renkan-core/pom.xml', '../server/java/renkan-web/pom.xml', '../server/java/renkan-management/pom.xml'],
500
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   282
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   283
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   284
                    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
   285
                    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
   286
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   287
            },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   288
            'version-django': {
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   289
                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
   290
                overwrite: true,
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   291
                replacements: [{
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   292
                    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
   293
                    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
   294
                        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
   295
                        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
   296
                        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
   297
                            array_version.push('0');
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
                        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
   300
                    },
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   301
                }]
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   302
            },
598
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   303
            'version-django2': {
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   304
                src: ['../server/python/django2/renkanmanager/__init__.py'],
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   305
                overwrite: true,
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   306
                replacements: [{
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   307
                    from: /^(\s*)VERSION\s*=\s*\([ \t]*\d+[ \t]*,[ \t]*\d+[ \t]*,[ \t]*\d+[ \t]*,[ \t]*\"final\"[ \t]*\,[ \t]*0[ \t]*\)[ \t]*$/m,
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   308
                    to: function(matchedWord, index, fullText, regexMatches) {
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   309
                        var array_version = grunt.config.get('setversion.version').split('.');
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   310
                        var array_version_length = array_version.length;
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   311
                        for(let i=0;i<3-array_version_length;i++) {
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   312
                            array_version.push('0');
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   313
                        }
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   314
                        return regexMatches[0]+"VERSION = (" + array_version.join(', ') + ", \"final\", 0)";
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   315
                    },
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   316
                }]
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   317
            },
500
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   318
        },
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   319
    });
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   320
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   321
    // Load the plugins.
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   322
    grunt.loadNpmTasks('grunt-contrib-requirejs');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   323
    grunt.loadNpmTasks('grunt-contrib-uglify');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   324
    grunt.loadNpmTasks('grunt-contrib-concat');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   325
    grunt.loadNpmTasks('grunt-contrib-clean');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   326
    grunt.loadNpmTasks('grunt-contrib-cssmin');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   327
    grunt.loadNpmTasks('grunt-contrib-copy');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   328
    grunt.loadNpmTasks('grunt-contrib-jshint');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   329
    grunt.loadNpmTasks('grunt-contrib-connect');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   330
    grunt.loadNpmTasks('grunt-bower-task');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   331
    grunt.loadNpmTasks('grunt-contrib-jst');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   332
    grunt.loadNpmTasks('grunt-contrib-watch');
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   333
    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
   334
    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
   335
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   336
    // Default task(s).
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   337
    grunt.registerTask('base', [
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   338
        'jshint',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   339
        'bower:install',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   340
        'copy:vendors',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   341
        'clean:renkan',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   342
        'requirejs',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   343
        'jst',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   344
        'concat',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   345
        'uglify',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   346
        'cssmin',
561
5feabdc61980 correct grunt for correct handling of screenfull in umd. publish new version
ymh <ymh.work@gmail.com>
parents: 555
diff changeset
   347
        'umd:screenfull',
497
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   348
        'copy:renkan',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   349
        'copy:renkan_css',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   350
        'clean:renderer',
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   351
    ]);
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   352
    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
   353
    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
   354
        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
   355
    });
3ba7920facf4 Correct dependency and loading problem for ckeditor with dojo
ymh <ymh.work@gmail.com>
parents: 490
diff changeset
   356
    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
   357
    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
   358
        grunt.config.set('setversion.version', version);
598
eb4f4eceada0 create new renkan version
ymh <ymh.work@gmail.com>
parents: 574
diff changeset
   359
        grunt.task.run(['replace:version-bower-package', 'replace:version-gradle', 'replace:version-maven', 'replace:version-django', 'replace:version-django2']);
500
fb3a062bc720 define grunt task to change version numbers in projects files
ymh <ymh.work@gmail.com>
parents: 497
diff changeset
   360
    });
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
   361
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
   362
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
   363
};