<commit_before>/**
 * Owl Carousel
 *
 * Bartosz Wojciechowski
 *
 * Copyright (c) 2014
 * Licensed under the MIT license.
 */
module.exports = function(grunt) {

	if (!grunt.file.isDir('bower_components')) {
		grunt.fail.fatal('>> Please run "bower install" before continuing.');
	}
	require('load-grunt-tasks')(grunt);

	grunt
		.initConfig({
			pkg: grunt.file.readJSON('package.json'),
			app: grunt.file.readJSON('_config.json'),
			vendor: 'bower_components',
			banner: '/**\n' + ' * Owl Carousel v<%= pkg.version %>\n'
				+ ' * Copyright 2013-<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n'
				+ ' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' + ' */\n',

			// assemble
			assemble: {
				options: {
					flatten: false,
					expand: true,
					production: false,
					assets: '<%= app.docs.dest %>/assets',
					postprocess: require('pretty'),

					// metadata
					pkg: '<%= pkg %>',
					app: '<%= app %>',
					data: [ '<%= app.docs.src %>/data/*.{json,yml}' ],

					// templates
					partials: '<%= app.docs.templates %>/partials/*.hbs',
					layoutdir: '<%= app.docs.layouts %>/',

					// extensions
					helpers: '<%= app.docs.src %>/helpers/*.js'
				},
				index: {
					options: {
						layout: 'home.hbs'
					},
					files: [ {
						expand: true,
						cwd: '<%= app.docs.pages %>/',
						src: '*.hbs',
						dest: '<%= app.docs.dest %>/'
					} ]
				},
				demos: {
					options: {
						layout: 'demos.hbs'
					},
					files: [ {
						expand: true,
						cwd: '<%= app.docs.pages %>/demos/',
						src: '*.hbs',
						dest: '<%= app.docs.dest %>/demos'
					} ]
				},
				docs: {
					options: {
						layout: 'docs.hbs'
					},
					files: [ {
						expand: true,
						cwd: '<%= app.docs.pages %>/docs/',
						src: '*.hbs',
						dest: '<%= app.docs.dest %>/docs'
					} ]
				}
			},

			// clean
			clean: {
				docs: [ '<%= app.docs.dest %>/**/*.*' ],
				dist: [ 'dist/**/*.*' ]
			},

			// sass
			sass: {
				docs: {
					options: {
						style: 'compressed',
						loadPath: [ '<%= app.docs.src %>/assets/scss/', 'bower_components/foundation/scss' ]
					},
					files: {
						'<%= app.docs.dest %>/assets/css/docs.theme.min.css': '<%= app.docs.src %>/assets/scss/docs.theme.scss'
					}
				},
				dist: {
					options: {
						style: 'expanded'
					},
					files: [ {
						expand: true,
						flatten: true,
						cwd: 'src/scss/',
						src: '*scss',
						dest: 'src/css/',
						ext: '.css',
						extDot: 'last'
					} ]
				}
			},

			concat: {
				dist: {
					files: {
						'dist/assets/owl.carousel.css': [ 'src/css/*.css', '!src/css/owl.theme*.css' ],
						'dist/<%= pkg.name %>.js': '<%= app.src.scripts %>'
					}
				}
			},

			cssmin: {
				dist: {
					files: {
						'dist/assets/<%= pkg.name %>.min.css': [ 'src/css/*.css', '!src/css/owl.theme*.css' ],
						'dist/assets/owl.theme.default.min.css': 'src/css/owl.theme.default.css',
						'dist/assets/owl.theme.green.min.css': 'src/css/owl.theme.green.css'
					}
				}
			},

			jshint: {
				options: {
					jshintrc: 'src/js/.jshintrc'
				},
				dist: {
					src: [ '<%= app.src.scripts %>', 'Gruntfile.js' ]
				}
			},

			qunit: {
				dist: [ 'test/*.html' ]
			},

			jscs: {
				options: {
					config: 'src/js/.jscsrc',
					reporter: 'text.js',
					reporterOutput: 'jscs.report.txt'
				},
				dist: {
					src: [ '<%= app.src.scripts %>', 'Gruntfile.js' ]
				}
			},

			uglify: {
				dist: {
					files: {
						'dist/<%= pkg.name %>.min.js': '<%= app.src.scripts %>'
					}
				}
			},

			// copy
			copy: {
				themes: {
					expand: true,
					flatten: true,
					cwd: 'src/css/',
					src: [ 'owl.theme.*' ],
					dest: 'dist/assets'
				},
				distImages: {
					expand: true,
					flatten: true,
					cwd: 'src/',
					src: [ 'img/*.*' ],
					dest: 'dist/assets'
				},

				distToDocs: {
					expand: true,
					cwd: 'dist/',
					src: [ '**/*.*' ],
					dest: '<%= app.docs.dest %>/assets/owlcarousel'
				},

				srcToDocs: {
					expand: true,
					cwd: 'src/js',
					src: [ '**/*.js' ],
					dest: '<%= app.docs.dest %>/assets/owlcarousel/src'
				},

				docsAssets: {
					expand: true,
					cwd: '<%= app.docs.src %>/assets/',
					src: [ 'css/*.css', 'vendors/*.js', 'vendors/*.map', 'img/*.*', 'js/*.*' ],
					dest: '<%= app.docs.dest %>/assets/'
				},
				readme: {
					files: [ {
						'dist/LICENSE': 'LICENSE',
						'dist/README.md': 'README.md'
					} ]
				}
			},

			// connect
			connect: {
				options: {
					port: 9000,
					open: true,
					livereload: true,
					hostname: 'localhost'
				},
				docs: {
					options: {
						base: "<%= app.docs.dest %>"
					}
				}
			},

			// watch
			watch: {
				options: {
					livereload: true
				},
				templates: {
					files: [ '<%= app.docs.templates %>/**/*.hbs' ],
					tasks: [ 'assemble' ]
				},
				sass: {
					files: [ '<%= app.docs.src %>/assets/**/*.scss' ],
					tasks: [ 'sass:docs' ]
				},
				sassDist: {
					files: [ 'src/**/*.scss' ],
					tasks: [ 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes','copy:distToDocs' ]
				},
				jsDocs: {
					files: [ '<%= app.docs.src %>/assets/**/*.js' ],
					tasks: [ 'copy:docsAssets' ]
				},
				js: {
					files: [ 'src/**/*.js' ],
					tasks: [ 'jscs:dist', 'jshint:dist', 'qunit:dist', 'uglify:dist', 'concat:dist', 'copy:distToDocs', 'copy:srcToDocs' ]
				},
				helpers: {
					files: [ '<%= app.src %>/helpers/*.js' ],
					tasks: [ 'assemble' ]
				},
				test: {
					files: [ 'test/*.html', 'test/unit/*.js' ],
					tasks: [ 'qunit:dist' ]
				}
			},

			// compress zip
			compress: {
				zip: {
					options: {
						archive: 'download/<%= pkg.version %>/owl.carousel.zip'
					},
					files: [ {
						expand: true,
						cwd: 'dist/',
						src: [ '**' ],
						dest: 'owl.carousel.<%= pkg.version %>'
					} ]
				}
			}
		});

	grunt.loadNpmTasks('assemble');

	// tasks
	grunt.registerTask('dist', [ 'clean:dist', 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes', 'copy:distImages', 'jscs:dist', 'uglify:dist', 'copy:readme' ]);

	grunt.registerTask('docs', [ 'clean:docs', 'assemble', 'sass:docs', 'copy:docsAssets', 'copy:distToDocs' ]);

	grunt.registerTask('test', [ 'jshint:dist', 'qunit:dist' ]);

	grunt.registerTask('default', [ 'dist', 'docs', 'test' ]);

	grunt.registerTask('serve', [ 'connect:docs', 'watch' ]);

	grunt.registerTask('zip', [ 'compress' ]);

};
<commit_msg>Disable sourcemaps for sass.<commit_after>/**
 * Owl Carousel
 *
 * Bartosz Wojciechowski
 *
 * Copyright (c) 2014
 * Licensed under the MIT license.
 */
module.exports = function(grunt) {

	if (!grunt.file.isDir('bower_components')) {
		grunt.fail.fatal('>> Please run "bower install" before continuing.');
	}
	require('load-grunt-tasks')(grunt);

	grunt
		.initConfig({
			pkg: grunt.file.readJSON('package.json'),
			app: grunt.file.readJSON('_config.json'),
			vendor: 'bower_components',
			banner: '/**\n' + ' * Owl Carousel v<%= pkg.version %>\n'
				+ ' * Copyright 2013-<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n'
				+ ' * Licensed under <%= pkg.license.type %> (<%= pkg.license.url %>)\n' + ' */\n',

			// assemble
			assemble: {
				options: {
					flatten: false,
					expand: true,
					production: false,
					assets: '<%= app.docs.dest %>/assets',
					postprocess: require('pretty'),

					// metadata
					pkg: '<%= pkg %>',
					app: '<%= app %>',
					data: [ '<%= app.docs.src %>/data/*.{json,yml}' ],

					// templates
					partials: '<%= app.docs.templates %>/partials/*.hbs',
					layoutdir: '<%= app.docs.layouts %>/',

					// extensions
					helpers: '<%= app.docs.src %>/helpers/*.js'
				},
				index: {
					options: {
						layout: 'home.hbs'
					},
					files: [ {
						expand: true,
						cwd: '<%= app.docs.pages %>/',
						src: '*.hbs',
						dest: '<%= app.docs.dest %>/'
					} ]
				},
				demos: {
					options: {
						layout: 'demos.hbs'
					},
					files: [ {
						expand: true,
						cwd: '<%= app.docs.pages %>/demos/',
						src: '*.hbs',
						dest: '<%= app.docs.dest %>/demos'
					} ]
				},
				docs: {
					options: {
						layout: 'docs.hbs'
					},
					files: [ {
						expand: true,
						cwd: '<%= app.docs.pages %>/docs/',
						src: '*.hbs',
						dest: '<%= app.docs.dest %>/docs'
					} ]
				}
			},

			// clean
			clean: {
				docs: [ '<%= app.docs.dest %>/**/*.*' ],
				dist: [ 'dist/**/*.*' ]
			},

			// sass
			sass: {
				docs: {
					options: {
						style: 'compressed',
						loadPath: [ '<%= app.docs.src %>/assets/scss/', 'bower_components/foundation/scss' ]
					},
					files: {
						'<%= app.docs.dest %>/assets/css/docs.theme.min.css': '<%= app.docs.src %>/assets/scss/docs.theme.scss'
					}
				},
				dist: {
					options: {
						style: 'expanded',
                        'sourcemap=none': true
					},
					files: [ {
						expand: true,
						flatten: true,
						cwd: 'src/scss/',
						src: '*scss',
						dest: 'src/css/',
						ext: '.css',
						extDot: 'last'
					} ]
				}
			},

			concat: {
				dist: {
					files: {
						'dist/assets/owl.carousel.css': [ 'src/css/*.css', '!src/css/owl.theme*.css' ],
						'dist/<%= pkg.name %>.js': '<%= app.src.scripts %>'
					}
				}
			},

			cssmin: {
				dist: {
					files: {
						'dist/assets/<%= pkg.name %>.min.css': [ 'src/css/*.css', '!src/css/owl.theme*.css' ],
						'dist/assets/owl.theme.default.min.css': 'src/css/owl.theme.default.css',
						'dist/assets/owl.theme.green.min.css': 'src/css/owl.theme.green.css'
					}
				}
			},

			jshint: {
				options: {
					jshintrc: 'src/js/.jshintrc'
				},
				dist: {
					src: [ '<%= app.src.scripts %>', 'Gruntfile.js' ]
				}
			},

			qunit: {
				dist: [ 'test/*.html' ]
			},

			jscs: {
				options: {
					config: 'src/js/.jscsrc',
					reporter: 'text.js',
					reporterOutput: 'jscs.report.txt'
				},
				dist: {
					src: [ '<%= app.src.scripts %>', 'Gruntfile.js' ]
				}
			},

			uglify: {
				dist: {
					files: {
						'dist/<%= pkg.name %>.min.js': '<%= app.src.scripts %>'
					}
				}
			},

			// copy
			copy: {
				themes: {
					expand: true,
					flatten: true,
					cwd: 'src/css/',
					src: [ 'owl.theme.*' ],
					dest: 'dist/assets'
				},
				distImages: {
					expand: true,
					flatten: true,
					cwd: 'src/',
					src: [ 'img/*.*' ],
					dest: 'dist/assets'
				},

				distToDocs: {
					expand: true,
					cwd: 'dist/',
					src: [ '**/*.*' ],
					dest: '<%= app.docs.dest %>/assets/owlcarousel'
				},

				srcToDocs: {
					expand: true,
					cwd: 'src/js',
					src: [ '**/*.js' ],
					dest: '<%= app.docs.dest %>/assets/owlcarousel/src'
				},

				docsAssets: {
					expand: true,
					cwd: '<%= app.docs.src %>/assets/',
					src: [ 'css/*.css', 'vendors/*.js', 'vendors/*.map', 'img/*.*', 'js/*.*' ],
					dest: '<%= app.docs.dest %>/assets/'
				},
				readme: {
					files: [ {
						'dist/LICENSE': 'LICENSE',
						'dist/README.md': 'README.md'
					} ]
				}
			},

			// connect
			connect: {
				options: {
					port: 9000,
					open: true,
					livereload: true,
					hostname: 'localhost'
				},
				docs: {
					options: {
						base: "<%= app.docs.dest %>"
					}
				}
			},

			// watch
			watch: {
				options: {
					livereload: true
				},
				templates: {
					files: [ '<%= app.docs.templates %>/**/*.hbs' ],
					tasks: [ 'assemble' ]
				},
				sass: {
					files: [ '<%= app.docs.src %>/assets/**/*.scss' ],
					tasks: [ 'sass:docs' ]
				},
				sassDist: {
					files: [ 'src/**/*.scss' ],
					tasks: [ 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes','copy:distToDocs' ]
				},
				jsDocs: {
					files: [ '<%= app.docs.src %>/assets/**/*.js' ],
					tasks: [ 'copy:docsAssets' ]
				},
				js: {
					files: [ 'src/**/*.js' ],
					tasks: [ 'jscs:dist', 'jshint:dist', 'qunit:dist', 'uglify:dist', 'concat:dist', 'copy:distToDocs', 'copy:srcToDocs' ]
				},
				helpers: {
					files: [ '<%= app.src %>/helpers/*.js' ],
					tasks: [ 'assemble' ]
				},
				test: {
					files: [ 'test/*.html', 'test/unit/*.js' ],
					tasks: [ 'qunit:dist' ]
				}
			},

			// compress zip
			compress: {
				zip: {
					options: {
						archive: 'download/<%= pkg.version %>/owl.carousel.zip'
					},
					files: [ {
						expand: true,
						cwd: 'dist/',
						src: [ '**' ],
						dest: 'owl.carousel.<%= pkg.version %>'
					} ]
				}
			}
		});

	grunt.loadNpmTasks('assemble');

	// tasks
	grunt.registerTask('dist', [ 'clean:dist', 'sass:dist', 'concat:dist', 'cssmin:dist', 'copy:themes', 'copy:distImages', 'jscs:dist', 'uglify:dist', 'copy:readme' ]);

	grunt.registerTask('docs', [ 'clean:docs', 'assemble', 'sass:docs', 'copy:docsAssets', 'copy:distToDocs' ]);

	grunt.registerTask('test', [ 'jshint:dist', 'qunit:dist' ]);

	grunt.registerTask('default', [ 'dist', 'docs', 'test' ]);

	grunt.registerTask('serve', [ 'connect:docs', 'watch' ]);

	grunt.registerTask('zip', [ 'compress' ]);

};
<|endoftext|>


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

  grunt.loadNpmTasks('grunt-tizen');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-htmlmin');
  grunt.loadNpmTasks('grunt-contrib-imagemin');
  grunt.loadNpmTasks('grunt-release');
  grunt.loadTasks('tools/grunt-tasks');

  grunt.initConfig({
    packageInfo: grunt.file.readJSON('package.json'),
    chromeInfo: grunt.file.readJSON('platforms/chrome-crx/manifest.json'),

    crosswalk: {
      arm: {
        //"outDir": process.env.HOME+'/z/webapps/webapps-annex/build',
        "outDir": 'build',

        verbose: false,

        // display name for the app on the device;
        // the sanitisedName used to construct the Locations object later
        // is derived from this
        name: '<%= packageInfo.name %>',

        // package for the app's generated Java files; this works best if
        // you have at least one period character between two character
        // strings, and no digits
        pkg: 'org.org01.webapps.annex',

        icon: 'icon_128.png',

        fullscreen: true,

        remoteDebugging: true,

        // path to the directory containing your HTML5 app;
        // note that this must use the correct path separators for your
        // platform: Windows uses '\\' while Linux uses '/'
        appRoot: 'build/xpk',

        // relative path from appRoot of the entry HTML file for your app
        appLocalPath: 'index.html',

        // embed crosswalk itself into the package
        //embedded: true,

        // path to the root of your Android SDK installation;
        // on Windows, use the path to the sdk directory inside
        // the installation, e.g. 'c:\\android-sdk\\sdk'
        // default: automatically obtain from the 'android' command's path
        //androidSDKDir: '/opt/android-sdk-linux/',

        // path to the xwalk_app_template directory; you can either
        // download and unpack this manually, or use the xwalk_android_dl
        // script to do so (part of this project; see the README for details);
        // note that path separators specific to your platform must be used
        // eg: export XWALK_APP_TEMPLATE=$HOME/Downloads/crosswalk-3.32.53.4-x86
        //xwalkAndroidDir: project/specific/folder

        // architecture of embedded crosswalk
        // default: it is obtained from the contents of
        // xwalkAndroidDir/native_libs/ if there is only one arch in there,
        // else it should be specified as either 'x86' or 'arm'
        arch: 'arm',

        // default: automatically obtains latest from androidSDKDir/build-tools
        //androidAPIVersion: "18.0.1"
      },
      x86: {
        //"outDir": process.env.HOME+'/z/webapps/webapps-annex/build',
        "outDir": 'build',

        verbose: false,

        // display name for the app on the device;
        // the sanitisedName used to construct the Locations object later
        // is derived from this
        name: '<%= packageInfo.name %>',

        // package for the app's generated Java files; this works best if
        // you have at least one period character between two character
        // strings, and no digits
        pkg: 'org.org01.webapps.annex',

        icon: 'icon_128.png',

        fullscreen: true,

        remoteDebugging: true,

        // path to the directory containing your HTML5 app;
        // note that this must use the correct path separators for your
        // platform: Windows uses '\\' while Linux uses '/'
        appRoot: 'build/xpk',

        // relative path from appRoot of the entry HTML file for your app
        appLocalPath: 'index.html',

        // embed crosswalk itself into the package
        //embedded: true,

        // path to the root of your Android SDK installation;
        // on Windows, use the path to the sdk directory inside
        // the installation, e.g. 'c:\\android-sdk\\sdk'
        // default: automatically obtain from the 'android' command's path
        //androidSDKDir: '/opt/android-sdk-linux/',

        // path to the xwalk_app_template directory; you can either
        // download and unpack this manually, or use the xwalk_android_dl
        // script to do so (part of this project; see the README for details);
        // note that path separators specific to your platform must be used
        // eg: export XWALK_APP_TEMPLATE=$HOME/Downloads/crosswalk-3.32.53.4-x86
        //xwalkAndroidDir: project/specific/folder

        // architecture of embedded crosswalk
        // default: it is obtained from the contents of
        // xwalkAndroidDir/native_libs/ if there is only one arch in there,
        // else it should be specified as either 'x86' or 'arm'
        arch: 'x86',

        // default: automatically obtains latest from androidSDKDir/build-tools
        //androidAPIVersion: "18.0.1"
      }
    },

    clean: ['build'],

    release: {
      options: {
        npm: false,
        npmtag: false,
        tagName: 'v<%= version %>'
      }
    },

    tizen_configuration: {
      // location on the device to install the tizen-app.sh script to
      // (default: '/tmp')
      tizenAppScriptDir: '/home/developer/',

      // path to the config.xml file for the Tizen wgt file - post templating
      // (default: 'config.xml')
      configFile: 'build/wgt/config.xml',

      // path to the sdb command (default: process.env.SDB or 'sdb')
      sdbCmd: 'sdb'
    },

    // minify JS
    uglify: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: 'app/js/**/*.js', dest: 'build/' }
        ]
      }
    },

    // minify CSS
    cssmin: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: ['app/css/**/*.css'], dest: 'build/' }
        ]
      }
    },

    copy: {
      common: {
        files: [
          { expand: true, cwd: '.', src: ['app/lib/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/audio/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/data/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['LICENSE'], dest: 'build/app/' },
          { expand: true, cwd: '.', src: ['app/README.txt'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/_locales/**'], dest: 'build/' }
        ]
      },

      wgt: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/wgt/' },
          { expand: true, cwd: '.', src: ['icon_128.png'], dest: 'build/wgt/' }
        ]
      },

      wgt_config: {
        files: [
          { expand: true, cwd: 'platforms/tizen-wgt/', src: ['config.xml'], dest: 'build/wgt/' }
        ],
        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }
      },

      crx: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/crx/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/crx/' }
        ]
      },

      crx_unpacked: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['js/**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['css/**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['*.html'], dest: 'build/crx/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/crx/' }
        ]
      },

      crx_manifest:
      {
        files: [
          { expand: true, cwd: 'platforms/chrome-crx/', src: ['manifest.json'], dest: 'build/crx/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

      xpk: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/xpk/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/xpk/' }
        ]
      },

      xpk_manifest:
      {
        files: [
          { expand: true, cwd: 'platforms/tizen-xpk/', src: ['manifest.json'], dest: 'build/xpk/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

      sdk: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['js/**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['css/**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['*.html'], dest: 'build/sdk/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/sdk/' }
        ]
      },

      sdk_platform:
      {
        files: [
          { expand: true, cwd: 'platforms/tizen-sdk/', src: ['.project'], dest: 'build/sdk/' },
          { expand: true, cwd: 'platforms/tizen-wgt/', src: ['config.xml'], dest: 'build/sdk/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

    },

    htmlmin: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: ['app/*.html'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/html/*.html'], dest: 'build/' }
        ],
        options: {
          removeComments: true,
          collapseWhitespace: true,
          removeCommentsFromCDATA: false,
          removeCDATASectionsFromCDATA: false,
          removeEmptyAttributes: true,
          removeEmptyElements: false
        }
      }
    },

    imagemin: {
      dist: {
        options: {
          optimizationLevel: 3,
          progressive: true
        },
        files: [
          { expand: true, cwd: '.', src: ['app/images/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/css/images/**'], dest: 'build/' }
        ]
      }
    },

    // make wgt package in build/ directory
    package: {
      wgt: {
        appName: '<%= packageInfo.name %>',
        version: '<%= packageInfo.version %>',
        files: 'build/wgt/**',
        stripPrefix: 'build/wgt/',
        outDir: 'build',
        suffix: '.wgt',
        addGitCommitId: false
      },
      sdk: {
        appName: '<%= packageInfo.name %>',
        version: '<%= packageInfo.version %>',
        files: 'build/sdk/**',
        stripPrefix: 'build/sdk/',
        outDir: 'build',
        suffix: '.zip'
      },
      'crx_zip': {
        appName: '<%= packageInfo.name %>-crx',
        version: '<%= packageInfo.version %>',
        files: 'build/crx/**',
        stripPrefix: 'build/crx/',
        outDir: 'build',
        suffix: '.zip'
      }
    },

    simple_server: {
      port: 30303,
      dir: 'build/app/'
    },

    tizen: {
      push: {
        action: 'push',
        localFiles: {
          pattern: 'build/*.wgt',
          filter: 'latest'
        },
        remoteDir: '/home/developer/'
      },

      install: {
        action: 'install',
        remoteFiles: {
          pattern: '/home/developer/<%= packageInfo.name %>*.wgt',
          filter: 'latest'
        }
      },

      uninstall: {
        action: 'uninstall'
      },

      start: {
        action: 'start',
        stopOnFailure: true
      },

      stop: {
        action: 'stop',
        stopOnFailure: false
      },

      debug: {
        action: 'debug',
        browserCmd: 'google-chrome %URL%',
        localPort: 9090,
        stopOnFailure: true
      }
    }
  });

  grunt.registerTask('dist', [
    'clean',
    'imagemin:dist',
    'uglify:dist',
    'cssmin:dist',
    'htmlmin:dist',
    'copy:common'
  ]);

  grunt.registerTask('crx', ['dist', 'copy:crx', 'copy:crx_manifest']);
  grunt.registerTask('crx_unpacked', [
    'clean',
    'imagemin:dist',
    'copy:common',
    'copy:crx_unpacked',
    'copy:crx_manifest',
    'package:crx_zip'
  ]);
  grunt.registerTask('wgt', ['dist', 'copy:wgt', 'copy:wgt_config', 'package:wgt']);
  grunt.registerTask('xpk', ['dist', 'copy:xpk', 'copy:xpk_manifest']);
  grunt.registerTask('sdk', [
    'clean',
    'imagemin:dist',
    'copy:common',
    'copy:sdk',
    'copy:sdk_platform',
    'package:sdk'
  ]);

  grunt.registerTask('perf', [
    'dist',
    'uglify:perf',
    'inline',
    'copy:wgt',
    'copy:wgt_config',
    'package:wgt'
  ]);

  grunt.registerTask('install', [
    'tizen:push',
    'tizen:stop',
    'tizen:uninstall',
    'tizen:install',
    'tizen:start'
  ]);

  grunt.registerTask('wait', function () {
    var done = this.async();
    setTimeout(function () {
      done();
    }, 10000);
  });

  grunt.registerTask('restart', ['tizen:stop', 'tizen:start']);

  grunt.registerTask('server', ['dist', 'simple_server']);

  grunt.registerTask('wgt-install', ['wgt', 'install']);
  grunt.registerTask('sdk-install', ['sdk', 'install']);

  grunt.registerTask('default', 'wgt');
  grunt.registerTask('apk', [
    'xpk',
    'crosswalk:x86',
    'crosswalk:arm'
  ]);
};
<commit_msg>Correcting package id for apk.<commit_after>module.exports = function (grunt) {

  grunt.loadNpmTasks('grunt-tizen');
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-cssmin');
  grunt.loadNpmTasks('grunt-contrib-htmlmin');
  grunt.loadNpmTasks('grunt-contrib-imagemin');
  grunt.loadNpmTasks('grunt-release');
  grunt.loadTasks('tools/grunt-tasks');

  grunt.initConfig({
    packageInfo: grunt.file.readJSON('package.json'),
    chromeInfo: grunt.file.readJSON('platforms/chrome-crx/manifest.json'),

    crosswalk: {
      arm: {
        //"outDir": process.env.HOME+'/z/webapps/webapps-annex/build',
        "outDir": 'build',

        verbose: false,

        // display name for the app on the device;
        // the sanitisedName used to construct the Locations object later
        // is derived from this
        name: '<%= packageInfo.name %>',

        // package for the app's generated Java files; this works best if
        // you have at least one period character between two character
        // strings, and no digits
        pkg: 'org.org01.webapps.<%= packageInfo.name.toLowerCase() %>',

        icon: 'icon_128.png',

        fullscreen: true,

        remoteDebugging: true,

        // path to the directory containing your HTML5 app;
        // note that this must use the correct path separators for your
        // platform: Windows uses '\\' while Linux uses '/'
        appRoot: 'build/xpk',

        // relative path from appRoot of the entry HTML file for your app
        appLocalPath: 'index.html',

        // embed crosswalk itself into the package
        //embedded: true,

        // path to the root of your Android SDK installation;
        // on Windows, use the path to the sdk directory inside
        // the installation, e.g. 'c:\\android-sdk\\sdk'
        // default: automatically obtain from the 'android' command's path
        //androidSDKDir: '/opt/android-sdk-linux/',

        // path to the xwalk_app_template directory; you can either
        // download and unpack this manually, or use the xwalk_android_dl
        // script to do so (part of this project; see the README for details);
        // note that path separators specific to your platform must be used
        // eg: export XWALK_APP_TEMPLATE=$HOME/Downloads/crosswalk-3.32.53.4-x86
        //xwalkAndroidDir: project/specific/folder

        // architecture of embedded crosswalk
        // default: it is obtained from the contents of
        // xwalkAndroidDir/native_libs/ if there is only one arch in there,
        // else it should be specified as either 'x86' or 'arm'
        arch: 'arm',

        // default: automatically obtains latest from androidSDKDir/build-tools
        //androidAPIVersion: "18.0.1"
      },
      x86: {
        //"outDir": process.env.HOME+'/z/webapps/webapps-annex/build',
        "outDir": 'build',

        verbose: false,

        // display name for the app on the device;
        // the sanitisedName used to construct the Locations object later
        // is derived from this
        name: '<%= packageInfo.name %>',

        // package for the app's generated Java files; this works best if
        // you have at least one period character between two character
        // strings, and no digits
        pkg: 'org.org01.webapps.<%= packageInfo.name.toLowerCase() %>',

        icon: 'icon_128.png',

        fullscreen: true,

        remoteDebugging: true,

        // path to the directory containing your HTML5 app;
        // note that this must use the correct path separators for your
        // platform: Windows uses '\\' while Linux uses '/'
        appRoot: 'build/xpk',

        // relative path from appRoot of the entry HTML file for your app
        appLocalPath: 'index.html',

        // embed crosswalk itself into the package
        //embedded: true,

        // path to the root of your Android SDK installation;
        // on Windows, use the path to the sdk directory inside
        // the installation, e.g. 'c:\\android-sdk\\sdk'
        // default: automatically obtain from the 'android' command's path
        //androidSDKDir: '/opt/android-sdk-linux/',

        // path to the xwalk_app_template directory; you can either
        // download and unpack this manually, or use the xwalk_android_dl
        // script to do so (part of this project; see the README for details);
        // note that path separators specific to your platform must be used
        // eg: export XWALK_APP_TEMPLATE=$HOME/Downloads/crosswalk-3.32.53.4-x86
        //xwalkAndroidDir: project/specific/folder

        // architecture of embedded crosswalk
        // default: it is obtained from the contents of
        // xwalkAndroidDir/native_libs/ if there is only one arch in there,
        // else it should be specified as either 'x86' or 'arm'
        arch: 'x86',

        // default: automatically obtains latest from androidSDKDir/build-tools
        //androidAPIVersion: "18.0.1"
      }
    },

    clean: ['build'],

    release: {
      options: {
        npm: false,
        npmtag: false,
        tagName: 'v<%= version %>'
      }
    },

    tizen_configuration: {
      // location on the device to install the tizen-app.sh script to
      // (default: '/tmp')
      tizenAppScriptDir: '/home/developer/',

      // path to the config.xml file for the Tizen wgt file - post templating
      // (default: 'config.xml')
      configFile: 'build/wgt/config.xml',

      // path to the sdb command (default: process.env.SDB or 'sdb')
      sdbCmd: 'sdb'
    },

    // minify JS
    uglify: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: 'app/js/**/*.js', dest: 'build/' }
        ]
      }
    },

    // minify CSS
    cssmin: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: ['app/css/**/*.css'], dest: 'build/' }
        ]
      }
    },

    copy: {
      common: {
        files: [
          { expand: true, cwd: '.', src: ['app/lib/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/audio/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/data/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['LICENSE'], dest: 'build/app/' },
          { expand: true, cwd: '.', src: ['app/README.txt'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/_locales/**'], dest: 'build/' }
        ]
      },

      wgt: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/wgt/' },
          { expand: true, cwd: '.', src: ['icon_128.png'], dest: 'build/wgt/' }
        ]
      },

      wgt_config: {
        files: [
          { expand: true, cwd: 'platforms/tizen-wgt/', src: ['config.xml'], dest: 'build/wgt/' }
        ],
        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }
      },

      crx: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/crx/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/crx/' }
        ]
      },

      crx_unpacked: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['js/**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['css/**'], dest: 'build/crx/' },
          { expand: true, cwd: 'app/', src: ['*.html'], dest: 'build/crx/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/crx/' }
        ]
      },

      crx_manifest:
      {
        files: [
          { expand: true, cwd: 'platforms/chrome-crx/', src: ['manifest.json'], dest: 'build/crx/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

      xpk: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/xpk/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/xpk/' }
        ]
      },

      xpk_manifest:
      {
        files: [
          { expand: true, cwd: 'platforms/tizen-xpk/', src: ['manifest.json'], dest: 'build/xpk/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

      sdk: {
        files: [
          { expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['js/**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['css/**'], dest: 'build/sdk/' },
          { expand: true, cwd: 'app/', src: ['*.html'], dest: 'build/sdk/' },
          { expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/sdk/' }
        ]
      },

      sdk_platform:
      {
        files: [
          { expand: true, cwd: 'platforms/tizen-sdk/', src: ['.project'], dest: 'build/sdk/' },
          { expand: true, cwd: 'platforms/tizen-wgt/', src: ['config.xml'], dest: 'build/sdk/' }
        ],

        options:
        {
          processContent: function(content, srcpath)
          {
            return grunt.template.process(content);
          }
        }

      },

    },

    htmlmin: {
      dist: {
        files: [
          { expand: true, cwd: '.', src: ['app/*.html'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/html/*.html'], dest: 'build/' }
        ],
        options: {
          removeComments: true,
          collapseWhitespace: true,
          removeCommentsFromCDATA: false,
          removeCDATASectionsFromCDATA: false,
          removeEmptyAttributes: true,
          removeEmptyElements: false
        }
      }
    },

    imagemin: {
      dist: {
        options: {
          optimizationLevel: 3,
          progressive: true
        },
        files: [
          { expand: true, cwd: '.', src: ['app/images/**'], dest: 'build/' },
          { expand: true, cwd: '.', src: ['app/css/images/**'], dest: 'build/' }
        ]
      }
    },

    // make wgt package in build/ directory
    package: {
      wgt: {
        appName: '<%= packageInfo.name %>',
        version: '<%= packageInfo.version %>',
        files: 'build/wgt/**',
        stripPrefix: 'build/wgt/',
        outDir: 'build',
        suffix: '.wgt',
        addGitCommitId: false
      },
      sdk: {
        appName: '<%= packageInfo.name %>',
        version: '<%= packageInfo.version %>',
        files: 'build/sdk/**',
        stripPrefix: 'build/sdk/',
        outDir: 'build',
        suffix: '.zip'
      },
      'crx_zip': {
        appName: '<%= packageInfo.name %>-crx',
        version: '<%= packageInfo.version %>',
        files: 'build/crx/**',
        stripPrefix: 'build/crx/',
        outDir: 'build',
        suffix: '.zip'
      }
    },

    simple_server: {
      port: 30303,
      dir: 'build/app/'
    },

    tizen: {
      push: {
        action: 'push',
        localFiles: {
          pattern: 'build/*.wgt',
          filter: 'latest'
        },
        remoteDir: '/home/developer/'
      },

      install: {
        action: 'install',
        remoteFiles: {
          pattern: '/home/developer/<%= packageInfo.name %>*.wgt',
          filter: 'latest'
        }
      },

      uninstall: {
        action: 'uninstall'
      },

      start: {
        action: 'start',
        stopOnFailure: true
      },

      stop: {
        action: 'stop',
        stopOnFailure: false
      },

      debug: {
        action: 'debug',
        browserCmd: 'google-chrome %URL%',
        localPort: 9090,
        stopOnFailure: true
      }
    }
  });

  grunt.registerTask('dist', [
    'clean',
    'imagemin:dist',
    'uglify:dist',
    'cssmin:dist',
    'htmlmin:dist',
    'copy:common'
  ]);

  grunt.registerTask('crx', ['dist', 'copy:crx', 'copy:crx_manifest']);
  grunt.registerTask('crx_unpacked', [
    'clean',
    'imagemin:dist',
    'copy:common',
    'copy:crx_unpacked',
    'copy:crx_manifest',
    'package:crx_zip'
  ]);
  grunt.registerTask('wgt', ['dist', 'copy:wgt', 'copy:wgt_config', 'package:wgt']);
  grunt.registerTask('xpk', ['dist', 'copy:xpk', 'copy:xpk_manifest']);
  grunt.registerTask('sdk', [
    'clean',
    'imagemin:dist',
    'copy:common',
    'copy:sdk',
    'copy:sdk_platform',
    'package:sdk'
  ]);

  grunt.registerTask('perf', [
    'dist',
    'uglify:perf',
    'inline',
    'copy:wgt',
    'copy:wgt_config',
    'package:wgt'
  ]);

  grunt.registerTask('install', [
    'tizen:push',
    'tizen:stop',
    'tizen:uninstall',
    'tizen:install',
    'tizen:start'
  ]);

  grunt.registerTask('wait', function () {
    var done = this.async();
    setTimeout(function () {
      done();
    }, 10000);
  });

  grunt.registerTask('restart', ['tizen:stop', 'tizen:start']);

  grunt.registerTask('server', ['dist', 'simple_server']);

  grunt.registerTask('wgt-install', ['wgt', 'install']);
  grunt.registerTask('sdk-install', ['sdk', 'install']);

  grunt.registerTask('default', 'wgt');
  grunt.registerTask('apk', [
    'xpk',
    'crosswalk:x86',
    'crosswalk:arm'
  ]);
};
<|endoftext|>


<commit_before>module.exports = function(grunt) {
  grunt.initConfig({
    nodewebkit: {
      options: {
        build_dir: './builds',
        mac_icns: './src/resource/icon512x512.icns',
        mac: true,
        win: true,
        linux32: false,
        linux64: false
      },
      src: ['./src/**/*']
    },
  });

  grunt.loadNpmTasks('grunt-node-webkit-builder');
}<commit_msg>add grunt default tasks<commit_after>module.exports = function(grunt) {
  grunt.initConfig({
    nodewebkit: {
      options: {
        build_dir: './builds',
        mac_icns: './src/resource/icon512x512.icns',
        mac: true,
        win: true,
        linux32: false,
        linux64: false
      },
      src: ['./src/**/*']
    },
  });

  grunt.loadNpmTasks('grunt-node-webkit-builder');
  grunt.registerTask('default', ['nodewebkit']);
}<|endoftext|>


<commit_before>module.exports = function(grunt) {
  grunt.initConfig({
    pkg : grunt.file.readJSON( 'package.json' ),
    env: {
      casper: {
        BASEURL: "http://www.google.com",
        PHANTOMJS_EXECUTABLE: "node_modules/casperjs/node_modules/.bin/phantomjs"
      }
    },
    casperjs: {
      options: {
        includes: ['includes/include1.js'],
        test: true
      },
      files: ['tests/**/*.js']
    }
  });
  // casperJS Frontend tests
  grunt.loadNpmTasks( 'grunt-casperjs' );
  grunt.loadNpmTasks( 'grunt-env' );

  grunt.registerTask('extendPATH', 'Add the npm bin dir to PATH', function() {
	var pathDelimiter = ':';
	var extPath = 'node_modules/.bin';
	var pathArray = process.env.PATH.split( pathDelimiter );
	pathArray.unshift( extPath );
	process.env.PATH = pathArray.join( pathDelimiter );
	grunt.log.writeln('Extending PATH to be ' + process.env.PATH);
  });

  // grunt for Frontend testing
  grunt.registerTask('default', [ 'env:casper', 'extendPATH', 'casperjs']);
};
<commit_msg>use my new grunt-env package<commit_after>module.exports = function(grunt) {
  grunt.initConfig({
    pkg : grunt.file.readJSON( 'package.json' ),
    env: {
      casper: {
        add: {
          BASEURL: "http://www.google.com",
          PHANTOMJS_EXECUTABLE: "node_modules/casperjs/node_modules/.bin/phantomjs"
        },
        extend: {
          PATH: {
            value: 'node_modules/.bin',
            delimiter: ':'
          }
        }
      }
    },
    casperjs: {
      options: {
        includes: ['includes/include1.js'],
        test: true
      },
      files: ['tests/**/*.js']
    }
  });
  // casperJS Frontend tests
  grunt.loadNpmTasks( 'grunt-casperjs' );
  grunt.loadNpmTasks( 'grunt-env' );

  // grunt for Frontend testing
  grunt.registerTask('default', [ 'env:casper',  'casperjs']);
};
<|endoftext|>


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

  var paths = {
    sourceBase   : 'src',
    buildBase    : 'dist/',
    sourceAssets : 'src/bonnet',
    buildAssets  : 'dist/hood',
    postsSource  : 'src/content'
  };

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

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

    // Start a local server
    connect: {
      dev: {
        options: {
          port: 8000,
          base: paths.buildBase,
          keepalive: true
        }
      }
    },
    // Lint JS files for coventions
    jscs: {
      src : '<%= paths.sourceAssets %>/js/source/*.js',
      options : {
        config : '.jscsrc',
        fix    : true
      }
    },
    // Lint JS files
    jshint: {
      options: {
        reporter: require('jshint-stylish'),
        jshintrc : true,
      },
      src : ['<%= paths.sourceAssets %>/js/source/*.js']
    },
    // Compiling javascript
    uglify: {
      options: {
        mangle: false,
        sourceMapIncludeSources : true,
        compress : {
          dead_code : true,
          drop_debugger : true,
          unused : true,
          join_vars : true,
          warnings : true,
          drop_console: true
        }
      },
      my_target: {
        files: {
          '<%= paths.buildAssets %>/js/vendor.min.js': ['<%= paths.sourceAssets %>/js/vendor/jquery.js', '<%= paths.sourceAssets %>/js/vendor/*.js'],
          '<%= paths.buildAssets %>/js/source.min.js': ['<%= paths.sourceAssets %>/js/source/*.js']
        }
      }
    },
    /* assemble templating */
    assemble: {
      main : {
        options: {
          helpers   : ['handlebars-helper-moment', '<%= paths.sourceAssets %>/helpers/**/*.js' ],
          partials  : '<%= paths.sourceAssets %>/partials/**/*',
          layoutdir : '<%= paths.sourceAssets %>/layouts',
          data      : '<%= paths.sourceAssets %>/data/*.json',
          plugins: ['assemble-contrib-permalinks'],
          permalinks: {
            preset: 'pretty'
          },
          collections : [{
            name : 'writings',
            inflection : 'writing'
          }]
        },
        files: [{
          cwd     : paths.postsSource,
          dest    : paths.buildBase,
          expand  : true,
          src     : ['**/*.{md,hbs}']
        }]
      }
    },
    // Lint SCSS files
    scsslint: {
      allFiles: ['<%= paths.sourceAssets %>/sass/**/*.scss', '!<%= paths.sourceAssets %>/sass/vendor/**/*.scss'],
      options: {
        config: '.scss-lint.yml',
        reporterOutput: 'scss-lint-report.xml',
        colorizeOutput: true
      },
    },
    // SASS compiling
    sass: {
      options: {
        sourceMap: true
      },
      dist: {
        files: {
          '<%= paths.buildAssets %>/css/main.css': '<%= paths.sourceAssets %>/sass/main.scss'
        }
      }
    },
    // Purify CSS
    purifycss: {
      options: {
        minify: true,
        info: true,
        rejected: true
      },
      target: {
        src: ['<%= paths.buildBase %>/**/*.html', '<%= paths.buildAssets %>/**/*.js'],
        css: ['<%= paths.buildAssets %>/css/**/main.css'],
        dest: '<%= paths.buildAssets %>/css/dennis.css'
      },
    },
    // CSS minification
    postcss: {
      options: {
        map: 'inline', // inline sourcemaps
        processors: [
          require('cssnano')({
            autoprefixer : {
            }
          })
        ]
      },
      dist: {
        src: '<%= paths.buildAssets %>/css/main.css'
      }
    },
    // The ever epic watch statement
    watch: {
      options: {
        livereload: true,
      },
      js: {
        files: '<%= paths.sourceAssets %>/js/**/*.js',
        tasks: ['uglify'],
      },
      css: {
        files: '<%= paths.sourceAssets %>/sass/**/*.scss',
        tasks: ['sass', 'postcss'],
      },
      posts : {
        files : '<%= paths.postsSource %>/**/*.{md,hbs}',
        tasks : ['assemble']
      },
      layout : {
        files : '<%= paths.sourceAssets %>/**/*.hbs',
        tasks : ['assemble']
      },
      images : {
        files : '<%= paths.sourceAssets %>/images/**/*',
        tasks : ['copy:images']
      },
      fonts : {
        files : '<%= paths.sourceAssets %>/fonts/**/*',
        tasks : ['copy:fonts']
      },
      grunt: {
          files: ['Gruntfile.js']
      }
    },
    browserSync: {
        dev: {
            bsFiles: {
                src : [
                    '<%= paths.buildAssets %>/css/*.css',
                    '<%= paths.buildBase %>/*.html'
                ]
            },
            options: {
                watchTask: true,
                server: paths.buildBase
            }
        }
    },
    responsive_images_extender: {
      target: {
        options: {},
        files: [{
          expand: true,
          src: ['**/*.{html,htm,php}'],
          cwd: paths.buildBase,
          dest: paths.buildBase
        }]
      }
    },
    responsive_images: {
      options: {
        engine : 'gm',
        newFilesOnly : true,
      },
      your_target: {
        expand: true,
        src: ['images/**.{jpg,gif,png}'],
        cwd: '<%= paths.sourceAssets %>/',
        dest: '<%= paths.buildAssets %>'
      },
    },
    copy: {
      images: {
        files: [{
            expand: true,
            flatten: true,
            src: ['<%= paths.sourceAssets %>/images/**/*.{jpeg,jpg,png,gif}'],
            dest: '<%= paths.buildAssets %>/images',
            filter: 'isFile'
          },
        ]
      },
      cname : {
        src : "CNAME",
        dest : paths.buildBase
      },
      fonts: {
        files: [{
            expand: true,
            flatten: true,
            src: ['<%= paths.sourceAssets %>/fonts/**/*'],
            dest: '<%= paths.buildAssets %>/fonts',
            filter: 'isFile'
          },
        ]
      }
    },
    // Push the built files to the gh-pages branch
    'gh-pages': {
      options: {
        base: 'dist',
        branch: 'master'
      },
      src: ['**']
    }
  });

  grunt.loadNpmTasks('assemble');

  /* grunt tasks */
  grunt.registerTask( 'dev', ['assemble', 'sass', 'postcss', 'copy', 'uglify','browserSync','watch' ] );

  // Build task
  grunt.registerTask( 'build', ['assemble', 'sass', 'postcss', 'purifycss','copy', 'gh-pages' ] );

};
<commit_msg>add watch for data json files<commit_after>module.exports = function (grunt) {
  'use strict';

  var paths = {
    sourceBase   : 'src',
    buildBase    : 'dist/',
    sourceAssets : 'src/bonnet',
    buildAssets  : 'dist/hood',
    postsSource  : 'src/content'
  };

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

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

    // Start a local server
    connect: {
      dev: {
        options: {
          port: 8000,
          base: paths.buildBase,
          keepalive: true
        }
      }
    },
    // Lint JS files for coventions
    jscs: {
      src : '<%= paths.sourceAssets %>/js/source/*.js',
      options : {
        config : '.jscsrc',
        fix    : true
      }
    },
    // Lint JS files
    jshint: {
      options: {
        reporter: require('jshint-stylish'),
        jshintrc : true,
      },
      src : ['<%= paths.sourceAssets %>/js/source/*.js']
    },
    // Compiling javascript
    uglify: {
      options: {
        mangle: false,
        sourceMapIncludeSources : true,
        compress : {
          dead_code : true,
          drop_debugger : true,
          unused : true,
          join_vars : true,
          warnings : true,
          drop_console: true
        }
      },
      my_target: {
        files: {
          '<%= paths.buildAssets %>/js/vendor.min.js': ['<%= paths.sourceAssets %>/js/vendor/jquery.js', '<%= paths.sourceAssets %>/js/vendor/*.js'],
          '<%= paths.buildAssets %>/js/source.min.js': ['<%= paths.sourceAssets %>/js/source/*.js']
        }
      }
    },
    /* assemble templating */
    assemble: {
      main : {
        options: {
          helpers   : ['handlebars-helper-moment', '<%= paths.sourceAssets %>/helpers/**/*.js' ],
          partials  : '<%= paths.sourceAssets %>/partials/**/*',
          layoutdir : '<%= paths.sourceAssets %>/layouts',
          data      : '<%= paths.sourceAssets %>/data/*.json',
          plugins: ['assemble-contrib-permalinks'],
          permalinks: {
            preset: 'pretty'
          },
          collections : [{
            name : 'writings',
            inflection : 'writing'
          }]
        },
        files: [{
          cwd     : paths.postsSource,
          dest    : paths.buildBase,
          expand  : true,
          src     : ['**/*.{md,hbs}']
        }]
      }
    },
    // Lint SCSS files
    scsslint: {
      allFiles: ['<%= paths.sourceAssets %>/sass/**/*.scss', '!<%= paths.sourceAssets %>/sass/vendor/**/*.scss'],
      options: {
        config: '.scss-lint.yml',
        reporterOutput: 'scss-lint-report.xml',
        colorizeOutput: true
      },
    },
    // SASS compiling
    sass: {
      options: {
        sourceMap: true
      },
      dist: {
        files: {
          '<%= paths.buildAssets %>/css/main.css': '<%= paths.sourceAssets %>/sass/main.scss'
        }
      }
    },
    // Purify CSS
    purifycss: {
      options: {
        minify: true,
        info: true,
        rejected: true
      },
      target: {
        src: ['<%= paths.buildBase %>/**/*.html', '<%= paths.buildAssets %>/**/*.js'],
        css: ['<%= paths.buildAssets %>/css/**/main.css'],
        dest: '<%= paths.buildAssets %>/css/dennis.css'
      },
    },
    // CSS minification
    postcss: {
      options: {
        map: 'inline', // inline sourcemaps
        processors: [
          require('cssnano')({
            autoprefixer : {
            }
          })
        ]
      },
      dist: {
        src: '<%= paths.buildAssets %>/css/main.css'
      }
    },
    // The ever epic watch statement
    watch: {
      options: {
        livereload: true,
      },
      js: {
        files: '<%= paths.sourceAssets %>/js/**/*.js',
        tasks: ['uglify'],
      },
      css: {
        files: '<%= paths.sourceAssets %>/sass/**/*.scss',
        tasks: ['sass', 'postcss'],
      },
      posts : {
        files : '<%= paths.postsSource %>/**/*.{md,hbs}',
        tasks : ['assemble']
      },
      layout : {
        files : '<%= paths.sourceAssets %>/**/*.hbs',
        tasks : ['assemble']
      },
      images : {
        files : '<%= paths.sourceAssets %>/images/**/*',
        tasks : ['copy:images']
      },
      fonts : {
        files : '<%= paths.sourceAssets %>/fonts/**/*',
        tasks : ['copy:fonts']
      },
      grunt: {
          files: ['Gruntfile.js']
      },
      data: {
        files : '<%= paths.sourceAssets %>/data/*.json',
        tasks : ['assemble']
      }
    },
    browserSync: {
        dev: {
            bsFiles: {
                src : [
                    '<%= paths.buildAssets %>/css/*.css',
                    '<%= paths.buildBase %>/*.html'
                ]
            },
            options: {
                watchTask: true,
                server: paths.buildBase
            }
        }
    },
    responsive_images_extender: {
      target: {
        options: {},
        files: [{
          expand: true,
          src: ['**/*.{html,htm,php}'],
          cwd: paths.buildBase,
          dest: paths.buildBase
        }]
      }
    },
    responsive_images: {
      options: {
        engine : 'gm',
        newFilesOnly : true,
      },
      your_target: {
        expand: true,
        src: ['images/**.{jpg,gif,png}'],
        cwd: '<%= paths.sourceAssets %>/',
        dest: '<%= paths.buildAssets %>'
      },
    },
    copy: {
      images: {
        files: [{
            expand: true,
            flatten: true,
            src: ['<%= paths.sourceAssets %>/images/**/*.{jpeg,jpg,png,gif}'],
            dest: '<%= paths.buildAssets %>/images',
            filter: 'isFile'
          },
        ]
      },
      cname : {
        src : "CNAME",
        dest : paths.buildBase
      },
      fonts: {
        files: [{
            expand: true,
            flatten: true,
            src: ['<%= paths.sourceAssets %>/fonts/**/*'],
            dest: '<%= paths.buildAssets %>/fonts',
            filter: 'isFile'
          },
        ]
      }
    },
    // Push the built files to the gh-pages branch
    'gh-pages': {
      options: {
        base: 'dist',
        branch: 'master'
      },
      src: ['**']
    }
  });

  grunt.loadNpmTasks('assemble');

  /* grunt tasks */
  grunt.registerTask( 'dev', ['assemble', 'sass', 'postcss', 'copy', 'uglify','browserSync','watch' ] );

  // Build task
  grunt.registerTask( 'build', ['assemble', 'sass', 'postcss', 'purifycss','copy', 'gh-pages' ] );

};
<|endoftext|>


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

	grunt.initConfig({
		sass: {
			dist: {
				options: {
					outputStyle: "expanded"
				},
				files: {
					'dist/flexout.css': 'flexout.scss'
				}
			},
			docs: {
				options: {
					sourceMap: true
				},
				files: {
					'docs/css/docs.css': 'docs/scss/docs.scss'
				}
			}
		},

		autoprefixer: {
			options: {
				browsers: [
					"Android 2.3",
					"Android >= 4",
					"Chrome >= 20",
					"Firefox >= 24",
					"Explorer >= 8",
					"iOS >= 6",
					"Opera >= 12",
					"Safari >= 6"
				]
			},
			dist: {
				src: "dist/flexout.css"
			},
			docs: {
				options: {
					map: true,
				},
				src: "docs/css/docs.css"
			}
		},

		cssmin: {
			dist: {
				files: {
					"dist/flexout.min.css": "dist/flexout.css"
				}
			},
			docs: {
				options: {
					sourceMap: true
				},
				files: {
					"docs/css/docs.css": "docs/css/docs.css"
				}
			}
		},

		connect: {
			server: {
				options: {
					hostname: "localhost",
					port: 9000,
					livereload: 9090,
					open: 'http://<%= connect.server.options.hostname %>:<%= connect.server.options.port %>/docs',
				}
			}
		},

		watch: {
			output: {
				options: {
					livereload: 9090
				},
				files: [
					"dist/flexout.css",
					"dist/flexout.min.css",
					"docs/css/docs.css",
					"docs/index.html"
				],
			},
			dist: {
				files: "scss/*.scss",
				tasks: ["sass", "autoprefixer", "cssmin"]
			},
			docs: {
				files: "docs/scss/*.scss",
				tasks: ["sass:docs", "autoprefixer:docs", "cssmin:docs"]
			}
		}
	});

	grunt.registerTask("default", function(){
		grunt.task.run(["sass","autoprefixer", "cssmin"]);
	});

	grunt.registerTask("serve", function(){
		grunt.task.run(["connect","watch"]);
	});

	grunt.loadNpmTasks("grunt-autoprefixer");
	grunt.loadNpmTasks("grunt-contrib-connect");
	grunt.loadNpmTasks("grunt-contrib-cssmin");
	grunt.loadNpmTasks("grunt-contrib-watch");
	grunt.loadNpmTasks("grunt-sass");
};
<commit_msg>fix sass file watcher<commit_after>module.exports = function(grunt){
	"use strict";

	grunt.initConfig({
		sass: {
			dist: {
				options: {
					outputStyle: "expanded"
				},
				files: {
					'dist/flexout.css': 'flexout.scss'
				}
			},
			docs: {
				options: {
					sourceMap: true
				},
				files: {
					'docs/css/docs.css': 'docs/scss/docs.scss'
				}
			}
		},

		autoprefixer: {
			options: {
				browsers: [
					"Android 2.3",
					"Android >= 4",
					"Chrome >= 20",
					"Firefox >= 24",
					"Explorer >= 8",
					"iOS >= 6",
					"Opera >= 12",
					"Safari >= 6"
				]
			},
			dist: {
				src: "dist/flexout.css"
			},
			docs: {
				options: {
					map: true,
				},
				src: "docs/css/docs.css"
			}
		},

		cssmin: {
			dist: {
				files: {
					"dist/flexout.min.css": "dist/flexout.css"
				}
			},
			docs: {
				options: {
					sourceMap: true
				},
				files: {
					"docs/css/docs.css": "docs/css/docs.css"
				}
			}
		},

		connect: {
			server: {
				options: {
					hostname: "localhost",
					port: 9000,
					livereload: 9090,
					open: 'http://<%= connect.server.options.hostname %>:<%= connect.server.options.port %>/docs',
				}
			}
		},

		watch: {
			output: {
				options: {
					livereload: 9090
				},
				files: [
					"dist/flexout.css",
					"dist/flexout.min.css",
					"docs/css/docs.css",
					"docs/index.html"
				],
			},
			dist: {
				files: "flexout.scss",
				tasks: ["sass", "autoprefixer", "cssmin"]
			},
			docs: {
				files: "docs/scss/*.scss",
				// tasks: ["sass:docs", "autoprefixer:docs", "cssmin:docs"]
				tasks: ["sass:docs", "autoprefixer:docs"]
			}
		}
	});

	grunt.registerTask("default", function(){
		grunt.task.run(["sass","autoprefixer", "cssmin"]);
	});

	grunt.registerTask("serve", function(){
		grunt.task.run(["connect","watch"]);
	});

	grunt.loadNpmTasks("grunt-autoprefixer");
	grunt.loadNpmTasks("grunt-contrib-connect");
	grunt.loadNpmTasks("grunt-contrib-cssmin");
	grunt.loadNpmTasks("grunt-contrib-watch");
	grunt.loadNpmTasks("grunt-sass");
};
<|endoftext|>


