<commit_before>module.exports = function (grunt) {
    'use strict';

    require('time-grunt')(grunt);

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        banner: '/*! { ' +
            '"name": "<%= pkg.name %>", ' +
            '"version": "<%= pkg.version %>", ' +
            '<%= pkg.homepage ? "\\"homepage\\": \\"" + pkg.homepage + "\\"," : "" %>' +
            '"copyright": "(c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>" ' +
        '} */',

        dirs :{
            tmp: './tmp',
            dist: './dist',
            coverage: '<%= dirs.dist %>/coverage'
        },
        clean: {
          tmp: {
            src: ['<%= dirs.tmp %>']
          },
          dist: {
            src: ['<%= dirs.dist %>']
          }
        },

        concat: {
            tmp: {
                options: {
                    stripBanners: true
                },
                src: [
                    'src/main/vissense.percentage-time-test.js'
                ],
                dest: '<%= dirs.tmp %>/vissense.plugin.percentage-time-test.js'
            },
            dist: {
                options: {
                  banner: '<%= banner %>',
                  stripBanners: true
                },
                src: '<%= concat.tmp.dest %>',
                dest: '<%= dirs.dist %>/vissense.plugin.percentage-time-test.js'
            }
        },
        uglify: {
            options: {
                banner: '<%= banner %>',
                report: 'gzip',
                drop_console: true
            },
            dist: {
                src: '<%= concat.dist.dest %>',
                dest: '<%= dirs.dist %>/vissense.plugin.percentage-time-test.min.js'
            }
        },
        jshint: {
            options: {
                jshintrc:true
            },
            gruntfile: {
                src: 'Gruntfile.js'
            },
            karma: {
                src: 'karma.conf.js'
            },
            src_test: {
                src: ['tmp/**/*.js', 'spec/**/*.js']
            }
        },

        jasmine: {
            coverage: {
                src: [
                    '<%= concat.dist.dest %>'
                ],
                options: {
                    display: 'full',
                    summary: true,
                    specs: ['spec/*Spec.js'],
                    helpers: [
                        'spec/*Helper.js'
                    ],
                    vendor: [
                        'bower_components/jquery/dist/jquery.min.js',
                        'bower_components/lodash/dist/lodash.min.js',
                        'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
                        'bower_components/vissense/dist/vissense.min.js'
                    ],
                    template: require('grunt-template-jasmine-istanbul'),
                    templateOptions: {
                        coverage: '<%= dirs.coverage %>/coverage.json',
                        report: [{
                                type: 'html',
                                options: {
                                    dir: '<%= dirs.coverage %>/html'
                                }
                            }, {
                                type: 'lcov',
                                options: {
                                    dir: '<%= dirs.coverage %>/lcov'
                                }
                            }, {
                                type: 'text-summary'
                            }
                        ]
                    }
                }
            }
        },
        connect: {
            server: {
                options: {
                    hostname: 'localhost',
                    port: 3000,
                    base: './'
                }
            }
        },
        watch: {
            gruntfile: {
                files: '<%= jshint.gruntfile.src %>',
                tasks: ['jshint:gruntfile']
            },
            src_test: {
                files: '<%= jshint.src_test.src %>',
                tasks: ['jshint:src_test', 'default']
            }
        },
        bump: {
            options: {
                files: ['package.json', 'bower.json'],
                updateConfigs: [],
                commit: true,
                commitMessage: 'release v%VERSION%',
                commitFiles: ['-a'],
                createTag: true,
                tagName: '%VERSION%',
                tagMessage: 'version %VERSION%',
                push: false,
                pushTo: 'upstream',
                gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
            }
        },
        karma: {
            unit: {
                configFile: 'karma.conf.js'
            }
        },
        micro: {
            options: {
              limit: 1024
            },
            dist: {
              src: '<%= uglify.dist.dest %>'
            }
        },
        coveralls: {
            options: {
                force: true
            },
            target: {
                src: '<%= dirs.coverage %>/lcov/lcov.info'
            }
        },
        notify: {
            js: {
                options: {
                    title: 'Javascript - <%= pkg.title %>',
                    message: 'Minified and validated with success!'
                }
            },
            test: {
                options: {
                    title: 'Javascript - <%= pkg.title %>',
                    message: 'Tests successfully finished!'
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-contrib-jasmine');
    grunt.loadNpmTasks('grunt-contrib-clean');

    grunt.loadNpmTasks('grunt-bump');
    grunt.loadNpmTasks('grunt-karma');
    grunt.loadNpmTasks('grunt-micro');
    grunt.loadNpmTasks('grunt-notify');

    grunt.registerTask('dist', ['clean:tmp', 'concat:tmp', 'jshint', 'clean:dist', 'concat:dist', 'uglify', 'clean:tmp']);
    grunt.registerTask('default', ['dist', 'test', 'micro', 'notify:js']);

    grunt.registerTask('serve', ['default', 'connect:server', 'watch']);
    grunt.registerTask('test', ['jasmine', 'karma', 'notify:test']);

    grunt.registerTask('coverage', ['coveralls']);
};

<commit_msg>load task grunt-coveralls<commit_after>module.exports = function (grunt) {
    'use strict';

    require('time-grunt')(grunt);

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        banner: '/*! { ' +
            '"name": "<%= pkg.name %>", ' +
            '"version": "<%= pkg.version %>", ' +
            '<%= pkg.homepage ? "\\"homepage\\": \\"" + pkg.homepage + "\\"," : "" %>' +
            '"copyright": "(c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>" ' +
        '} */',

        dirs :{
            tmp: './tmp',
            dist: './dist',
            coverage: '<%= dirs.dist %>/coverage'
        },
        clean: {
          tmp: {
            src: ['<%= dirs.tmp %>']
          },
          dist: {
            src: ['<%= dirs.dist %>']
          }
        },

        concat: {
            tmp: {
                options: {
                    stripBanners: true
                },
                src: [
                    'src/main/vissense.percentage-time-test.js'
                ],
                dest: '<%= dirs.tmp %>/vissense.plugin.percentage-time-test.js'
            },
            dist: {
                options: {
                  banner: '<%= banner %>',
                  stripBanners: true
                },
                src: '<%= concat.tmp.dest %>',
                dest: '<%= dirs.dist %>/vissense.plugin.percentage-time-test.js'
            }
        },
        uglify: {
            options: {
                banner: '<%= banner %>',
                report: 'gzip',
                drop_console: true
            },
            dist: {
                src: '<%= concat.dist.dest %>',
                dest: '<%= dirs.dist %>/vissense.plugin.percentage-time-test.min.js'
            }
        },
        jshint: {
            options: {
                jshintrc:true
            },
            gruntfile: {
                src: 'Gruntfile.js'
            },
            karma: {
                src: 'karma.conf.js'
            },
            src_test: {
                src: ['tmp/**/*.js', 'spec/**/*.js']
            }
        },

        jasmine: {
            coverage: {
                src: [
                    '<%= concat.dist.dest %>'
                ],
                options: {
                    display: 'full',
                    summary: true,
                    specs: ['spec/*Spec.js'],
                    helpers: [
                        'spec/*Helper.js'
                    ],
                    vendor: [
                        'bower_components/jquery/dist/jquery.min.js',
                        'bower_components/lodash/dist/lodash.min.js',
                        'bower_components/jasmine-jquery/lib/jasmine-jquery.js',
                        'bower_components/vissense/dist/vissense.min.js'
                    ],
                    template: require('grunt-template-jasmine-istanbul'),
                    templateOptions: {
                        coverage: '<%= dirs.coverage %>/coverage.json',
                        report: [{
                                type: 'html',
                                options: {
                                    dir: '<%= dirs.coverage %>/html'
                                }
                            }, {
                                type: 'lcov',
                                options: {
                                    dir: '<%= dirs.coverage %>/lcov'
                                }
                            }, {
                                type: 'text-summary'
                            }
                        ]
                    }
                }
            }
        },
        connect: {
            server: {
                options: {
                    hostname: 'localhost',
                    port: 3000,
                    base: './'
                }
            }
        },
        watch: {
            gruntfile: {
                files: '<%= jshint.gruntfile.src %>',
                tasks: ['jshint:gruntfile']
            },
            src_test: {
                files: '<%= jshint.src_test.src %>',
                tasks: ['jshint:src_test', 'default']
            }
        },
        bump: {
            options: {
                files: ['package.json', 'bower.json'],
                updateConfigs: [],
                commit: true,
                commitMessage: 'release v%VERSION%',
                commitFiles: ['-a'],
                createTag: true,
                tagName: '%VERSION%',
                tagMessage: 'version %VERSION%',
                push: false,
                pushTo: 'upstream',
                gitDescribeOptions: '--tags --always --abbrev=1 --dirty=-d'
            }
        },
        karma: {
            unit: {
                configFile: 'karma.conf.js'
            }
        },
        micro: {
            options: {
              limit: 1024
            },
            dist: {
              src: '<%= uglify.dist.dest %>'
            }
        },
        coveralls: {
            options: {
                force: true
            },
            target: {
                src: '<%= dirs.coverage %>/lcov/lcov.info'
            }
        },
        notify: {
            js: {
                options: {
                    title: 'Javascript - <%= pkg.title %>',
                    message: 'Minified and validated with success!'
                }
            },
            test: {
                options: {
                    title: 'Javascript - <%= pkg.title %>',
                    message: 'Tests successfully finished!'
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-contrib-jasmine');
    grunt.loadNpmTasks('grunt-contrib-clean');

    grunt.loadNpmTasks('grunt-bump');
    grunt.loadNpmTasks('grunt-coveralls');
    grunt.loadNpmTasks('grunt-karma');
    grunt.loadNpmTasks('grunt-micro');
    grunt.loadNpmTasks('grunt-notify');

    grunt.registerTask('dist', ['clean:tmp', 'concat:tmp', 'jshint', 'clean:dist', 'concat:dist', 'uglify', 'clean:tmp']);
    grunt.registerTask('default', ['dist', 'test', 'micro', 'notify:js']);

    grunt.registerTask('serve', ['default', 'connect:server', 'watch']);
    grunt.registerTask('test', ['jasmine', 'karma', 'notify:test']);

    grunt.registerTask('coverage', ['coveralls']);
};

<|endoftext|>


<commit_before>"use strict"

module.exports = function( grunt ) {

  grunt.initConfig({

    copy: {
      src: {
        files: [
          { expand: true, cwd: "src/css", src: [ "*.css" ], dest: "tmp/css" },
          { expand: true, cwd: "src/images", src: [ "**" ], dest: "tmp/images" },
          { expand: true, cwd: "src", src: [ "*.html" ], dest: "tmp" }
        ]
      },
      tmp: {
        files: [
          { expand: true, cwd: "tmp", src: [ "*.html" ], dest: "dist" }
        ]
      }
    },

    connect: {
      options: {
        port: "8080",
        useAvailablePort: true,
        livereload: true,
        open: true
      },
      dev: {
        options: {
          base: "tmp/"
        }
      }
    },

    watch: {
      src: {
        files: [ "src/css/**/*.{css,less}", "src/images/**/*.{gif,png,jpg,jpeg}", "src/**/*.html" ],
        tasks: [ "build:development" ],
        options: {
          livereload: true
        }
      }
    },

    less: {
      compile: {
        files: {
          "tmp/css/core.css": "src/css/core.less"
        }
      }
    },

    imagemin: {
      dist: {
        files: [
          { expand: true, cwd: "tmp/images", src: [ "**/*.{png,jpg,jpeg}" ], dest: "dist/images" }
        ]
      }
    },

    uncss: {
      dist: {
        files: {
          "tmp/css/core.css": [ "tmp/index.html" ]
        }
      }
    },

    htmlmin: {
      dist: {
        options: {
          removeComments: true
        },
        files: {
          "tmp/index.html": "tmp/index.html"
        }
      }
    },

    premailer: {
      options: {
        removeClasses: true
      },
      dist: {
        files: {
          "tmp/index.html": "tmp/index.html"
        }
      }
    }
  });

  grunt.registerTask( "start", "Compiles the development environment", [
    "build:development",
    "connect:dev",
    "watch:src"
  ]);

  grunt.registerTask( "build:development", "Compiles the development build", [
    "copy:src",
    "less:compile",
    "copy:tmp"
  ]);

  grunt.registerTask( "build:distribution", "Compiles the distribution build", [
    "copy:src",
    "less:compile",
    "uncss:dist",
    "htmlmin:dist",
    "premailer:dist",
    "imagemin:dist",
    "copy:tmp"
  ]);

  grunt.loadNpmTasks( "grunt-contrib-copy" );
  grunt.loadNpmTasks( "grunt-contrib-connect" );
  grunt.loadNpmTasks( "grunt-contrib-watch" );
  grunt.loadNpmTasks( "grunt-contrib-imagemin" );
  grunt.loadNpmTasks( "grunt-uncss" );
  grunt.loadNpmTasks( "grunt-contrib-htmlmin" );
  grunt.loadNpmTasks( "grunt-premailer" );
  grunt.loadNpmTasks( "grunt-contrib-less" );

};
<commit_msg>Change names of grunt commands.<commit_after>"use strict"

module.exports = function( grunt ) {

  grunt.initConfig({

    copy: {
      src: {
        files: [
          { expand: true, cwd: "src/css", src: [ "*.css" ], dest: "tmp/css" },
          { expand: true, cwd: "src/images", src: [ "**" ], dest: "tmp/images" },
          { expand: true, cwd: "src", src: [ "*.html" ], dest: "tmp" }
        ]
      },
      tmp: {
        files: [
          { expand: true, cwd: "tmp", src: [ "*.html" ], dest: "dist" }
        ]
      }
    },

    connect: {
      options: {
        port: "8080",
        useAvailablePort: true,
        livereload: true,
        open: true
      },
      dev: {
        options: {
          base: "tmp/"
        }
      }
    },

    watch: {
      src: {
        files: [ "src/css/**/*.{css,less}", "src/images/**/*.{gif,png,jpg,jpeg}", "src/**/*.html" ],
        tasks: [ "dev:build" ],
        options: {
          livereload: true
        }
      }
    },

    less: {
      compile: {
        files: {
          "tmp/css/core.css": "src/css/core.less"
        }
      }
    },

    imagemin: {
      dist: {
        files: [
          { expand: true, cwd: "tmp/images", src: [ "**/*.{png,jpg,jpeg}" ], dest: "dist/images" }
        ]
      }
    },

    uncss: {
      dist: {
        files: {
          "tmp/css/core.css": [ "tmp/index.html" ]
        }
      }
    },

    htmlmin: {
      dist: {
        options: {
          removeComments: true
        },
        files: {
          "tmp/index.html": "tmp/index.html"
        }
      }
    },

    premailer: {
      options: {
        removeClasses: true
      },
      dist: {
        files: {
          "tmp/index.html": "tmp/index.html"
        }
      }
    }
  });

  grunt.registerTask( "default", "Compiles the distribution build", [
    "copy:src",
    "less:compile",
    "uncss:dist",
    "htmlmin:dist",
    "premailer:dist",
    "imagemin:dist",
    "copy:tmp"
  ]);

  grunt.registerTask( "dev:build", "Compiles the development build", [
    "copy:src",
    "less:compile",
    "copy:tmp"
  ]);

  grunt.registerTask( "dev", "Compiles the development environment", [
    "dev:build",
    "connect:dev",
    "watch:src"
  ]);

  grunt.loadNpmTasks( "grunt-contrib-copy" );
  grunt.loadNpmTasks( "grunt-contrib-connect" );
  grunt.loadNpmTasks( "grunt-contrib-watch" );
  grunt.loadNpmTasks( "grunt-contrib-imagemin" );
  grunt.loadNpmTasks( "grunt-uncss" );
  grunt.loadNpmTasks( "grunt-contrib-htmlmin" );
  grunt.loadNpmTasks( "grunt-premailer" );
  grunt.loadNpmTasks( "grunt-contrib-less" );

};
<|endoftext|>


<commit_before>module.exports = function(grunt) {
  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    watch: {
      react: {
        files: ['components/**/*.jsx', 'dashboards/**/*.jsx'],
        tasks: ['browserify']
      }
    },

    browserify: {
      options: {
        transform: [ require('grunt-react').browserify ]
      },
      dashboards: {
        files: [
          {
            expand: true,
            cwd: 'dashboards/',
            src: ['*.jsx'],
            dest: 'src/main/resources/static/scripts/dashboards/',
            ext: '.built.js',
            extDot: 'first'
          }
        ]
      }
    },

    cssmin: {
      dashboards: {
        files: {
          'src/main/resources/static/styles/dashboard.built.css': ['node_modules/normalize.css/normalize.css']
        }
      }
    },

    copy: {
      fonts: {
        files: [
          {
            expand: true,
            cwd: 'node_modules/font-awesome/fonts/',
            src: ['*'],
            dest: 'src/main/resources/static/fonts/',
            filter: 'isFile'
          }
        ]
      }
    }
  });

  grunt.loadNpmTasks('grunt-browserify');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-watch');

  grunt.registerTask('build', ['browserify', 'cssmin', 'copy']);
  grunt.registerTask('default', ['build', 'watch']);
};
<commit_msg>Remove Gruntfile<commit_after><|endoftext|>


<commit_before>const webpackConfig = require("./webpack.config.js");

module.exports = (grunt)=>{
  // load npm tasks for grunt-* libs, excluding grunt-cli
  require("matchdep")
    .filterDev("{grunt,gruntify}-*")
    .filter((pkg) => {
      return ["grunt-cli"].indexOf(pkg) < 0;
    })
    .forEach(grunt.loadNpmTasks);

  grunt.initConfig({
    pkg: grunt.file.readJSON("package.json"),

    webpack: {
      myConfig: webpackConfig,
    },

    eslint: {
      src: ["src/**/*.js", "test/**/*.js"],
    },

    karma: {
      development: {
        configFile: "test/karma.conf.js",
      },
      test: {
        configFile: "test/karma.conf.js",
      },
    },

    // Minify SVGs from svg directory, output to svg-min
    svgmin: {
      dist: {
        files: [
          {
            expand: true,
            cwd: "assets/icons/svg",
            src: ["*.svg"],
            dest: "assets/icons/svg-min/",
            ext: ".svg",
          },
        ],
      },
      options: {
        plugins: [
          { removeViewBox: false },
          { removeEmptyAttrs: false },
          { removeTitle: true }, // "leaflet-toolbar" lets us specify the title attribute later
          {
            removeAttrs: {
              attrs: ["xmlns", "fill"],
            },
          },
        ],
      },
    },

    svg_sprite: {
      options: {
        // Task-specific options go here.
      },
      dist: {
        expand: true,
        cwd: "assets/icons/svg-min/",
        src: ["*.svg"],
        dest: "assets/icons/",
        options: {
          log: "info",
          mode: {
            symbol: {
              sprite: "sprite.symbol.svg",
              example: true,
            },
          },
        },
      },
    },

    watch: {
      options: {
        livereload: true,
      },
      source: {
        files: ["src/**/*.js", "test/**/*.js", "Gruntfile.js"],
        tasks: ["eslint", "karma:development:start"],
      },
    },
  });

  /* Run tests once. */
  grunt.registerTask("test", ["eslint", "karma:test"]);

  grunt.registerTask("build", [
    "eslint",
    "karma:development:start",
    "coverage",

    "webpack",
  ]);

  // recompile svg icon sprite
  grunt.registerTask("icons", ["svgmin", "svg_sprite"]);

  grunt.registerTask(
    "coverage",
    "CLI reporter for karma-coverage",
      ()=>{
      let coverageReports = grunt.file.expand("coverage/*/coverage.txt");
      let reports = {};
      let report;
      let i;
      let len;

      for (i = 0, len = coverageReports.length; i < len; i++) {
        report = grunt.file.read(coverageReports[i]);
        if (!reports[report]) {
          reports[report] = [coverageReports[i]];
        } else {
          reports[report].push(coverageReports[i]);
        }
      }

      for (report in reports) {
        if (reports.hasOwnProperty(report)) {
          for (i = 0, len = reports[report].length; i < len; i++) {
            grunt.log.writeln(reports[report][i]);
          }
          grunt.log.writeln(report);
        }
      }
    }
  );
};
<commit_msg>Update Gruntfile.js<commit_after>const webpackConfig = require("./webpack.config.js");

module.exports = (grunt) => {
  // load npm tasks for grunt-* libs, excluding grunt-cli
  require("matchdep")
    .filterDev("{grunt,gruntify}-*")
    .filter((pkg) => {
      return ["grunt-cli"].indexOf(pkg) < 0;
    })
    .forEach(grunt.loadNpmTasks);

  grunt.initConfig({
    pkg: grunt.file.readJSON("package.json"),

    webpack: {
      myConfig: webpackConfig,
    },

    eslint: {
      src: ["src/**/*.js", "test/**/*.js"],
    },

    karma: {
      development: {
        configFile: "test/karma.conf.js",
      },
      test: {
        configFile: "test/karma.conf.js",
      },
    },

    // Minify SVGs from svg directory, output to svg-min
    svgmin: {
      dist: {
        files: [
          {
            expand: true,
            cwd: "assets/icons/svg",
            src: ["*.svg"],
            dest: "assets/icons/svg-min/",
            ext: ".svg",
          },
        ],
      },
      options: {
        plugins: [
          { removeViewBox: false },
          { removeEmptyAttrs: false },
          { removeTitle: true }, // "leaflet-toolbar" lets us specify the title attribute later
          {
            removeAttrs: {
              attrs: ["xmlns", "fill"],
            },
          },
        ],
      },
    },

    svg_sprite: {
      options: {
        // Task-specific options go here.
      },
      dist: {
        expand: true,
        cwd: "assets/icons/svg-min/",
        src: ["*.svg"],
        dest: "assets/icons/",
        options: {
          log: "info",
          mode: {
            symbol: {
              sprite: "sprite.symbol.svg",
              example: true,
            },
          },
        },
      },
    },

    watch: {
      options: {
        livereload: true,
      },
      source: {
        files: ["src/**/*.js", "test/**/*.js", "Gruntfile.js"],
        tasks: ["eslint", "karma:development:start"],
      },
    },
  });

  /* Run tests once. */
  grunt.registerTask("test", ["eslint", "karma:test"]);

  grunt.registerTask("build", [
    "eslint",
    "karma:development:start",
    "coverage",

    "webpack",
  ]);

  // recompile svg icon sprite
  grunt.registerTask("icons", ["svgmin", "svg_sprite"]);

  grunt.registerTask(
    "coverage",
    "CLI reporter for karma-coverage",
      ()=>{
      let coverageReports = grunt.file.expand("coverage/*/coverage.txt");
      let reports = {};
      let report;
      let i;
      let len;

      for (i = 0, len = coverageReports.length; i < len; i++) {
        report = grunt.file.read(coverageReports[i]);
        if (!reports[report]) {
          reports[report] = [coverageReports[i]];
        } else {
          reports[report].push(coverageReports[i]);
        }
      }

      for (report in reports) {
        if (reports.hasOwnProperty(report)) {
          for (i = 0, len = reports[report].length; i < len; i++) {
            grunt.log.writeln(reports[report][i]);
          }
          grunt.log.writeln(report);
        }
      }
    }
  );
};
<|endoftext|>


<commit_before>'use strict';

module.exports = function (grunt) {
    require('load-grunt-tasks')(grunt);

    grunt.initConfig({
        settings: {
            src: 'src',
            dist: 'dist',
            libName: 'navigation'
        },
        exec: {
            generateChangelog: {
                cmd: function() {
                    return 'git log --oneline --decorate --no-merges > changelog.txt';
                }
            }
        },
        jshint: {
            options: {
                jshintrc: '.jshintrc',
                reporter: require('jshint-stylish')
            },
            src: [
                '<%= settings.src %>/{,*/}*.js'
            ]
        },
        ngtemplates: {
            eehNavigation: {
                cwd: '<%= settings.src %>',
                src: 'navigation.html',
                dest: '<%= settings.dist %>/navigation.tpl.js',
                options:  {
                    url: function (url) {
                        return 'template/eeh-navigation/' + url;
                    }
                }
            }
        },
        sass: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= settings.src %>/scss/',
                    src: ['**/*.scss'],
                    dest: '<%= settings.dist %>',
                    ext: '.css'
                }]
            }
        },
        watch: {
            src: {
                files: ['src/*.*'],
                tasks: ['build'],
                options: {
                    spawn: false
                }
            }
        },
        uglify: {
            beautify: {
                files: {
                    '<%= settings.dist %>/<%= settings.libName %>.js': ['<%= settings.src %>/*.js']
                },
                options: {
                    wrap: '<%= settings.libName %>',
                    compress: false,
                    mangle: false,
                    beautify: true
                }
            },
            minify: {
                files: {
                    '<%= settings.dist %>/<%= settings.libName %>.min.js': ['<%= settings.src %>/*.js'],
                    '<%= settings.dist %>/<%= settings.libName %>.tpl.min.js': ['<%= settings.dist %>/*.tpl.js']
                },
                options: {
                    wrap: '<%= settings.libName %>',
                    sourceMap: true
                }
            }
        },
        versioncheck: {
            options: {
                hideUpToDate : true
            }
        }
    });

    grunt.registerTask('dev', [
        'watch:src'
    ]);

    grunt.registerTask('health-check', [
        'versioncheck'
    ]);

    grunt.registerTask('lint', [
        'jshint:src'
    ]);

    grunt.registerTask('build', [
        'sass:dist',
        'lint',
        'ngtemplates',
        'uglify:beautify',
        'uglify:minify'
    ]);

    grunt.registerTask('release', [
        'build',
        'exec:generateChangelog'
    ]);

    grunt.registerTask('default', [
        'build'
    ]);
};
<commit_msg>Lint on release, not build to make dev faster<commit_after>'use strict';

