From 4dc2bce59d8a93dd6d114d100eeace6496cb580c Mon Sep 17 00:00:00 2001 From: Kieran Sedgwick Date: Tue, 20 Jan 2015 14:56:48 -0500 Subject: [PATCH] Update gruntfile to match documentation --- CONTRIBUTING.md | 6 +++--- gruntfile.js | 19 ++++++------------- 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 76ff844..840dc67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -145,7 +145,7 @@ Individual targets are shown *in italics*: * Used to lint the source files. -#### `build-tests` ([LINK HERE]()) +#### `build-tests` ([#3-grunt-build-tests](#3-grunt-build-tests)) * Generates single-file versions of the test suite and a separate Filer distribution file for testing Filer's compatibility with the [requirejs module system](http://requirejs.og/). @@ -163,7 +163,7 @@ Individual targets are shown *in italics*: * Causes `grunt publish` to fail out early if the user is not on the `develop` branch -#### `release` ([LINK HERE]()) +#### `release` ([#2-grunt-release](#2-grunt-release)) * Runs the `grunt test`, and `grunt develop` tasks in one command, preventing new distribution files from being generated if tests fail. @@ -175,7 +175,7 @@ Individual targets are shown *in italics*: 3. Tags the repo at this new version 4. Pushes the tag and the release commit upstream -#### `build-tests` ([LINK HERE]()) +#### `build-tests` ([#3-grunt-build-tests](#3-grunt-build-tests)) * Generates single-file versions of the test suite and a separate Filer distribution file for testing Filer's compatibility with the [requirejs module system](http://requirejs.og/). diff --git a/gruntfile.js b/gruntfile.js index e9c5d65..24c12de 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -10,7 +10,6 @@ var PROMPT_CONFIRM_CONFIG = 'confirmation', GIT_FULL_REMOTE = env.get('FILER_UPSTREAM_URI') + ' ' + GIT_BRANCH; module.exports = function(grunt) { - // Project configuration. grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), @@ -213,16 +212,10 @@ module.exports = function(grunt) { }, connect: { - serverForNode: { - options: { - port: 1234, - base: '.' - } - }, serverForBrowser: { options: { port: 1234, - base: '.', + base: './', keepalive: true } } @@ -253,9 +246,9 @@ module.exports = function(grunt) { grunt.loadNpmTasks('grunt-browserify'); grunt.loadNpmTasks('grunt-banner'); - grunt.registerTask('develop', ['clean', 'browserify:filerDist', 'browserify:filerIssue225']); - grunt.registerTask('build-tests', ['clean', 'browserify:filerTest', 'browserify:filerPerf']); - grunt.registerTask('release', ['test', 'develop', 'uglify']); + grunt.registerTask('develop', ['browserify:filerDist', 'uglify']); + grunt.registerTask('build-tests', ['clean', 'browserify:filerTest', 'browserify:filerPerf', 'browserify:filerIssue225']); + grunt.registerTask('release', ['test', 'develop']); grunt.registerTask('publish', 'Publish filer as a new version to NPM, bower and github.', function(patchLevel) { var allLevels = ['patch', 'minor', 'major']; @@ -304,9 +297,9 @@ module.exports = function(grunt) { 'npm-publish' ]); }); - grunt.registerTask('test-node', ['jshint', 'browserify:filerIssue225', 'connect:serverForNode', 'shell:mocha']); + grunt.registerTask('test-node', ['jshint', 'browserify:filerIssue225', 'shell:mocha']); grunt.registerTask('test-browser', ['jshint', 'build-tests', 'connect:serverForBrowser']); - grunt.registerTask('test', ['clean', 'test-node']); + grunt.registerTask('test', ['test-node']); grunt.registerTask('default', ['test']); };