<commit_before>/*eslint-disable no-process-env */
module.exports = function(grunt) {

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

    eslint: {
      options: {
      },
      files: [
        '*.js',
        'lib/**/!(*.min|parser).js',
        'spec/**/!(*.amd|json2|require).js'
      ]
    },

    clean: ['tmp', 'dist', 'lib/handlebars/compiler/parser.js'],

    copy: {
      dist: {
        options: {
          processContent: function(content) {
            return grunt.template.process('/*!\n\n <%= pkg.name %> v<%= pkg.version %>\n\n<%= grunt.file.read("LICENSE") %>\n@license\n*/\n')
                + content;
          }
        },
        files: [
          {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/'}
        ]
      },
      cdnjs: {
        files: [
          {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/cdnjs'}
        ]
      },
      components: {
        files: [
          {expand: true, cwd: 'components/', src: ['**'], dest: 'dist/components'},
          {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/components'}
        ]
      }
    },

    babel: {
      options: {
        loose: ['es6.modules']
      },
      amd: {
        options: {
          modules: 'amd'
        },
        files: [{
          expand: true,
          cwd: 'lib/',
          src: '**/!(index).js',
          dest: 'dist/amd/'
        }]
      },

      cjs: {
        options: {
          modules: 'common'
        },
        files: [{
          cwd: 'lib/',
          expand: true,
          src: '**/!(index).js',
          dest: 'dist/cjs/'
        }]
      }
    },
    webpack: {
      options: {
        context: __dirname,
        module: {
          loaders: [
            // the optional 'runtime' transformer tells babel to require the runtime instead of inlining it.
            { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime&loose=es6.modules' }
          ]
        },
        output: {
          path: 'dist/',
          library: 'Handlebars',
          libraryTarget: 'umd'
        }
      },
      handlebars: {
        entry: './lib/handlebars.js',
        output: {
          filename: 'handlebars.js'
        }
      },
      runtime: {
        entry: './lib/handlebars.runtime.js',
        output: {
          filename: 'handlebars.runtime.js'
        }
      }
    },

    requirejs: {
      options: {
        optimize: 'none',
        baseUrl: 'dist/amd/'
      },
      dist: {
        options: {
          name: 'handlebars',
          out: 'dist/handlebars.amd.js'
        }
      },
      runtime: {
        options: {
          name: 'handlebars.runtime',
          out: 'dist/handlebars.runtime.amd.js'
        }
      }
    },

    uglify: {
      options: {
        mangle: true,
        compress: true,
        preserveComments: 'some'
      },
      dist: {
        files: [{
          cwd: 'dist/',
          expand: true,
          src: ['handlebars*.js', '!*.min.js'],
          dest: 'dist/',
          rename: function(dest, src) {
            return dest + src.replace(/\.js$/, '.min.js');
          }
        }]
      }
    },

    concat: {
      tests: {
        src: ['spec/!(require).js'],
        dest: 'tmp/tests.js'
      }
    },

    connect: {
      server: {
        options: {
          base: '.',
          hostname: '*',
          port: 9999
        }
      }
    },
    'saucelabs-mocha': {
      all: {
        options: {
          build: process.env.TRAVIS_JOB_ID,
          urls: ['http://localhost:9999/spec/?headless=true', 'http://localhost:9999/spec/amd.html?headless=true'],
          detailedError: true,
          concurrency: 2,
          browsers: [
            {browserName: 'chrome'},
            {browserName: 'firefox'},
            {browserName: 'safari', version: 7, platform: 'OS X 10.9'},
            {browserName: 'safari', version: 6, platform: 'OS X 10.8'},
            {browserName: 'internet explorer', version: 11, platform: 'Windows 8.1'},
            {browserName: 'internet explorer', version: 10, platform: 'Windows 8'},
            {browserName: 'internet explorer', version: 9, platform: 'Windows 7'}
          ]
        }
      },
      sanity: {
        options: {
          build: process.env.TRAVIS_JOB_ID,
          urls: ['http://localhost:9999/spec/umd.html?headless=true', 'http://localhost:9999/spec/amd-runtime.html?headless=true', 'http://localhost:9999/spec/umd-runtime.html?headless=true'],
          detailedError: true,
          concurrency: 2,
          browsers: [
            {browserName: 'chrome'}
          ]
        }
      }
    },

    watch: {
      scripts: {
        options: {
          atBegin: true
        },

        files: ['src/*', 'lib/**/*.js', 'spec/**/*.js'],
        tasks: ['build', 'amd', 'tests', 'test']
      }
    }
  });

  // Build a new version of the library
  this.registerTask('build', 'Builds a distributable version of the current project', [
                    'eslint',
                    'parser',
                    'node',
                    'globals']);

  this.registerTask('amd', ['babel:amd', 'requirejs']);
  this.registerTask('node', ['babel:cjs']);
  this.registerTask('globals', ['webpack']);
  this.registerTask('tests', ['concat:tests']);

  this.registerTask('release', 'Build final packages', ['eslint', 'amd', 'uglify', 'copy:dist', 'copy:components', 'copy:cdnjs']);

  // Load tasks from npm
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-requirejs');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-babel');
  grunt.loadNpmTasks('grunt-eslint');
  grunt.loadNpmTasks('grunt-saucelabs');
  grunt.loadNpmTasks('grunt-webpack');

  grunt.task.loadTasks('tasks');

  grunt.registerTask('bench', ['metrics']);
  grunt.registerTask('sauce', process.env.SAUCE_USERNAME ? ['tests', 'connect', 'saucelabs-mocha'] : []);

  grunt.registerTask('travis', process.env.PUBLISH ? ['default', 'sauce', 'metrics', 'publish:latest'] : ['default']);

  grunt.registerTask('dev', ['clean', 'connect', 'watch']);
  grunt.registerTask('default', ['clean', 'build', 'test', 'release']);
};
<commit_msg>Pull sauce tests out of CI<commit_after>/*eslint-disable no-process-env */
module.exports = function(grunt) {

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

    eslint: {
      options: {
      },
      files: [
        '*.js',
        'lib/**/!(*.min|parser).js',
        'spec/**/!(*.amd|json2|require).js'
      ]
    },

    clean: ['tmp', 'dist', 'lib/handlebars/compiler/parser.js'],

    copy: {
      dist: {
        options: {
          processContent: function(content) {
            return grunt.template.process('/*!\n\n <%= pkg.name %> v<%= pkg.version %>\n\n<%= grunt.file.read("LICENSE") %>\n@license\n*/\n')
                + content;
          }
        },
        files: [
          {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/'}
        ]
      },
      cdnjs: {
        files: [
          {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/cdnjs'}
        ]
      },
      components: {
        files: [
          {expand: true, cwd: 'components/', src: ['**'], dest: 'dist/components'},
          {expand: true, cwd: 'dist/', src: ['*.js'], dest: 'dist/components'}
        ]
      }
    },

    babel: {
      options: {
        loose: ['es6.modules']
      },
      amd: {
        options: {
          modules: 'amd'
        },
        files: [{
          expand: true,
          cwd: 'lib/',
          src: '**/!(index).js',
          dest: 'dist/amd/'
        }]
      },

      cjs: {
        options: {
          modules: 'common'
        },
        files: [{
          cwd: 'lib/',
          expand: true,
          src: '**/!(index).js',
          dest: 'dist/cjs/'
        }]
      }
    },
    webpack: {
      options: {
        context: __dirname,
        module: {
          loaders: [
            // the optional 'runtime' transformer tells babel to require the runtime instead of inlining it.
            { test: /\.jsx?$/, exclude: /node_modules/, loader: 'babel-loader?optional=runtime&loose=es6.modules' }
          ]
        },
        output: {
          path: 'dist/',
          library: 'Handlebars',
          libraryTarget: 'umd'
        }
      },
      handlebars: {
        entry: './lib/handlebars.js',
        output: {
          filename: 'handlebars.js'
        }
      },
      runtime: {
        entry: './lib/handlebars.runtime.js',
        output: {
          filename: 'handlebars.runtime.js'
        }
      }
    },

    requirejs: {
      options: {
        optimize: 'none',
        baseUrl: 'dist/amd/'
      },
      dist: {
        options: {
          name: 'handlebars',
          out: 'dist/handlebars.amd.js'
        }
      },
      runtime: {
        options: {
          name: 'handlebars.runtime',
          out: 'dist/handlebars.runtime.amd.js'
        }
      }
    },

    uglify: {
      options: {
        mangle: true,
        compress: true,
        preserveComments: 'some'
      },
      dist: {
        files: [{
          cwd: 'dist/',
          expand: true,
          src: ['handlebars*.js', '!*.min.js'],
          dest: 'dist/',
          rename: function(dest, src) {
            return dest + src.replace(/\.js$/, '.min.js');
          }
        }]
      }
    },

    concat: {
      tests: {
        src: ['spec/!(require).js'],
        dest: 'tmp/tests.js'
      }
    },

    connect: {
      server: {
        options: {
          base: '.',
          hostname: '*',
          port: 9999
        }
      }
    },
    'saucelabs-mocha': {
      all: {
        options: {
          build: process.env.TRAVIS_JOB_ID,
          urls: ['http://localhost:9999/spec/?headless=true', 'http://localhost:9999/spec/amd.html?headless=true'],
          detailedError: true,
          concurrency: 2,
          browsers: [
            {browserName: 'chrome'},
            {browserName: 'firefox'},
            {browserName: 'safari', version: 7, platform: 'OS X 10.9'},
            {browserName: 'safari', version: 6, platform: 'OS X 10.8'},
            {browserName: 'internet explorer', version: 11, platform: 'Windows 8.1'},
            {browserName: 'internet explorer', version: 10, platform: 'Windows 8'},
            {browserName: 'internet explorer', version: 9, platform: 'Windows 7'}
          ]
        }
      },
      sanity: {
        options: {
          build: process.env.TRAVIS_JOB_ID,
          urls: ['http://localhost:9999/spec/umd.html?headless=true', 'http://localhost:9999/spec/amd-runtime.html?headless=true', 'http://localhost:9999/spec/umd-runtime.html?headless=true'],
          detailedError: true,
          concurrency: 2,
          browsers: [
            {browserName: 'chrome'}
          ]
        }
      }
    },

    watch: {
      scripts: {
        options: {
          atBegin: true
        },

        files: ['src/*', 'lib/**/*.js', 'spec/**/*.js'],
        tasks: ['build', 'amd', 'tests', 'test']
      }
    }
  });

  // Build a new version of the library
  this.registerTask('build', 'Builds a distributable version of the current project', [
                    'eslint',
                    'parser',
                    'node',
                    'globals']);

  this.registerTask('amd', ['babel:amd', 'requirejs']);
  this.registerTask('node', ['babel:cjs']);
  this.registerTask('globals', ['webpack']);
  this.registerTask('tests', ['concat:tests']);

  this.registerTask('release', 'Build final packages', ['eslint', 'amd', 'uglify', 'copy:dist', 'copy:components', 'copy:cdnjs']);

  // Load tasks from npm
  grunt.loadNpmTasks('grunt-contrib-clean');
  grunt.loadNpmTasks('grunt-contrib-concat');
  grunt.loadNpmTasks('grunt-contrib-connect');
  grunt.loadNpmTasks('grunt-contrib-copy');
  grunt.loadNpmTasks('grunt-contrib-requirejs');
  grunt.loadNpmTasks('grunt-contrib-uglify');
  grunt.loadNpmTasks('grunt-contrib-watch');
  grunt.loadNpmTasks('grunt-babel');
  grunt.loadNpmTasks('grunt-eslint');
  grunt.loadNpmTasks('grunt-saucelabs');
  grunt.loadNpmTasks('grunt-webpack');

  grunt.task.loadTasks('tasks');

  grunt.registerTask('bench', ['metrics']);
  grunt.registerTask('sauce', process.env.SAUCE_USERNAME ? ['tests', 'connect', 'saucelabs-mocha'] : []);

  grunt.registerTask('travis', process.env.PUBLISH ? ['default', 'metrics', 'publish:latest'] : ['default']);

  grunt.registerTask('dev', ['clean', 'connect', 'watch']);
  grunt.registerTask('default', ['clean', 'build', 'test', 'release']);
};
<|endoftext|>


<commit_before>/*global module, require*/
/*jslint regexp:true*/
module.exports = function (grunt) {
    "use strict";

    // TODO Project configuration.
    // grunt.initConfig({});

    grunt.loadTasks("tasks");

    // TODO Default task.
    // grunt.registerTask('default', ['build']);
};
<commit_msg>add copyright to Gruntfile.js<commit_after>/*
 * Copyright (c) 2012 Adobe Systems Incorporated. All rights reserved.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 *
 */
 /*global module, require*/
/*jslint regexp:true*/
module.exports = function (grunt) {
    "use strict";

    // TODO Project configuration.
    // grunt.initConfig({});

    grunt.loadTasks("tasks");

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


<commit_before>var PROJECT_NAME = 'Glazier';
var proxy = require('proxy-middleware');
var url= require('url');
var CLOUDFRONT_HOST = "http://d4h95iioxf8ji.cloudfront.net";
var request = require('http').request;

function proxyIndex(req, res, next){
  if (req.url === "/" || req.url === "/index.html") {

    // TODO: don't hardcode configuration
    var opts = {
      pathname: 'index.html',
      hostname: '0.0.0.0',
      port: '3040'
    };

    var proxyReq =  request(opts, function (proxyRes) {
      res.writeHead(proxyRes.statusCode, proxyRes.headers);
      proxyRes.on('error', next);
      proxyRes.pipe(res);
    });

    proxyReq.on('error', next);

    if (!req.readable) {
      proxyReq.end();
    } else {
      req.pipe(proxyReq);
    }

  } else {
    next();
  }
}

function middleware(connect, options) {
  var theUrl;

  theUrl = url.parse('http://localhost:3040/api');
  theUrl.route = '/api';

  return [
    proxy(theUrl),
    proxyIndex,
    connect['static'](options.base),
    connect.directory(options.base)
  ];
}

module.exports = function(grunt) {
  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    env: process.env,
    connect: {
      server: {
        options: {
          port: 8000,
          hostname: 'localhost',
          base: 'tmp/public',
          middleware: middleware
        }
      }
    },

    watch: {

      files: ['app/**', 'cards/**', 'vendor/**', 'test/**'],
      tasks: ['build', 'jshint', 'qunit:all']
    },

    transpile: {
      main: {
        type: "amd",
        moduleName: function(defaultModuleName){
          return 'glazier/' + defaultModuleName;
        },
        files: [{
          expand: true,
          cwd: 'app/',
          src: ['**/*.js'],
          dest: 'tmp/public/glazier'
        }]
      },

      tests: {
        type: "amd",
        files: [{
          expand: true,
          cwd: 'test/',
          src: ['**/*.js', '!fixtures/**'],
          dest: 'tmp/public/test/'
        }]
      }
    },

    copy: {
      main: {
        files: [
          {
            expand: true,
            cwd: 'public/',
            src: ['**'],
            dest: 'tmp/public/'
          }
        ]
      },

      test: {
        files: [
          {
            expand: true,
            cwd: 'test/',
            src: ['index.html'],
            dest: 'tmp/public/test'
        }
      ]},

      fixtures: {
        files: [
          {
            expand: true,
            cwd: 'test/',
            src: ['fixtures/**'],
            dest: 'tmp/public/test'
        }
      ]},

      cards: {
        files: [
          {
            expand: true,
              cwd: 'cards',
            src: ['**'],
            dest: 'tmp/public/cards'
          }
        ]
      },

      vendor: {
        files: [
          {
            expand: true,
              cwd: 'vendor',
            src: ['**'],
            dest: 'tmp/public/vendor'
          }
        ]
      }
    },

    qunit: {
      all:  {
        options: {
          urls: ['http://localhost:8000/test/index.html']
        }
      }
    },

    ember_handlebars: {
      compile: {
        options: {
          processName: function(filename) {
            return filename.replace(/templates\//,'').replace(/\.handlebars$/,'');
          }
        },
        files: {
          "tmp/public/glazier/templates.js": "templates/*.handlebars"
        }
      }
    },

    concat: {
      main: {
        src: ['tmp/public/glazier/**/*.js'],
        dest: 'tmp/public/glazier.js'
      },
      tests: {
        src: ['tmp/public/test/**/*.js'],
        dest: 'tmp/public/test.js'
      }
    },

    shell: {
      ingest: {
        command: [
          "cd glazier-server",
          "bundle exec rake 'glazier:ingest_as_current[../tmp/public/index.html]'"
        ].join(' && '),
        options: {
          stdout: true,
          stderr: true,
          failOnError: true
        }
      }
    },

    s3: {
      options: {
        key: '<%= env.GLAZIER_S3_KEY %>',
        secret: '<%= env.GLAZIER_S3_SECRET %>',
        bucket: 'glazier',
        gzip: true,
        access: 'public-read'
      },
      dev: {
        upload: [
          {
            src: 'tmp/md5/glazier*.js',
            dest: 'assets/'
          },
          {
            src: 'tmp/md5/vendor/**/*-*.js',
            dest: 'assets/vendor/'
          }
        ]
      }
    },

    jshint: {
      all: {
        // TODO: Run jshint on individual files when jshint supports ES6 modules
        src: ['Gruntfile.js', 'tmp/public/glazier.js', 'tmp/public/test.js'],
        options: {
          predef: [
            "Ember",
            "Conductor",
            "$",
            "define",
            "console",
            "require",
            "requireModule",
            "equal",
            "notEqual",
            "notStrictEqual",
            "test",
            "asyncTest",
            "testBoth",
            "testWithDefault",
            "raises",
            "throws",
            "deepEqual",
            "start",
            "stop",
            "ok",
            "strictEqual",
            "module",
            "process",
            "expect"
          ],
          "node" : false,
          "browser" : true,
          "boss" : true,
          "curly": false,
          "debug": false,
          "devel": false,
          "eqeqeq": true,
          "evil": true,
          "forin": false,
          "immed": false,
          "laxbreak": false,
          "newcap": true,
          "noarg": true,
          "noempty": false,
          "nonew": false,
          "nomen": false,
          "onevar": false,
          "plusplus": false,
          "regexp": false,
          "undef": true,
          "sub": true,
          "strict": false,
          "white": false,
          "eqnull": true
        }
      }
    },

    clean: ["tmp"],

    md5: {
      compile: {
        files: [{
          expand: true,
          cwd: 'tmp/public',
          src: ['**/*'],
          dest: 'tmp/md5/',
          filter: 'isFile'
        }],
        options: {
          cmd: 'tmp/public/glazier',
          encoding: null,
          keepBasename: true,
          keepExtension: true,
          after: function (fileChanges, options) {
            var manifest, key, file, from, to;

            manifest = {};

            for (key in fileChanges) {
              file = fileChanges[key];

              from = file.oldPath.replace(/^tmp\/public/,'');
              to = file.newPath.replace(/^tmp\/md5/,'/assets');

              manifest[from] = to;
            }

            grunt.file.write('tmp/manifest.json', JSON.stringify(manifest));
          }
        }
      }
    },

    uglify: {
      all: {
        files: [
          {
            expand: true,
            cwd: 'tmp/public/',
            src: ['glazier.js'],
            ext: '.min.js',
            dest: 'tmp/public/'
          },
          {
            expand: true,
            cwd: 'tmp/public/vendor/',
            src: '**/*.js',
            ext: '.min.js',
            dest: 'tmp/public/vendor/'
          }
        ]
      }
    }
  });

  grunt.registerTask('index.html', 'process index.html', function() {
    var template = grunt.file.read('public/index.html');
    var manifestContents;
    var manifest;

    if (process.env.GLAZIER_ENV === "prod") {
      manifest = grunt.file.readJSON('tmp/manifest.json');
    }

    var indexContents = grunt.template.process(template, {
      data: {
        manifestUrl: function(path) {
          if(process.env.GLAZIER_ENV === "prod") {
            path = path.replace(/\.js$/, '.min.js');
            /* Our MD5 task adds the -MD5 directly before the .js */
            return CLOUDFRONT_HOST + manifest[path]; //.replace(/(-[^-]+)\.js$/, '$1.js');
          } else {
            return path;
          }
        }
      }
    });

    grunt.file.write("tmp/public/index.html", indexContents);
  });

  grunt.registerTask("prod", function(){
    process.env.GLAZIER_ENV = 'prod';
  });

  grunt.registerTask('build', ['clean', 'ember_handlebars', 'transpile', 'copy', 'concat']);

  grunt.registerTask('assets', ['build', 'jshint', 'uglify:all', 'md5', 'index.html']);

  grunt.registerTask('ingest', ['assets', 'shell:ingest']);
  grunt.registerTask('deploy', ['assets', 's3:dev']);

  grunt.registerTask('preview', ['build',  'jshint', 'uglify:all', 'md5', 'index.html', 'shell:ingest', 'connect', 'watch']);
  grunt.registerTask('preview:cdn', ['prod', 'deploy', 'shell:ingest', 'connect', 'watch']);

  grunt.registerTask('test', ['build',  'connect', 'qunit:all']);
  grunt.registerTask('default', ['build', 'index.html', 'connect', 'watch']);

};
<commit_msg>Don't concatenate test fixtures @lukemelia/@stefanpenner<commit_after>var PROJECT_NAME = 'Glazier';
var proxy = require('proxy-middleware');
var url= require('url');
var CLOUDFRONT_HOST = "http://d4h95iioxf8ji.cloudfront.net";
var request = require('http').request;

function proxyIndex(req, res, next){
  if (req.url === "/" || req.url === "/index.html") {

    // TODO: don't hardcode configuration
    var opts = {
      pathname: 'index.html',
      hostname: '0.0.0.0',
      port: '3040'
    };

    var proxyReq =  request(opts, function (proxyRes) {
      res.writeHead(proxyRes.statusCode, proxyRes.headers);
      proxyRes.on('error', next);
      proxyRes.pipe(res);
    });

    proxyReq.on('error', next);

    if (!req.readable) {
      proxyReq.end();
    } else {
      req.pipe(proxyReq);
    }

  } else {
    next();
  }
}

function middleware(connect, options) {
  var theUrl;

  theUrl = url.parse('http://localhost:3040/api');
  theUrl.route = '/api';

  return [
    proxy(theUrl),
    proxyIndex,
    connect['static'](options.base),
    connect.directory(options.base)
  ];
}

module.exports = function(grunt) {
  require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);

  grunt.initConfig({
    pkg: grunt.file.readJSON('package.json'),
    env: process.env,
    connect: {
      server: {
        options: {
          port: 8000,
          hostname: 'localhost',
          base: 'tmp/public',
          middleware: middleware
        }
      }
    },

    watch: {

      files: ['app/**', 'cards/**', 'vendor/**', 'test/**'],
      tasks: ['build', 'jshint', 'qunit:all']
    },

    transpile: {
      main: {
        type: "amd",
        moduleName: function(defaultModuleName){
          return 'glazier/' + defaultModuleName;
        },
        files: [{
          expand: true,
          cwd: 'app/',
          src: ['**/*.js'],
          dest: 'tmp/public/glazier'
        }]
      },

      tests: {
        type: "amd",
        files: [{
          expand: true,
          cwd: 'test/',
          src: ['**/*.js', '!fixtures/**'],
          dest: 'tmp/public/test/'
        }]
      }
    },

    copy: {
      main: {
        files: [
          {
            expand: true,
            cwd: 'public/',
            src: ['**'],
            dest: 'tmp/public/'
          }
        ]
      },

      test: {
        files: [
          {
            expand: true,
            cwd: 'test/',
            src: ['index.html'],
            dest: 'tmp/public/test'
        }
      ]},

      fixtures: {
        files: [
          {
            expand: true,
            cwd: 'test/',
            src: ['fixtures/**'],
            dest: 'tmp/public/test'
        }
      ]},

      cards: {
        files: [
          {
            expand: true,
              cwd: 'cards',
            src: ['**'],
            dest: 'tmp/public/cards'
          }
        ]
      },

      vendor: {
        files: [
          {
            expand: true,
              cwd: 'vendor',
            src: ['**'],
            dest: 'tmp/public/vendor'
          }
        ]
      }
    },

    qunit: {
      all:  {
        options: {
          urls: ['http://localhost:8000/test/index.html']
        }
      }
    },

    ember_handlebars: {
      compile: {
        options: {
          processName: function(filename) {
            return filename.replace(/templates\//,'').replace(/\.handlebars$/,'');
          }
        },
        files: {
          "tmp/public/glazier/templates.js": "templates/*.handlebars"
        }
      }
    },

    concat: {
      main: {
        src: ['tmp/public/glazier/**/*.js'],
        dest: 'tmp/public/glazier.js'
      },
      tests: {
        src: ['tmp/public/test/**/*.js', '!tmp/public/test/fixtures/**'],
        dest: 'tmp/public/test.js'
      }
    },

    shell: {
      ingest: {
        command: [
          "cd glazier-server",
          "bundle exec rake 'glazier:ingest_as_current[../tmp/public/index.html]'"
        ].join(' && '),
        options: {
          stdout: true,
          stderr: true,
          failOnError: true
        }
      }
    },

    s3: {
      options: {
        key: '<%= env.GLAZIER_S3_KEY %>',
        secret: '<%= env.GLAZIER_S3_SECRET %>',
        bucket: 'glazier',
        gzip: true,
        access: 'public-read'
      },
      dev: {
        upload: [
          {
            src: 'tmp/md5/glazier*.js',
            dest: 'assets/'
          },
          {
            src: 'tmp/md5/vendor/**/*-*.js',
            dest: 'assets/vendor/'
          }
        ]
      }
    },

    jshint: {
      all: {
        // TODO: Run jshint on individual files when jshint supports ES6 modules
        src: ['Gruntfile.js', 'tmp/public/glazier.js', 'tmp/public/test.js'],
        options: {
          predef: [
            "Ember",
            "Conductor",
            "$",
            "define",
            "console",
            "require",
            "requireModule",
            "equal",
            "notEqual",
            "notStrictEqual",
            "test",
            "asyncTest",
            "testBoth",
            "testWithDefault",
            "raises",
            "throws",
            "deepEqual",
            "start",
            "stop",
            "ok",
            "strictEqual",
            "module",
            "process",
            "expect"
          ],
          "node" : false,
          "browser" : true,
          "boss" : true,
          "curly": false,
          "debug": false,
          "devel": false,
          "eqeqeq": true,
          "evil": true,
          "forin": false,
          "immed": false,
          "laxbreak": false,
          "newcap": true,
          "noarg": true,
          "noempty": false,
          "nonew": false,
          "nomen": false,
          "onevar": false,
          "plusplus": false,
          "regexp": false,
          "undef": true,
          "sub": true,
          "strict": false,
          "white": false,
          "eqnull": true
        }
      }
    },

    clean: ["tmp"],

    md5: {
      compile: {
        files: [{
          expand: true,
          cwd: 'tmp/public',
          src: ['**/*'],
          dest: 'tmp/md5/',
          filter: 'isFile'
        }],
        options: {
          cmd: 'tmp/public/glazier',
          encoding: null,
          keepBasename: true,
          keepExtension: true,
          after: function (fileChanges, options) {
            var manifest, key, file, from, to;

            manifest = {};

            for (key in fileChanges) {
              file = fileChanges[key];

              from = file.oldPath.replace(/^tmp\/public/,'');
              to = file.newPath.replace(/^tmp\/md5/,'/assets');

              manifest[from] = to;
            }

            grunt.file.write('tmp/manifest.json', JSON.stringify(manifest));
          }
        }
      }
    },

    uglify: {
      all: {
        files: [
          {
            expand: true,
            cwd: 'tmp/public/',
            src: ['glazier.js'],
            ext: '.min.js',
            dest: 'tmp/public/'
          },
          {
            expand: true,
            cwd: 'tmp/public/vendor/',
            src: '**/*.js',
            ext: '.min.js',
            dest: 'tmp/public/vendor/'
          }
        ]
      }
    }
  });

  grunt.registerTask('index.html', 'process index.html', function() {
    var template = grunt.file.read('public/index.html');
    var manifestContents;
    var manifest;

    if (process.env.GLAZIER_ENV === "prod") {
      manifest = grunt.file.readJSON('tmp/manifest.json');
    }

    var indexContents = grunt.template.process(template, {
      data: {
        manifestUrl: function(path) {
          if(process.env.GLAZIER_ENV === "prod") {
            path = path.replace(/\.js$/, '.min.js');
            /* Our MD5 task adds the -MD5 directly before the .js */
            return CLOUDFRONT_HOST + manifest[path]; //.replace(/(-[^-]+)\.js$/, '$1.js');
          } else {
            return path;
          }
        }
      }
    });

    grunt.file.write("tmp/public/index.html", indexContents);
  });

  grunt.registerTask("prod", function(){
    process.env.GLAZIER_ENV = 'prod';
  });

  grunt.registerTask('build', ['clean', 'ember_handlebars', 'transpile', 'copy', 'concat']);

  grunt.registerTask('assets', ['build', 'jshint', 'uglify:all', 'md5', 'index.html']);

  grunt.registerTask('ingest', ['assets', 'shell:ingest']);
  grunt.registerTask('deploy', ['assets', 's3:dev']);

  grunt.registerTask('preview', ['build',  'jshint', 'uglify:all', 'md5', 'index.html', 'shell:ingest', 'connect', 'watch']);
  grunt.registerTask('preview:cdn', ['prod', 'deploy', 'shell:ingest', 'connect', 'watch']);

  grunt.registerTask('test', ['build',  'connect', 'qunit:all']);
  grunt.registerTask('default', ['build', 'index.html', 'connect', 'watch']);

};
<|endoftext|>


<commit_before>'use strict';

module.exports = function (grunt) {
  require('load-grunt-tasks')(grunt);
  grunt.initConfig({
    //********************************
    //Tasks in alphabetical order
    //********************************

    clean: ['.tmp', 'dist'],

    coffee: {
      src: {
        files: [{
          expand: true,
          cwd: 'scripts',
          src: '**/**/*.coffee',
          dest: '.tmp/scripts',
          ext: '.js'
        }]
      },

      spec: {
        files: [{
          expand: true,
          cwd: 'spec',
          src: '**/**/*.coffee',
          dest: '.tmp/spec',
          ext: '.js'
        }]
      }
    },

    copy: {
      namespace: {
        src: 'scripts/namespace.js',
        dest: '.tmp/scripts/namespace.js'
      },
      css: {
        src: '.tmp/styles/dash-spinner.css',
        dest: 'dist/dash-spinner.css'
      },
      scss: {
        src: 'styles/dash-spinner.scss',
        dest: 'dist/dash-spinner.scss'
      }
    },

    jst: {
      compile: {
        options: {
          namespace: 'DashSpinnerJST'
        },
        files: {
          ".tmp/scripts/dash-spinner/templates.js": ["scripts/dash-spinner/**/*.ejs"]
        }
      }
    },

    sass: {
      dist: {
        files: {
          ".tmp/styles/dash-spinner.css": "styles/dash-spinner.scss"
        }
      }
    },

    uglify: {
      options: {
        mangle: true
      },

      dist: {
        files: {
          'dist/dash-spinner.min.js': [
            '.tmp/scripts/namespace.js',
            '.tmp/scripts/dash-spinner/**/*.js'
          ]
        }
      }
    },
  });

  //********************************
  //Builds
  //********************************

  grunt.registerTask('build:dist', [
                     'clean',
                     'jst',
                     'coffee:src',
                     'sass',
                     'copy:namespace',
                     'copy:css',
                     'copy:scss',
                     'uglify'

  ]);

  grunt.registerTask('build:spec', [
                     'clean',
                     'jst',
                     'coffee:src',
                     'coffee:spec'
  ]);

  grunt.registerTask('default', ['build:dist']);
};
<commit_msg>Stop cleaning dist/ when running `testem`<commit_after>'use strict';

module.exports = function (grunt) {
  require('load-grunt-tasks')(grunt);
  grunt.initConfig({
    //********************************
    //Tasks in alphabetical order
    //********************************

    clean: {
      tmp: ['.tmp/*'],
      dist: ['dist/*']
    },

    coffee: {
      src: {
        files: [{
          expand: true,
          cwd: 'scripts',
          src: '**/**/*.coffee',
          dest: '.tmp/scripts',
          ext: '.js'
        }]
      },

      spec: {
        files: [{
          expand: true,
          cwd: 'spec',
          src: '**/**/*.coffee',
          dest: '.tmp/spec',
          ext: '.js'
        }]
      }
    },

    copy: {
      namespace: {
        src: 'scripts/namespace.js',
        dest: '.tmp/scripts/namespace.js'
      },
      css: {
        src: '.tmp/styles/dash-spinner.css',
        dest: 'dist/dash-spinner.css'
      },
      scss: {
        src: 'styles/dash-spinner.scss',
        dest: 'dist/dash-spinner.scss'
      }
    },

    jst: {
      compile: {
        options: {
          namespace: 'DashSpinnerJST'
        },
        files: {
          ".tmp/scripts/dash-spinner/templates.js": ["scripts/dash-spinner/**/*.ejs"]
        }
      }
    },

    sass: {
      dist: {
        files: {
          ".tmp/styles/dash-spinner.css": "styles/dash-spinner.scss"
        }
      }
    },

    uglify: {
      options: {
        mangle: true
      },

      dist: {
        files: {
          'dist/dash-spinner.min.js': [
            '.tmp/scripts/namespace.js',
            '.tmp/scripts/dash-spinner/**/*.js'
          ]
        }
      }
    },
  });

  //********************************
  //Builds
  //********************************

  grunt.registerTask('build:dist', [
                     'clean:tmp',
                     'clean:dist',
                     'jst',
                     'coffee:src',
                     'sass',
                     'copy:namespace',
                     'copy:css',
                     'copy:scss',
                     'uglify'

  ]);

  grunt.registerTask('build:spec', [
                     'clean:tmp',
                     'jst',
                     'coffee:src',
                     'coffee:spec'
  ]);

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