module.exports = function (grunt) {
    require('load-grunt-tasks')(grunt);

    grunt.initConfig({
        settings: {
            src: 'src',
            dist: 'dist',
            libName: 'navigation'
        },
        exec: {
            generateChangelog: {
                cmd: function() {
                    return 'git log --oneline --decorate --no-merges > changelog.txt';
                }
            }
        },
        jshint: {
            options: {
                jshintrc: '.jshintrc',
                reporter: require('jshint-stylish')
            },
            src: [
                '<%= settings.src %>/{,*/}*.js'
            ]
        },
        ngtemplates: {
            eehNavigation: {
                cwd: '<%= settings.src %>',
                src: 'navigation.html',
                dest: '<%= settings.dist %>/navigation.tpl.js',
                options:  {
                    url: function (url) {
                        return 'template/eeh-navigation/' + url;
                    }
                }
            }
        },
        sass: {
            dist: {
                files: [{
                    expand: true,
                    cwd: '<%= settings.src %>/scss/',
                    src: ['**/*.scss'],
                    dest: '<%= settings.dist %>',
                    ext: '.css'
                }]
            }
        },
        watch: {
            src: {
                files: ['src/*.*'],
                tasks: ['build'],
                options: {
                    spawn: false
                }
            }
        },
        uglify: {
            beautify: {
                files: {
                    '<%= settings.dist %>/<%= settings.libName %>.js': ['<%= settings.src %>/*.js']
                },
                options: {
                    wrap: '<%= settings.libName %>',
                    compress: false,
                    mangle: false,
                    beautify: true
                }
            },
            minify: {
                files: {
                    '<%= settings.dist %>/<%= settings.libName %>.min.js': ['<%= settings.src %>/*.js'],
                    '<%= settings.dist %>/<%= settings.libName %>.tpl.min.js': ['<%= settings.dist %>/*.tpl.js']
                },
                options: {
                    wrap: '<%= settings.libName %>',
                    sourceMap: true
                }
            }
        },
        versioncheck: {
            options: {
                hideUpToDate : true
            }
        }
    });

    grunt.registerTask('dev', [
        'watch:src'
    ]);

    grunt.registerTask('health-check', [
        'versioncheck'
    ]);

    grunt.registerTask('lint', [
        'jshint:src'
    ]);

    grunt.registerTask('build', [
        'sass:dist',
        'ngtemplates',
        'uglify:beautify',
        'uglify:minify'
    ]);

    grunt.registerTask('release', [
        'lint',
        'build',
        'exec:generateChangelog'
    ]);

    grunt.registerTask('default', [
        'build'
    ]);
};
<|endoftext|>


