Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/mq4-hover-shim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Rebert <code@rebertia.com>2015-01-01 06:28:13 +0300
committerChris Rebert <code@rebertia.com>2015-01-01 06:43:22 +0300
commit0e97ce1c2f135cf49d5c2f1ddce4ad2576a89b83 (patch)
treeb34e41f6e8a07dd6ac907983a7ff0f496cae6d8f /Gruntfile.js
initial checkin
Diffstat (limited to 'Gruntfile.js')
-rw-r--r--Gruntfile.js95
1 files changed, 95 insertions, 0 deletions
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..6561342
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,95 @@
+/*eslint-env node */
+
+module.exports = function (grunt) {
+ 'use strict';
+
+ grunt.util.linefeed = '\n';
+
+ require('load-grunt-tasks')(grunt);
+ require('time-grunt')(grunt);
+
+ grunt.initConfig({
+ pkg: grunt.file.readJSON('package.json'),
+ banner: (
+ "/*!\n * mq4-hover-hover-shim v<%= pkg.version %>\n" +
+ " * <%= pkg.homepage %>\n" +
+ " * Copyright (c) 2014 Christopher Rebert\n" +
+ " * Licensed under the MIT License (https://github.com/cvrebert/mq4-hover-hover-shim/blob/master/LICENSE).\n" +
+ " */\n"
+ ),
+
+ '6to5': {
+ options: {
+ modules: "common" // output a CommonJS module
+ },
+ dist: {
+ files: {
+ 'dist/cjs/<%= pkg.name %>.js': 'src/browser/<%= pkg.name %>.js'
+ }
+ }
+ },
+ browserify: {
+ options: {
+ banner: '<%= banner %>',
+ browserifyOptions: {
+ standalone: 'mq4HoverShim'
+ }
+ },
+ dist: {
+ src: 'dist/cjs/<%= pkg.name %>.js',
+ dest: 'dist/browser/<%= pkg.name %>.js'
+ }
+ },
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ gruntfile: {
+ src: 'Gruntfile.js'
+ },
+ lib: {
+ src: ['src/**/*.js']
+ },
+ test: {
+ src: ['test/**/*.js', '!test/lib/**/*.js']
+ }
+ },
+ jscs: {
+ gruntfile: {
+ src: '<%= jshint.gruntfile.src %>'
+ },
+ lib: {
+ src: '<%= jshint.lib.src %>'
+ },
+ test: {
+ src: '<%= jshint.test.src %>'
+ }
+ },
+ eslint: {
+ options: {
+ config: '.eslintrc'
+ },
+ gruntfile: {
+ src: '<%= jshint.gruntfile.src %>'
+ },
+ /*
+ // grunt-eslint doesn't support ES6
+ // (ES6 support is currently experimental in ESLint itself)
+ lib: {
+ src: '<%= jshint.lib.src %>'
+ },*/
+ test: {
+ src: '<%= jshint.test.src %>'
+ }
+ },
+ nodeunit: {
+ files: ['test/**/*_test.js']
+ }
+ });
+
+ // Tasks
+ grunt.registerTask('lint', ['jshint', 'eslint', 'jscs']);
+ grunt.registerTask('dist', ['6to5', 'browserify']);
+ grunt.registerTask('test', ['lint', 'dist', 'nodeunit']);
+ grunt.registerTask('default', ['test']);
+};