<commit_before>'use strict';

module.exports = function(grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        meta: {
            banner: '\n/*\n * <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
                '<%= grunt.template.today("dd.mm.yyyy") %>\n' +
                ' * <%= pkg.homepage %>\n' +
                ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>, <%= _.pluck(pkg.contributors, "name").join(", ") %>\n' +
                ' * Licensed under the <%= pkg.license %> license\n */\n\n'
        },

        browserify: {
            options: {
                postBundleCB: function(err, src, next) {
                    if (err) return console.log(err);
                    next(err, grunt.template.process('<%= meta.banner %>')+src);
                }
            },
            dev: {
                options: {
                    browserifyOptions: {
                        debug: true
                    },
                    keepAlive: true,
                    watch: true
                },
                src: 'src/js/shariff.js',
                dest: 'build/shariff.js'
            },
            dist: {
                src: 'src/js/shariff.js',
                dest: 'build/shariff.js'
            },
            dist_min: {
                options: {
                    transform: [ ['uglifyify', { global: true } ] ]
                },
                src: 'src/js/shariff.js',
                dest: 'build/shariff.min.js'
            },
            demo: {
                options: {
                    transform: [ ['uglifyify', { global: true } ] ]
                },
                src: 'src/js/shariff.js',
                dest: 'demo/app.min.js'
            },
        },

        copy: {
            demo: {
                files: [
                    {
                        expand: true,
                        flatten: true,
                        src: ['node_modules/font-awesome/fonts/fontawesome*'],
                        dest: 'demo/',
                        filter: 'isFile'
                    },
                    {
                        expand: true,
                        flatten: true,
                        src: ['src/img/*'],
                        dest: 'demo/',
                        filter: 'isFile'
                    },
                ]
            }
        },

        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            files: [
                'src/*.js',
                'src/modules/*.js'
            ]
        },

        less: {
            options: {
                strictMath: true,
                sourceMap: true,
                outputSourceFiles: true,
                compress: true,
                report: 'min'
            },
            demo: {
                options: {
                    compress: true,
                },
                src: ['src/style/shariff.less', 'src/style/demo.less'],
                dest: 'demo/app.min.css'
            },
            dist: {
                options: {
                    compress: true,
                },
                src: 'src/style/shariff.less',
                dest: 'build/shariff.min.css'
            }
        },

        hapi: {
            shariff: {
                options: {
                    server: require('path').resolve('./node_modules/shariff-backend-node/server.js'),
                    // noasync: true,
                }
            }
        },

        connect: {
            demo: {
                options: {
                    hostname: 'localhost',
                    port: 8080,
                    base: 'demo',
                    keepalive: true,
                    livereload: true,
                    open: true,
                    // debug: true,
                    middleware: function (connect, options, middlewares) {
                        var proxy = require('grunt-connect-proxy/lib/utils').proxyRequest;
                        return [
                            proxy,
                            connect.static(options.base[0]),
                            connect.directory(options.base[0])
                        ];
                    }
                },
                proxies: [
                    {
                        rewrite: {
                            '^/shariff': ''
                        },
                        context: '/shariff',
                        host: 'localhost',
                        port: 3001,
                        https: false,
                        xforward: false
                    }
                ]
            }
        },

        release: {
            options: {
                tagName: 'v<%= version %>',
                github: {
                   repo: 'heiseonline/shariff',
                   usernameVar: 'GITHUB_USERNAME',
                   passwordVar: 'GITHUB_PASSWORD'
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-browserify');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-less');
    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-connect-proxy');
    grunt.loadNpmTasks('grunt-release');
    grunt.loadNpmTasks('grunt-hapi');

    grunt.registerTask('test', ['jshint']);
    grunt.registerTask('build', ['test', 'less:demo', 'less:dist', 'browserify:dist', 'browserify:dist_min'])
    grunt.registerTask('demo', ['copy:demo', 'less:demo', 'browserify:demo', 'hapi', 'configureProxies:demo', 'connect']);
    grunt.registerTask('default', ['test', 'browserify:dev']);
};
<commit_msg>disable livereload usage<commit_after>'use strict';

module.exports = function(grunt) {
    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),

        meta: {
            banner: '\n/*\n * <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
                '<%= grunt.template.today("dd.mm.yyyy") %>\n' +
                ' * <%= pkg.homepage %>\n' +
                ' * Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>, <%= _.pluck(pkg.contributors, "name").join(", ") %>\n' +
                ' * Licensed under the <%= pkg.license %> license\n */\n\n'
        },

        browserify: {
            options: {
                postBundleCB: function(err, src, next) {
                    if (err) return console.log(err);
                    next(err, grunt.template.process('<%= meta.banner %>')+src);
                }
            },
            dev: {
                options: {
                    browserifyOptions: {
                        debug: true
                    },
                    keepAlive: true,
                    watch: true
                },
                src: 'src/js/shariff.js',
                dest: 'build/shariff.js'
            },
            dist: {
                src: 'src/js/shariff.js',
                dest: 'build/shariff.js'
            },
            dist_min: {
                options: {
                    transform: [ ['uglifyify', { global: true } ] ]
                },
                src: 'src/js/shariff.js',
                dest: 'build/shariff.min.js'
            },
            demo: {
                options: {
                    transform: [ ['uglifyify', { global: true } ] ]
                },
                src: 'src/js/shariff.js',
                dest: 'demo/app.min.js'
            },
        },

        copy: {
            demo: {
                files: [
                    {
                        expand: true,
                        flatten: true,
                        src: ['node_modules/font-awesome/fonts/fontawesome*'],
                        dest: 'demo/',
                        filter: 'isFile'
                    },
                    {
                        expand: true,
                        flatten: true,
                        src: ['src/img/*'],
                        dest: 'demo/',
                        filter: 'isFile'
                    },
                ]
            }
        },

        jshint: {
            options: {
                jshintrc: '.jshintrc'
            },
            files: [
                'src/*.js',
                'src/modules/*.js'
            ]
        },

        less: {
            options: {
                strictMath: true,
                sourceMap: true,
                outputSourceFiles: true,
                compress: true,
                report: 'min'
            },
            demo: {
                options: {
                    compress: true,
                },
                src: ['src/style/shariff.less', 'src/style/demo.less'],
                dest: 'demo/app.min.css'
            },
            dist: {
                options: {
                    compress: true,
                },
                src: 'src/style/shariff.less',
                dest: 'build/shariff.min.css'
            }
        },

        hapi: {
            shariff: {
                options: {
                    server: require('path').resolve('./node_modules/shariff-backend-node/server.js'),
                    // noasync: true,
                }
            }
        },

        connect: {
            demo: {
                options: {
                    hostname: 'localhost',
                    port: 8080,
                    base: 'demo',
                    keepalive: true,
                    // livereload: true,
                    open: true,
                    // debug: true,
                    middleware: function (connect, options, middlewares) {
                        var proxy = require('grunt-connect-proxy/lib/utils').proxyRequest;
                        return [
                            proxy,
                            connect.static(options.base[0]),
                            connect.directory(options.base[0])
                        ];
                    }
                },
                proxies: [
                    {
                        rewrite: {
                            '^/shariff': ''
                        },
                        context: '/shariff',
                        host: 'localhost',
                        port: 3001,
                        https: false,
                        xforward: false
                    }
                ]
            }
        },

        release: {
            options: {
                tagName: 'v<%= version %>',
                github: {
                   repo: 'heiseonline/shariff',
                   usernameVar: 'GITHUB_USERNAME',
                   passwordVar: 'GITHUB_PASSWORD'
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-browserify');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-jshint');
    grunt.loadNpmTasks('grunt-contrib-less');
    grunt.loadNpmTasks('grunt-contrib-connect');
    grunt.loadNpmTasks('grunt-connect-proxy');
    grunt.loadNpmTasks('grunt-release');
    grunt.loadNpmTasks('grunt-hapi');

    grunt.registerTask('test', ['jshint']);
    grunt.registerTask('build', ['test', 'less:demo', 'less:dist', 'browserify:dist', 'browserify:dist_min'])
    grunt.registerTask('demo', ['copy:demo', 'less:demo', 'browserify:demo', 'hapi', 'configureProxies:demo', 'connect']);
    grunt.registerTask('default', ['test', 'browserify:dev']);
};
<|endoftext|>


<commit_before>module.exports = function (grunt) {

	var package = require("./package.json");
	var version = package.version,
		electronVersion = package.electronVersion;

	// Project configuration.
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		concat: {
			options: {
				separator: ';'
			},
			browser: {
				src: [
						"js/default.js",
						"js/util/database.js",
						"js/util/defaultKeyMap.js",
						"js/util/settings.js",
						"js/util/searchEngine.js",
						"js/menuBarVisibility.js",
						 "js/tabState.js",
						"js/util/urlParser.js",
						"js/filteringRenderer.js",
						"js/webviews.js",
						 "js/webviewMenu.js",
						"js/bookmarksHistory/bookmarksHistory.js",
						 "js/api-wrapper.js",
						 "js/searchbar/searchbar.js",
							"js/searchbar/searchbar-plugins.js",
							"js/searchbar/searchbar-autocomplete.js",
							"js/searchbar/placesPlugin.js",
							"js/searchbar/instantAnswerPlugin.js",
							"js/searchbar/openTabsPlugin.js",
							"js/searchbar/bangsPlugin.js",
							"js/searchbar/customBangs.js",
							"js/searchbar/searchSuggestionsPlugin.js",
							"js/searchbar/placeSuggestionsPlugin.js",
							"js/searchbar/hostsSuggestionsPlugin.js",
							"js/readerview.js",
						 "js/navbar/tabActivity.js",
							"js/navbar/tabColor.js",
						 "js/navbar/navbarTabs.js",
							"js/taskOverlay.js",
							"js/navbar/addTabButton.js",
						 "js/keybindings.js",
						 "js/fileDownloadManager.js",
						 "js/findinpage.js",
							"js/sessionRestore.js",
							"js/focusMode.js",
							"js/util/theme.js"

						 ],
				dest: 'dist/build.js'
			},
			webview: {
				src: [
						"js/webview/default.js",
						"js/webview/textExtractor.js",
						"js/webview/contextMenu.js",
						"js/webview/phishDetector.js",
						"js/webview/readerDetector.js",
						"js/webview/swipeEvents.js",
						"js/webview/zoom.js",
						"js/webview/keywordExtractor.js",
						"js/webview/editor.js"
						 ],
				dest: 'dist/webview.js'
			},
			main: {
				src: [
						"main/main.js",
					"main/filtering.js",
					"main/editor.js",
					"main/FileSystem.js",
					"main/init.js"
						 ],
				dest: 'main.build.js'
			}
		},
		uglify: {
			options: {
				banner: '/*! <%= grunt.template.today("mm-dd-yyyy") %> */\n'
			},
			browser: {
				src: 'dist/build.js',
				dest: 'dist/build.min.js'
			},
			webview: {
				src: 'dist/webview.js',
				dest: 'dist/webview.min.js'
			},
		},
		watch: {
			scripts: {
				files: ['js/**/*.js', 'main/*.js'],
				tasks: ['default'],
				options: {
					spawn: false
				}
			},
		},
		electron: {
			osxBuild: {
				options: {
					name: 'Min',
					dir: __dirname,
					out: 'dist/app',
					version: electronVersion,
					'app-version': version,
					platform: 'darwin',
					arch: 'x64',
					icon: "icon.icns",
					ignore: 'dist/app',
					prune: true,
					overwrite: true,
					protocols: [{
						name: "HTTP link",
						schemes: ["http", "https"]
					}, {
						name: "File",
						schemes: ["file"]
					}],
				}
			},
			windowsBuild: {
				options: {
					name: 'Min',
					dir: __dirname,
					out: 'dist/app',
					version: electronVersion,
					'app-version': version,
					platform: 'win32',
					arch: 'all',
					ignore: 'dist/app',
					prune: true,
					overwrite: true,
				}
			},
			linuxBuild: {
				options: {
					name: 'min',
					dir: __dirname,
					out: 'dist/app',
					version: electronVersion,
					'app-version': version,
					platform: 'linux',
					arch: 'all',
					ignore: 'dist/app',
					prune: true,
					overwrite: true,
				}
			}
		},
		'electron-installer-debian': {
			options: {
				productName: "Min",
				genericName: "Web Browser",
				version: version,
				section: "web",
				homepage: "https://palmeral.github.io/min/",
				icon: "icons/icon256.png",
				categories: ["Network", "WebBrowser"],
				mimeType: ["x-scheme-handler/http", "x-scheme-handler/https", "text/html"],
				maintainer: "Min Developers <280953907a@zoho.com>",
				description: "Min is a faster, smarter web browser.",
				depends: [
				'gconf2',
				'gconf-service',
				'gvfs-bin',
				'libc6',
				'libcap2',
				'libgtk2.0-0',
				'libudev0 | libudev1',
				'libgcrypt11 | libgcrypt20',
				'libnotify4',
				'libnss3',
				'libxtst6',
				'python',
				'xdg-utils'
				]
			},
			linux32: {
				options: {
					arch: 'i386'
				},
				src: 'dist/app/Min-linux-ia32',
				dest: 'dist/app/linux'
			},
			linux64: {
				options: {
					arch: 'amd64'
				},
				src: 'dist/app/Min-linux-x64',
				dest: 'dist/app/linux'
			}
		}
	});

	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-electron');
	grunt.loadNpmTasks('grunt-electron-installer-debian');
	grunt.loadNpmTasks('grunt-contrib-watch')

	grunt.registerTask('default', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main']);
	grunt.registerTask('browser', ['concat:browser', 'uglify:browser']);
	grunt.registerTask('webview', ['concat:webview', 'uglify:webview']);

	grunt.registerTask('macBuild', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main', 'electron:osxBuild'])
	grunt.registerTask('linuxBuild', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main', 'electron:linuxBuild', 'electron-installer-debian:linux32', 'electron-installer-debian:linux64'])
	grunt.registerTask('windowsBuild', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main',  'electron:windowsBuild'])
};
<commit_msg>✨  App rename<commit_after>module.exports = function (grunt) {

	var package = require("./package.json");
	var version = package.version,
		electronVersion = package.electronVersion;

	// Project configuration.
	grunt.initConfig({
		pkg: grunt.file.readJSON('package.json'),
		concat: {
			options: {
				separator: ';'
			},
			browser: {
				src: [
						"js/default.js",
						"js/util/database.js",
						"js/util/defaultKeyMap.js",
						"js/util/settings.js",
						"js/util/searchEngine.js",
						"js/menuBarVisibility.js",
						 "js/tabState.js",
						"js/util/urlParser.js",
						"js/filteringRenderer.js",
						"js/webviews.js",
						 "js/webviewMenu.js",
						"js/bookmarksHistory/bookmarksHistory.js",
						 "js/api-wrapper.js",
						 "js/searchbar/searchbar.js",
							"js/searchbar/searchbar-plugins.js",
							"js/searchbar/searchbar-autocomplete.js",
							"js/searchbar/placesPlugin.js",
							"js/searchbar/instantAnswerPlugin.js",
							"js/searchbar/openTabsPlugin.js",
							"js/searchbar/bangsPlugin.js",
							"js/searchbar/customBangs.js",
							"js/searchbar/searchSuggestionsPlugin.js",
							"js/searchbar/placeSuggestionsPlugin.js",
							"js/searchbar/hostsSuggestionsPlugin.js",
							"js/readerview.js",
						 "js/navbar/tabActivity.js",
							"js/navbar/tabColor.js",
						 "js/navbar/navbarTabs.js",
							"js/taskOverlay.js",
							"js/navbar/addTabButton.js",
						 "js/keybindings.js",
						 "js/fileDownloadManager.js",
						 "js/findinpage.js",
							"js/sessionRestore.js",
							"js/focusMode.js",
							"js/util/theme.js"

						 ],
				dest: 'dist/build.js'
			},
			webview: {
				src: [
						"js/webview/default.js",
						"js/webview/textExtractor.js",
						"js/webview/contextMenu.js",
						"js/webview/phishDetector.js",
						"js/webview/readerDetector.js",
						"js/webview/swipeEvents.js",
						"js/webview/zoom.js",
						"js/webview/keywordExtractor.js",
						"js/webview/editor.js"
						 ],
				dest: 'dist/webview.js'
			},
			main: {
				src: [
						"main/main.js",
					"main/filtering.js",
					"main/editor.js",
					"main/FileSystem.js",
					"main/init.js"
						 ],
				dest: 'main.build.js'
			}
		},
		uglify: {
			options: {
				banner: '/*! <%= grunt.template.today("mm-dd-yyyy") %> */\n'
			},
			browser: {
				src: 'dist/build.js',
				dest: 'dist/build.min.js'
			},
			webview: {
				src: 'dist/webview.js',
				dest: 'dist/webview.min.js'
			},
		},
		watch: {
			scripts: {
				files: ['js/**/*.js', 'main/*.js'],
				tasks: ['default'],
				options: {
					spawn: false
				}
			},
		},
		electron: {
			osxBuild: {
				options: {
					name: 'Mie',
					dir: __dirname,
					out: 'dist/app',
					version: electronVersion,
					'app-version': version,
					platform: 'darwin',
					arch: 'x64',
					icon: "icon.icns",
					ignore: 'dist/app',
					prune: true,
					overwrite: true,
					protocols: [{
						name: "HTTP link",
						schemes: ["http", "https"]
					}, {
						name: "File",
						schemes: ["file"]
					}],
				}
			},
			windowsBuild: {
				options: {
					name: 'Mie',
					dir: __dirname,
					out: 'dist/app',
					version: electronVersion,
					'app-version': version,
					platform: 'win32',
					arch: 'all',
					ignore: 'dist/app',
					prune: true,
					overwrite: true,
				}
			},
			linuxBuild: {
				options: {
					name: 'min',
					dir: __dirname,
					out: 'dist/app',
					version: electronVersion,
					'app-version': version,
					platform: 'linux',
					arch: 'all',
					ignore: 'dist/app',
					prune: true,
					overwrite: true,
				}
			}
		},
		'electron-installer-debian': {
			options: {
				productName: "Mie",
				genericName: "Web Browser",
				version: version,
				section: "web",
				homepage: "https://palmeral.github.io/min/",
				icon: "icons/icon256.png",
				categories: ["Network", "WebBrowser"],
				mimeType: ["x-scheme-handler/http", "x-scheme-handler/https", "text/html"],
				maintainer: "Mie Developers <280953907a@zoho.com>",
				description: "Mie is a faster, smarter web browser.",
				depends: [
				'gconf2',
				'gconf-service',
				'gvfs-bin',
				'libc6',
				'libcap2',
				'libgtk2.0-0',
				'libudev0 | libudev1',
				'libgcrypt11 | libgcrypt20',
				'libnotify4',
				'libnss3',
				'libxtst6',
				'python',
				'xdg-utils'
				]
			},
			linux32: {
				options: {
					arch: 'i386'
				},
				src: 'dist/app/Mie-linux-ia32',
				dest: 'dist/app/linux'
			},
			linux64: {
				options: {
					arch: 'amd64'
				},
				src: 'dist/app/Mie-linux-x64',
				dest: 'dist/app/linux'
			}
		}
	});

	grunt.loadNpmTasks('grunt-contrib-concat');
	grunt.loadNpmTasks('grunt-contrib-uglify');
	grunt.loadNpmTasks('grunt-electron');
	grunt.loadNpmTasks('grunt-electron-installer-debian');
	grunt.loadNpmTasks('grunt-contrib-watch')

	grunt.registerTask('default', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main']);
	grunt.registerTask('browser', ['concat:browser', 'uglify:browser']);
	grunt.registerTask('webview', ['concat:webview', 'uglify:webview']);

	grunt.registerTask('macBuild', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main', 'electron:osxBuild'])
	grunt.registerTask('linuxBuild', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main', 'electron:linuxBuild', 'electron-installer-debian:linux32', 'electron-installer-debian:linux64'])
	grunt.registerTask('windowsBuild', ['concat:browser', 'uglify:browser', 'concat:webview', 'uglify:webview', 'concat:main',  'electron:windowsBuild'])
};
<|endoftext|>


<commit_before>module.exports = function(grunt) {

  // Include modules
  require('load-grunt-tasks')(grunt, {pattern: ['grunt-*', 'assemble']});
  require('time-grunt')(grunt);

  grunt.loadNpmTasks('grunt-ftp-deploy');

  var path = {
    css_src: 'src/stylesheets/global.scss',
    css_dest: 'src/stylesheets/global.css',
    email_src: 'src/emails/*.hbs',
    dist: 'dist/',
    dist_test: 'dist_test/',
    dist_html_glob: 'dist/*.html',
    dist_text_glob: 'dist/*.txt',
    dist_test_html_glob: 'dist_test/*.html',
    layouts: 'src/layouts',
    partials: 'src/partials/*',
    images_src: 'src/images'
  };

  /* Configuration
  ================================================= */

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    /* secrets.json and config.json simplify variable management to keep the
       common changes centralized to key files instead of being littered
       throughout the Gruntfile. This also makes it easy to .gitignore secrets
    ================================================= */
    secret: grunt.file.exists('secrets.json') ? grunt.file.readJSON('secrets.json') : {},
    config: grunt.file.readJSON('config.json'),

    /* SASS
    ------------------------------------------------- */

    sass: {
      styles: {
        src: path.css_src,
        dest: path.css_dest
      }
    },

    /* Autoprefixer
    ------------------------------------------------- */

    autoprefixer: {
      options: {
        browsers: ['last 6 versions', 'ie >= 9']
      },
      styles: {
        src: path.css_dest,
        dest: path.css_dest
      }
    },

    /* Assemble
       Assembles our handlebars templates. Documentation might be incompatible since the latest version uses an entirely different build system.
       See: https://github.com/assemble/assemble/
    ------------------------------------------------- */

    assemble: {
      options: {
        layoutdir: path.layouts,
        partials: path.partials,
        flatten: true,
        sender_name: "<%= config.strings.sender_name %>",
        product_name: "<%= config.strings.product_name %>",
        product_url: "<%= config.strings.product_url %>",
        credit_card_statement_name: "<%= config.strings.credit_card_statement_name %>",
        formal_company_name: "<%= config.strings.formal_company_name %>",
        address_line_1: "<%= config.strings.address_line_1 %>",
        address_line_2: "<%= config.strings.address_line_2 %>",
        city: "<%= config.strings.city %>",
        state: "<%= config.strings.state %>",
        country: "<%= config.strings.country %>",
        phone: "<%= config.strings.phone %>",
        images_url: "<%= config.images.images_url %>",
        use_images: "<%= config.images.use_images %>",
        logo_file: "<%= config.images.logo_file %>",
        logo_width: "<%= config.images.logo_width %>",
        use_social_circles: "<%= config.images.use_social_circles %>",
        twitter_url: "<%= config.images.twitter_url %>",
        facebook_url: "<%= config.images.facebook_url %>",
        pinterest_url: "<%= config.images.pinterest_url %>",
        instagram_url: "<%= config.images.instagram_url %>",
        dribbble_url: "<%= config.images.dribbble_url %>",
        google_plus_url: "<%= config.images.google_plus_url %>",
        youtube_url: "<%= config.images.youtube_url %>",
        linkedin_url: "<%= config.images.linkedin_url %>"
      },
      pages: {
        src: [path.email_src],
        dest: path.dist
      }
    },

    /* Inline
       Brings external resources in the HTML files. Basically just takes our CSS file and inserts it as a style block.
       See: https://github.com/chyingp/grunt-inline
    ------------------------------------------------- */

    inline: {
      html: {
        expand: true,
        cwd: path.dist,
        ext: '.html',
        src: ['*.html'],
        dest: path.dist
      }
    },

    /* Prettify
       Formats our template HTML files.
       See: https://github.com/jonschlinkert/grunt-prettify
    ------------------------------------------------- */

    prettify: {
      options: {
        indent: '2'
      },
      html: {
        expand: true,
        cwd: path.dist,
        ext: '.html',
        src: ['*.html'],
        dest: path.dist
      }
    },

    /* Premailer
       Adds all sorts of email magic. Adds inline styles to each element based off class. Also generates plain text versions and allows us to control commonly used table attributes via CSS.
       See: https://github.com/dwightjack/grunt-premailer
    ------------------------------------------------- */

    premailer: {
      options: {
        warnLevel: 'none'
      },
      html: {
        options: {
          removeComments: true
        },
        files: [{
          expand: true,
          src: [path.dist_test_html_glob],
          dest: ''
        }]
      },
      txt: {
        options: {
          mode: 'txt',
          lineLength: 16384
        },
        files: [{
          expand: true,
          src: [path.dist_html_glob],
          dest: '',
          ext: '.txt'
        }]
      }
    },

    'ftp-deploy': {
      build: {
        auth: {
          host: "<%= config.ftp.host %>",
          port: "<%= config.ftp.port %>",
          username: "<%= secret.ftp.username %>",
          password: "<%= secret.ftp.password %>"
        },
        src: "<%= config.ftp.src %>",
        dest: "<%= config.ftp.dest %>",
        exclusions: ['path/to/source/folder/**/.DS_Store', 'path/to/source/folder/**/Thumbs.db']
      }
    },

    /* S3
       Pushes image assets to an Amazon S3 bucket.
       See: https://github.com/jpillora/grunt-aws
    ------------------------------------------------- */

    s3: {
      options: {
        accessKeyId: "<%= secret.s3.access_key_id %>",
        secretAccessKey: "<%= secret.s3.secret_access_key %>",
        bucket: "<%= config.s3.bucket %>",
        region: "<%= config.s3.region %>",
        overwrite: "<%= config.s3.overwrite %>"
      },
      build: {
        cwd: path.images_src,
        src: "**"
      }
    },

    /* Watch
       Watches all files in the src directory for changes.
    ------------------------------------------------- */

    watch: {
      options: {
        livereload: true
      },
      files: ['src/**/*'],
      tasks: ['default']
    },

    /* Replace
    ------------------------------------------------- */

    replace: {
      // Premailer escapes URLs, so our mustachio variables for URLs get fully escaped, and the
      // URL variables need to be converted from %7B%7Bsomething%7D%7D to {{something}}
      variableSyntax: {
        src: [path.dist_text_glob],
        overwrite: true,
        replacements: [
          { from: '%7B%7B', to: '{{ ' },
          { from: '%7D%7D', to: ' }}' },
          { from: '%7D%7D%22', to: ' }}' },
          { from: '%20}}', to: ' }}' },
          { from: '{{%20', to: '{{ ' }
        ]
      },
      // Add some additional attributes that grunt inline removed
      styleBlock: {
        src: [path.dist_html_glob],
        overwrite: true,
        replacements: [
          {
            from: '<style>',
            to: '<style type="text/css" rel="stylesheet" media="all">'
          }
        ]
      }
    },

    /* Copy
       This is mainly used to copy compiled templates to a new directory for the CSS to be inlined before being tested.
       See: https://github.com/gruntjs/grunt-contrib-copy
     ------------------------------------------------- */

    copy: {
      testTemplates: {
        files: [{
          expand: true,
          src: [path.dist_html_glob],
          dest: path.dist_test,
          flatten: true
        }]
      }
    },

    /* Spamcheck
       Sends all of our HTML files through Postmark’s spamcheck API.
       See: https://github.com/wildbit/grunt-spamcheck
    ------------------------------------------------- */

    spamcheck: {
      emails: {
        src: [path.dist_html_glob]
      }
    },

    /* Postmark
       Sends test emails through Postmark. Add and remove template targets as needed.
       Ensure that the CSS is always inlined before sending tests. This can be done with the 'testBuild' task below.
       See: https://github.com/wildbit/grunt-postmark
    ------------------------------------------------- */

    postmark: {
      options: {
        serverToken: "<%= secret.postmark.server_token %>",
        from: "<%= config.postmark.from %>",
        to: "<%= config.postmark.to %>",
        subject: "<%= config.postmark.subject %>",
      },
      // run "grunt postmark:welcome" - Sends just the welcome email
      welcome: {
        src: 'dist_test/welcome.html'
      },
      // run "npm run flood" - Sends all of the emails. Be careful not to spam PM if you have a bunch of emails.
      flood: {
        src: [path.dist_test_html_glob]
      },
      // run "npm run litmus" - Add a litmus test address here.
      litmus: {
        to: "<%= config.strings.litmus_email %>",
        src: 'dist_test/user_invitation.html'
      }
    }

  });

  /* Tasks
  ================================================= */

  grunt.registerTask('default', ['css', 'html']);

  // Assets
  grunt.registerTask('html', ['assemble', 'inline', 'premailer:txt', 'replace', 'prettify']);
  grunt.registerTask('css', ['sass', 'autoprefixer']);
  grunt.registerTask('images-ftp', ['ftp-deploy']);
  grunt.registerTask('images-s3', ['s3']);

  // Testing
  grunt.registerTask('spam', ['spamcheck']);
  grunt.registerTask('litmus', ['testBuild', 'postmark:litmus']);
  grunt.registerTask('flood', ['testBuild', 'postmark:flood']);

  // Before sending tests via Postmark, ensure that test builds with inlined CSS are generated
  grunt.registerTask('testBuild', ['default', 'copy:testTemplates', 'premailer:html']);
};
<commit_msg>Gruntfile formatting<commit_after>module.exports = function(grunt) {
  // Include modules
  require('load-grunt-tasks')(grunt, { pattern: ['grunt-*', 'assemble'] })
  require('time-grunt')(grunt)

  grunt.loadNpmTasks('grunt-ftp-deploy')

  var path = {
    css_src: 'src/stylesheets/global.scss',
    css_dest: 'src/stylesheets/global.css',
    email_src: 'src/emails/*.hbs',
    dist: 'dist/',
    dist_test: 'dist_test/',
    dist_html_glob: 'dist/*.html',
    dist_text_glob: 'dist/*.txt',
    dist_test_html_glob: 'dist_test/*.html',
    layouts: 'src/layouts',
    partials: 'src/partials/*',
    images_src: 'src/images',
  }

  /* Configuration
  ================================================= */

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),

    /* secrets.json and config.json simplify variable management to keep the
       common changes centralized to key files instead of being littered
       throughout the Gruntfile. This also makes it easy to .gitignore secrets
    ================================================= */
    secret: grunt.file.exists('secrets.json')
      ? grunt.file.readJSON('secrets.json')
      : {},
    config: grunt.file.readJSON('config.json'),
    templates: grunt.file.readJSON('templates.json'),

    /* SASS
    ------------------------------------------------- */

    sass: {
      styles: {
        src: path.css_src,
        dest: path.css_dest,
      },
    },

    /* Autoprefixer
    ------------------------------------------------- */

    autoprefixer: {
      options: {
        browsers: ['last 6 versions', 'ie >= 9'],
      },
      styles: {
        src: path.css_dest,
        dest: path.css_dest,
      },
    },

    /* Assemble
       Assembles our handlebars templates. Documentation might be incompatible since the latest version uses an entirely different build system.
       See: https://github.com/assemble/assemble/
    ------------------------------------------------- */

    assemble: {
      options: {
        layoutdir: path.layouts,
        partials: path.partials,
        flatten: true,
        sender_name: '<%= config.strings.sender_name %>',
        product_name: '<%= config.strings.product_name %>',
        product_url: '<%= config.strings.product_url %>',
        credit_card_statement_name:
          '<%= config.strings.credit_card_statement_name %>',
        formal_company_name: '<%= config.strings.formal_company_name %>',
        address_line_1: '<%= config.strings.address_line_1 %>',
        address_line_2: '<%= config.strings.address_line_2 %>',
        city: '<%= config.strings.city %>',
        state: '<%= config.strings.state %>',
        country: '<%= config.strings.country %>',
        phone: '<%= config.strings.phone %>',
        images_url: '<%= config.images.images_url %>',
        use_images: '<%= config.images.use_images %>',
        logo_file: '<%= config.images.logo_file %>',
        logo_width: '<%= config.images.logo_width %>',
        use_social_circles: '<%= config.images.use_social_circles %>',
        twitter_url: '<%= config.images.twitter_url %>',
        facebook_url: '<%= config.images.facebook_url %>',
        pinterest_url: '<%= config.images.pinterest_url %>',
        instagram_url: '<%= config.images.instagram_url %>',
        dribbble_url: '<%= config.images.dribbble_url %>',
        google_plus_url: '<%= config.images.google_plus_url %>',
        youtube_url: '<%= config.images.youtube_url %>',
        linkedin_url: '<%= config.images.linkedin_url %>',
      },
      pages: {
        src: [path.email_src],
        dest: path.dist,
      },
    },

    /* Inline
       Brings external resources in the HTML files. Basically just takes our CSS file and inserts it as a style block.
       See: https://github.com/chyingp/grunt-inline
    ------------------------------------------------- */

    inline: {
      html: {
        expand: true,
        cwd: path.dist,
        ext: '.html',
        src: ['*.html'],
        dest: path.dist,
      },
    },

    /* Prettify
       Formats our template HTML files.
       See: https://github.com/jonschlinkert/grunt-prettify
    ------------------------------------------------- */

    prettify: {
      options: {
        indent: '2',
      },
      html: {
        expand: true,
        cwd: path.dist,
        ext: '.html',
        src: ['*.html'],
        dest: path.dist,
      },
    },

    /* Premailer
       Adds all sorts of email magic. Adds inline styles to each element based off class. Also generates plain text versions and allows us to control commonly used table attributes via CSS.
       See: https://github.com/dwightjack/grunt-premailer
    ------------------------------------------------- */

    premailer: {
      options: {
        warnLevel: 'none',
      },
      html: {
        options: {
          removeComments: true,
        },
        files: [
          {
            expand: true,
            src: [path.dist_test_html_glob],
            dest: '',
          },
        ],
      },
      txt: {
        options: {
          mode: 'txt',
          lineLength: 16384,
        },
        files: [
          {
            expand: true,
            src: [path.dist_html_glob],
            dest: '',
            ext: '.txt',
          },
        ],
      },
    },

    'ftp-deploy': {
      build: {
        auth: {
          host: '<%= config.ftp.host %>',
          port: '<%= config.ftp.port %>',
          username: '<%= secret.ftp.username %>',
          password: '<%= secret.ftp.password %>',
        },
        src: '<%= config.ftp.src %>',
        dest: '<%= config.ftp.dest %>',
        exclusions: [
          'path/to/source/folder/**/.DS_Store',
          'path/to/source/folder/**/Thumbs.db',
        ],
      },
    },

    /* S3
       Pushes image assets to an Amazon S3 bucket.
       See: https://github.com/jpillora/grunt-aws
    ------------------------------------------------- */

    s3: {
      options: {
        accessKeyId: '<%= secret.s3.access_key_id %>',
        secretAccessKey: '<%= secret.s3.secret_access_key %>',
        bucket: '<%= config.s3.bucket %>',
        region: '<%= config.s3.region %>',
        overwrite: '<%= config.s3.overwrite %>',
      },
      build: {
        cwd: path.images_src,
        src: '**',
      },
    },

    /* Watch
       Watches all files in the src directory for changes.
    ------------------------------------------------- */

    watch: {
      options: {
        livereload: true,
      },
      files: ['src/**/*'],
      tasks: ['default'],
    },

    /* Replace
    ------------------------------------------------- */

    replace: {
      // Premailer escapes URLs, so our mustachio variables for URLs get fully escaped, and the
      // URL variables need to be converted from %7B%7Bsomething%7D%7D to {{something}}
      variableSyntax: {
        src: [path.dist_text_glob],
        overwrite: true,
        replacements: [
          { from: '%7B%7B', to: '{{ ' },
          { from: '%7D%7D', to: ' }}' },
          { from: '%7D%7D%22', to: ' }}' },
          { from: '%20}}', to: ' }}' },
          { from: '{{%20', to: '{{ ' },
        ],
      },
      // Add some additional attributes that grunt inline removed
      styleBlock: {
        src: [path.dist_html_glob],
        overwrite: true,
        replacements: [
          {
            from: '<style>',
            to: '<style type="text/css" rel="stylesheet" media="all">',
          },
        ],
      },
    },

    /* Copy
       This is mainly used to copy compiled templates to a new directory for the CSS to be inlined before being tested.
       See: https://github.com/gruntjs/grunt-contrib-copy
     ------------------------------------------------- */

    copy: {
      testTemplates: {
        files: [
          {
            expand: true,
            src: [path.dist_html_glob],
            dest: path.dist_test,
            flatten: true,
          },
        ],
      },
    },

    /* Spamcheck
       Sends all of our HTML files through Postmark’s spamcheck API.
       See: https://github.com/wildbit/grunt-spamcheck
    ------------------------------------------------- */

    spamcheck: {
      emails: {
        src: [path.dist_html_glob],
      },
    },

    /* Postmark
       Sends test emails through Postmark. Add and remove template targets as needed.
       Ensure that the CSS is always inlined before sending tests. This can be done with the 'testBuild' task below.
       See: https://github.com/wildbit/grunt-postmark
    ------------------------------------------------- */

    postmark: {
      options: {
        serverToken: '<%= secret.postmark.server_token %>',
        from: '<%= config.postmark.from %>',
        to: '<%= config.postmark.to %>',
        subject: '<%= config.postmark.subject %>',
      },
      // run "grunt postmark:welcome" - Sends just the welcome email
      welcome: {
        src: 'dist_test/welcome.html',
      },
      // run "npm run flood" - Sends all of the emails. Be careful not to spam PM if you have a bunch of emails.
      flood: {
        src: [path.dist_test_html_glob],
      },
      // run "npm run litmus" - Add a litmus test address here.
      litmus: {
        to: '<%= config.strings.litmus_email %>',
        src: 'dist_test/user_invitation.html',
      },
    },

    // Push templates from your local file system to Postmark
    postmarkPushTemplates: {
      options: {
        serverToken: '<%= secret.postmark.server_token %>',
      },
      your_server: {
        templates: '<%= templates %>',
      },
    },

    // Download your templates from Postmark and generate a boilerplate config.
    // The config can be used with the "postmarkPushTemplates" task
    postmarkSetupTemplates: {
      options: {
        serverToken: '<%= secret.postmark.server_token %>',
        configOutputFile: 'templates.json',
        templateOutputDest: 'dist',
      },
    },
  })

  /* Tasks
  ================================================= */

  grunt.registerTask('default', ['css', 'html'])

  // Assets
  grunt.registerTask('html', [
    'assemble',
    'inline',
    'premailer:txt',
    'replace',
    'prettify',
  ])
  grunt.registerTask('css', ['sass', 'autoprefixer'])
  grunt.registerTask('images-ftp', ['ftp-deploy'])
  grunt.registerTask('images-s3', ['s3'])

  // Testing
  grunt.registerTask('spam', ['spamcheck'])
  grunt.registerTask('litmus', ['testBuild', 'postmark:litmus'])
  grunt.registerTask('flood', ['testBuild', 'postmark:flood'])

  // Before sending tests via Postmark, ensure that test builds with inlined CSS are generated
  grunt.registerTask('testBuild', [
    'default',
    'copy:testTemplates',
    'premailer:html',
  ])
}
<|endoftext|>


<commit_before>module.exports = function (grunt) {

    var banner = "/*\n" +
        " * jQuery MarkView v<%= pkg.version %>\n" +
        " *\n" +
        " * <%= pkg.homepage %>\n" +
        " *\n" +
        " * Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>\n" +
        " * Released under the <%= _.map(pkg.licenses, 'type').join(', ') %> license\n" +
        " */\n";
    grunt.initConfig({
        pkg: grunt.file.readJSON("package.json"),
        concat: {
            options: {
                banner: banner + "\n",
                separator: "\n"
            },
            js: {
                src: ["src/core.js"],
                dest: "dist/<%= pkg.name %>.js"
            },
            css: {
                src: ["src/css/github.css"],
                dest: "dist/<%= pkg.name %>.css"
            },
            release: {
                src: ["dist/<%= pkg.name %>.min.css"],
                dest: "dist/<%= pkg.name %>.min.css"
            }
        },
        copy: {
            css: {
                expand: true,
                src: "src/font/octicons.woff",
                dest: "dist/",
                flatten: true,
                filter: "isFile"
            }
        },
        uglify: {
            options: {
                banner: banner + "\n"
            },
            js: {
                src: "dist/<%= pkg.name %>.js",
                dest: "dist/<%= pkg.name %>.min.js"
            }
        },
        cssmin: {
            options: {
                banner: banner
            },
            css: {
                expand: true,
                src: "dist/<%= pkg.name %>.css",
                ext: ".min.css"
            }
        },
        watch: {
            configFiles: {
                files: ['Gruntfile.js'],
                options: {
                    reload: true
                }
            },
            src: {
                files: ["src/**/*.js", "src/**/*.css"],
                tasks: [
                    "concat"
                ],
                options: {
                    livereload: true,
                },
            },
            test: {
                files: ["test/**/*.html", "test/**/*.md"],
                options: {
                    livereload: true,
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-cssmin');

    grunt.registerTask('release', ['default', 'uglify', 'cssmin', 'concat:release']);
    grunt.registerTask('default', ['concat:js', 'concat:css', 'copy']);
    grunt.registerTask('develop', ['default', 'watch']);

};<commit_msg>Config: Update grunt for merging CSS<commit_after>module.exports = function (grunt) {

    var banner = "/*\n" +
        " * jQuery MarkView v<%= pkg.version %>\n" +
        " *\n" +
        " * <%= pkg.homepage %>\n" +
        " *\n" +
        " * Copyright (c) <%= grunt.template.today('yyyy') %> <%= pkg.author.name %>\n" +
        " * Released under the <%= _.map(pkg.licenses, 'type').join(', ') %> license\n" +
        " */\n";
    grunt.initConfig({
        pkg: grunt.file.readJSON("package.json"),
        concat: {
            options: {
                banner: banner + "\n",
                separator: "\n"
            },
            js: {
                src: ["src/core.js"],
                dest: "dist/<%= pkg.name %>.js"
            },
            css: {
                src: ["src/css/*.css"],
                dest: "dist/<%= pkg.name %>.css"
            },
            release: {
                src: ["dist/<%= pkg.name %>.min.css"],
                dest: "dist/<%= pkg.name %>.min.css"
            }
        },
        copy: {
            css: {
                expand: true,
                src: "src/font/octicons.woff",
                dest: "dist/",
                flatten: true,
                filter: "isFile"
            }
        },
        uglify: {
            options: {
                banner: banner + "\n"
            },
            js: {
                src: "dist/<%= pkg.name %>.js",
                dest: "dist/<%= pkg.name %>.min.js"
            }
        },
        cssmin: {
            options: {
                banner: banner
            },
            css: {
                expand: true,
                src: "dist/<%= pkg.name %>.css",
                ext: ".min.css"
            }
        },
        watch: {
            configFiles: {
                files: ['Gruntfile.js'],
                options: {
                    reload: true
                }
            },
            src: {
                files: ["src/**/*.js", "src/**/*.css"],
                tasks: [
                    "concat"
                ],
                options: {
                    livereload: true,
                },
            },
            test: {
                files: ["test/**/*.html", "test/**/*.md"],
                options: {
                    livereload: true,
                }
            }
        }
    });

    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-concat');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-contrib-uglify');
    grunt.loadNpmTasks('grunt-contrib-cssmin');

    grunt.registerTask('release', ['default', 'uglify', 'cssmin', 'concat:release']);
    grunt.registerTask('default', ['concat:js', 'concat:css', 'copy']);
    grunt.registerTask('develop', ['default', 'watch']);

};
<|endoftext|>


<commit_before>module.exports = function(grunt) {
  grunt.initConfig({
    qunit: {
      files: ['test/index.html'],
      options: {
        timeout: 30000,
      }
    },
    jshint: {
      all: ['Gruntfile.js', 'yt-looper.js', 'test/**/*.js'],
      options: {
        'jquery': true,
        'quotmark': 'single',
        'white': true,
        'indent': 2,
        'latedef': true,
        'unused': true,
        '-W014': true, // ignore [W014] Bad line breaking
      },
    },
  });

  grunt.loadNpmTasks('grunt-contrib-qunit');
  grunt.loadNpmTasks('grunt-contrib-jshint');

  // Default task.
  grunt.registerTask('test', 'qunit');
  // Travis CI task.
  grunt.registerTask('travis', ['test','jshint']);
};
// vim:ts=2:sw=2:et:
<commit_msg>jshint: process all *.js<commit_after>module.exports = function(grunt) {
  grunt.initConfig({
    qunit: {
      files: ['test/index.html'],
      options: {
        timeout: 30000,
      }
    },
    jshint: {
      all: ['*.js', 'test/**/*.js'],
      options: {
        'jquery': true,
        'quotmark': 'single',
        'white': true,
        'indent': 2,
        'latedef': true,
        'unused': true,
        '-W014': true, // ignore [W014] Bad line breaking
      },
    },
  });

  grunt.loadNpmTasks('grunt-contrib-qunit');
  grunt.loadNpmTasks('grunt-contrib-jshint');

  // Default task.
  grunt.registerTask('test', 'qunit');
  // Travis CI task.
  grunt.registerTask('travis', ['test','jshint']);
};
// vim:ts=2:sw=2:et:
<|endoftext|>


<commit_before>
module.exports = function (grunt) {
    grunt.loadNpmTasks('grunt-angular-gettext');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-newer');
    grunt.loadNpmTasks('grunt-contrib-sass');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.initConfig({
        nggettext_extract: {
            pot: {
                files: {
                    'Locale/template.pot': ['src/**/*.{js,html}', 'index.html']
                }
            },
        },
        nggettext_compile: {
            all: {
                options: {
                    module: 'monad',
                    format: 'json'
                },
                files: [
                    {
                        expand: true,
                        dot: true,
                        cwd: "Locale",
                        dest: 'dist/i18n',
                        src: ['*.po'],
                        ext: '.json'
                    }
                ]
            }
        },
        sass: {
            dist: {
                options: {
                    style: 'compressed',
                    compass: true,
                    sourcemap: 'none',
                    loadPath: ['node_modules/bootstrap-sass/assets/stylesheets']
                },
                files: {'dist/default.css': 'src/_sass/**/default.scss'}
            }
        },
        copy: {
            statics: {
                files: [
                    {expand: true, src: '**/*.{html,json}', cwd: 'src/', dest: 'dist/'},
                    {expand: true, src: 'fonts/**/*', cwd: 'node_modules/bootstrap-sass/assets/', dest: 'dist'}
                ]
            },
            license: {
                files: [
                    {
                        cwd: './',
                        src: ['LICENSE'],
                        dest: 'dist/LICENSE.txt'
                    }
                ]
            }
        },
        clean: {
            prepare: ['dist']
        },
        watch: {
            gettext_extract: {
                files: ['src/**/*.{js,html}', 'index.html'],
                tasks: ['nggettext_extract']
            },
            gettext_compile: {
                files: ['Locale/*.po'],
                tasks: ['nggettext_compile']
            },
            sass: {
                files: ['src/_sass/**/*.scss', 'bower_components/bootstrap-sass/assets/stylesheets/**/*.scss'],
                tasks: ['sass']
            },
            statics: {
                files: ['src/**/*.{html,json}', 'bower_components/bootstrap-sass/assets/fonts/**/*'],
                tasks: ['newer:copy:statics']
            },
            license: {
                files: ['LICENSE'],
                tasks: ['newer:copy:license']
            }
        }
    });
    grunt.registerTask('default', ['clean:prepare', 'build']);
    grunt.registerTask('build', ['gettext', 'sass', 'newer:copy']);
    grunt.registerTask('gettext', ['nggettext_extract', 'nggettext_compile']);
    grunt.registerTask('dev', ['clean:prepare', 'build', 'watch']);
};

<commit_msg>improve gruntfile<commit_after>
module.exports = function (grunt) {
    grunt.loadNpmTasks('grunt-angular-gettext');
    grunt.loadNpmTasks('grunt-contrib-watch');
    grunt.loadNpmTasks('grunt-contrib-clean');
    grunt.loadNpmTasks('grunt-newer');
    grunt.loadNpmTasks('grunt-contrib-sass');
    grunt.loadNpmTasks('grunt-contrib-copy');
    grunt.loadNpmTasks('grunt-angular-templates');
    grunt.loadNpmTasks('grunt-inline');
    grunt.loadNpmTasks('node-spritesheet');

    grunt.initConfig({
        nggettext_extract: {
            pot: {
                files: {
                    'Locale/template.pot': ['src/**/*.{js,html}', 'index.html']
                }
            },
        },
        nggettext_compile: {
            all: {
                files: {'i18n.js': ['Locale/*.po']}
            }
        },
        sass: {
            dist: {
                options: {
                    style: 'compressed',
                    compass: true,
                    sourcemap: 'none',
                    loadPath: ['node_modules/bootstrap-sass/assets/stylesheets']
                },
                files: {'dist/default.css': 'src/_sass/**/default.scss'}
            }
        },
        copy: {
            statics: {
                files: [
                    {expand: true, src: '**/*.{html,json}', cwd: 'src/', dest: 'dist/'},
                    {expand: true, src: 'fonts/**/*', cwd: 'node_modules/bootstrap-sass/assets/', dest: 'dist'}
                ]
            },
            license: {
                files: [
                    {
                        cwd: './',
                        src: ['LICENSE'],
                        dest: 'dist/LICENSE.txt'
                    }
                ]
            }
        },
        ngtemplates: {
            'monad.templates': {
                options: {
                    htmlmin: {
                        collapseBooleanAttributes: true,
                        collapseWhitespace: true,
                        removeAttributeQuotes: true,
                        removeComments: true,
                        removeEmptyAttributes: true,
                        removeRedundantAttributes: true,
                        removeScriptTypeAttributes: true,
                        removeStyleLinkTypeAttributes: true
                    },
                    standalone: true,
                    prefix: '/monad/'
                },
                cwd: 'src',
                src: ['**/*.html', '!index.html'],
                dest: 'templates.js'
            }
        },
        spritesheet: {
            compile: {
                options: {
                    outputImage: 'i18n.png',
                    outputCss: 'flags.css',
                    selector: '.flag'
                },
                files: {'': 'assets/i18n/**/*.png'}
            }
        },
        inline: {
            index: {
                src: 'src/index.html',
                dest: 'index.html'
            },
            flags: {
                options: {
                    tag: ''
                },
                src: 'flags.css',
                dest: 'src/_sass/_flags.scss'
            }
        },
        clean: {
            prepare: ['dist']
        },
        watch: {
            gettext_extract: {
                files: ['src/**/*.{js,html}', 'index.html'],
                tasks: ['nggettext_extract']
            },
            gettext_compile: {
                files: ['Locale/*.po'],
                tasks: ['nggettext_compile']
            },
            sass: {
                files: ['src/_sass/**/*.scss', 'bower_components/bootstrap-sass/assets/stylesheets/**/*.scss'],
                tasks: ['sass']
            },
            statics: {
                files: ['src/**/*.{html,json}', 'bower_components/bootstrap-sass/assets/fonts/**/*'],
                tasks: ['newer:copy:statics']
            },
            license: {
                files: ['LICENSE'],
                tasks: ['newer:copy:license']
            },
            spritesheet: {
                files: ['assets/i18n/**/*.png'],
                tasks: ['spritesheet']
            },
            inline: {
                files: ['src/index.html', 'flags.css', 'i18n.png'],
                tasks: ['inline']
            }
        }
    });

    grunt.registerTask('default', ['clean:prepare', 'build']);
    grunt.registerTask('build', ['gettext', 'sass', 'spritesheet', 'inline', 'newer:copy']);
    grunt.registerTask('gettext', ['nggettext_extract', 'nggettext_compile']);
    grunt.registerTask('dev', ['clean:prepare', 'build', 'watch']);
};

<|endoftext|>


<commit_before>module.exports = function (grunt) {
  require('load-grunt-tasks')(grunt);

  var app_path = require('./bower.json').appPath;
  grunt.initConfig({
    paths  : {
      html: app_path + '/pages',
      scss: app_path + '/styles',
      css : app_path + '/resources/css',
      js  : app_path + '/resources/js'
    },
    autoprefixer: {
      dev: {
        options: {
          map: true
        },
        multiple_files: {
          expand: true,
          flatten: true,
          src: '<%= paths.css %>/*.css',
          dest: '<%= paths.css %>/'
        }
      },
      dist: {
        options: {
          browsers: ['last 2 versions', 'ie 9']
        },
        multiple_files: {
          expand: true,
          flatten: true,
          src: '<%= paths.css %>/*.css',
          dest: '<%= paths.css %>/'
        }
      }
    },
    compass: {
      dev: {
        options: {
          sassDir: '<%= paths.scss %>',
          cssDir : '<%= paths.css %>'
        }
      }
    },
    cssmin: {
      target: {
        files: [{
          expand: true,
          cwd: '<%= paths.css %>',
          src: ['*/*.css', '!*.min.css'],
          dest: '<%= paths.css %>',
          ext: '.css'
        }]
      }
    },
    jshint : {
      options: {
        reporter  : require('jshint-stylish'),
        'jshintrc': true
      },
      target : ['<%= paths.js %>/**/*.js', '!<%= paths.js %>/**/*-min.js', '!<%= paths.js %>/vendor/**/*.js']
    },
    watch  : {
      compass: {
        files  : ['<%= paths.scss %>/**/*.scss'],
        tasks  : ['compass:dev'],
        options: {
          livereload: true
        }
      },
      html   : {
        files  : ['<%= paths.html %>/**/*.html'],
        options: {
          livereload: true
        }
      },
      jshint : {
        files  : ['<%= paths.js %>/**/*.js'],
        tasks  : ['newer:jshint'],
        options: {
          livereload: true
        }
      }
    }
  });

  grunt.registerTask("default", []);
  grunt.registerTask("dev", ['compass:dev', 'autoprefixer']);
  grunt.registerTask("dist", ['compass:dev', 'autoprefixer', 'cssmin']);
};<commit_msg>Updated with new jshintrc file<commit_after>module.exports = function (grunt) {
  require('load-grunt-tasks')(grunt);

  var appPath = require('./bower.json').appPath;
  grunt.initConfig({
    paths  : {
      html: appPath + '/pages',
      scss: appPath + '/styles',
      css : appPath + '/resources/css',
      js  : appPath + '/resources/js'
    },
    autoprefixer: {
      dev: {
        options: {
          map: true
        },
        multiple_files: {
          expand: true,
          flatten: true,
          src: '<%= paths.css %>/*.css',
          dest: '<%= paths.css %>/'
        }
      },
      dist: {
        options: {
          browsers: ['last 2 versions', 'ie 9']
        },
        multiple_files: {
          expand: true,
          flatten: true,
          src: '<%= paths.css %>/*.css',
          dest: '<%= paths.css %>/'
        }
      }
    },
    compass: {
      dev: {
        options: {
          sassDir: '<%= paths.scss %>',
          cssDir : '<%= paths.css %>'
        }
      }
    },
    cssmin: {
      target: {
        files: [{
          expand: true,
          cwd: '<%= paths.css %>',
          src: ['*/*.css', '!*.min.css'],
          dest: '<%= paths.css %>',
          ext: '.css'
        }]
      }
    },
    jshint : {
      options: {
        reporter  : require('jshint-stylish'),
        'jshintrc': appPath + '/.jshintrc'
      },
      target : ['<%= paths.js %>/**/*.js', '!<%= paths.js %>/**/*-min.js', '!<%= paths.js %>/vendor/**/*.js']
    },
    watch  : {
      compass: {
        files  : ['<%= paths.scss %>/**/*.scss'],
        tasks  : ['compass:dev'],
        options: {
          livereload: true
        }
      },
      html   : {
        files  : ['<%= paths.html %>/**/*.html'],
        options: {
          livereload: true
        }
      },
      jshint : {
        files  : ['<%= paths.js %>/**/*.js'],
        tasks  : ['newer:jshint'],
        options: {
          livereload: true
        }
      }
    }
  });

  grunt.registerTask("default", []);
  grunt.registerTask("dev", ['compass:dev', 'autoprefixer']);
  grunt.registerTask("dist", ['compass:dev', 'autoprefixer', 'cssmin']);
};<|endoftext|>


<commit_before>module.exports = function(grunt) {

    require('load-grunt-tasks')(grunt);

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        jscs: {
            src: 'lib/*/*.js',
            options: {
                config: '.jscs.json'
            }
        },
        concat: {
            basic: {
                src: [
                    // Module system.
                    'node_modules/ym/modules.js',

                    // Plugins.
                    'node_modules/shower-*/shower-*.js',

                    // Core.
                    'lib/shower.js',
                    'lib/init.js',
                    'lib/*/*.js'
                ],
                dest: 'shower.js'
            },
            tests: {
                src: ['tests/unit/test.*.js'],
                dest: 'tests/unit/tests.js'
            }
        },
        mocha: {
            all: ['tests/unit/*.html']
        },
        uglify: {
            options: {
                mangle: true,
                banner: '/**\n * <%= pkg.description %>\n * <%= pkg.name %> v<%= pkg.version %>, <%= pkg.homepage %>\n * @copyright 2010–<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>, <%= pkg.author.url %>\n * @license <%= pkg.license %>\n */\n'
            },
            build: {
                src: 'shower.js',
                dest: 'shower.min.js'
            }
        },
        casperjs: {
            files: ['tests/functional/*.js']
        },
        bump: {
            options: {
                files: ['package.json', 'bower.json'],
                commitFiles: ['package.json', 'bower.json'],
                pushTo: 'origin'
            }
        }
    });

    grunt.registerTask('default', [
        'jscs',
        'concat:basic',
        'uglify'
    ]);

    grunt.registerTask('dev', [
        'jscs',
        'concat:basic'
    ]);

    grunt.registerTask('test', [
        'test:unit',
        'test:func'
    ]);

    grunt.registerTask('test:func', [
        'jscs',
        'concat:basic',
        'uglify',
        'casperjs'
    ]);

    grunt.registerTask('test:unit', [
        'jscs',
        'concat',
        'uglify',
        'mocha'
    ]);
};
<commit_msg>Change build sequence<commit_after>module.exports = function(grunt) {

    require('load-grunt-tasks')(grunt);

    grunt.initConfig({
        pkg: grunt.file.readJSON('package.json'),
        jscs: {
            src: 'lib/*/*.js',
            options: {
                config: '.jscs.json'
            }
        },
        concat: {
            basic: {
                src: [
                    // Module system.
                    'node_modules/ym/modules.js',

                    // Core.
                    'lib/init.js',
                    'lib/shower.js',
                    'lib/*/*.js',

                    // Plugins.
                    'node_modules/shower-*/shower-*.js'
                ],
                dest: 'shower.js'
            },
            tests: {
                src: ['tests/unit/test.*.js'],
                dest: 'tests/unit/tests.js'
            }
        },
        mocha: {
            all: ['tests/unit/*.html']
        },
        uglify: {
            options: {
                mangle: true,
                banner: '/**\n * <%= pkg.description %>\n * <%= pkg.name %> v<%= pkg.version %>, <%= pkg.homepage %>\n * @copyright 2010–<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>, <%= pkg.author.url %>\n * @license <%= pkg.license %>\n */\n'
            },
            build: {
                src: 'shower.js',
                dest: 'shower.min.js'
            }
        },
        casperjs: {
            files: ['tests/functional/*.js']
        },
        bump: {
            options: {
                files: ['package.json', 'bower.json'],
                commitFiles: ['package.json', 'bower.json'],
                pushTo: 'origin'
            }
        }
    });

    grunt.registerTask('default', [
        'jscs',
        'concat:basic',
        'uglify'
    ]);

    grunt.registerTask('dev', [
        'jscs',
        'concat:basic'
    ]);

    grunt.registerTask('test', [
        'test:unit',
        'test:func'
    ]);

    grunt.registerTask('test:func', [
        'jscs',
        'concat:basic',
        'uglify',
        'casperjs'
    ]);

    grunt.registerTask('test:unit', [
        'jscs',
        'concat',
        'uglify',
        'mocha'
    ]);
};
<|endoftext|>