Permalink
Browse files

Fix CRLF and add gitattributes text=auto

  • Loading branch information...
1 parent ad54849 commit 2cff4cacc9d38823bcbc1c9e3d38f6f06b0bc1d2 @shama shama committed Nov 30, 2013
Showing with 235 additions and 235 deletions.
  1. +1 −0 .gitattributes
  2. +82 −82 Gruntfile.js
  3. +21 −21 LICENSE-MIT
  4. +46 −46 package.json
  5. +40 −40 tasks/requirejs.js
  6. +45 −46 test/requirejs_test.js
View
@@ -0,0 +1 @@
+* text=auto
View
@@ -1,82 +1,82 @@
-/*
- * grunt-contrib-requirejs
- * http://gruntjs.com/
- *
- * Copyright (c) 2012 Tyler Kellen, contributors
- * Licensed under the MIT license.
- */
-
-'use strict';
-
-module.exports = function(grunt) {
-
- // Project configuration.
- grunt.initConfig({
- jshint: {
- all: [
- 'Gruntfile.js',
- 'tasks/*.js',
- '<%= nodeunit.tests %>'
- ],
- options: {
- jshintrc: '.jshintrc'
- }
- },
-
- // Before generating any new files, remove any previously-created files.
- clean: {
- test: ['tmp']
- },
-
- // Configuration to be run (and then tested).
- requirejs: {
- compile: {
- options: {
- baseUrl: 'test/fixtures',
- name: 'project',
- out: 'tmp/requirejs.js'
- }
- },
- template: {
- options: {
- baseUrl: 'test/fixtures',
- name: 'project',
- out: 'tmp/requirejs-template.js'
- }
- },
- onOptimize: {
- options: {
- baseUrl: 'test/fixtures',
- name: 'project',
- out: 'tmp/requirejs-onoptimize.js',
- done: function(done, build) {
- grunt.file.write('tmp/done-build.txt', build);
- done();
- }
- }
- }
- },
-
- // Unit tests.
- nodeunit: {
- tests: ['test/*_test.js']
- }
- });
-
- // Actually load this plugin's task(s).
- grunt.loadTasks('tasks');
-
- // These plugins provide necessary tasks.
- grunt.loadNpmTasks('grunt-contrib-clean');
- grunt.loadNpmTasks('grunt-contrib-jshint');
- grunt.loadNpmTasks('grunt-contrib-nodeunit');
- grunt.loadNpmTasks('grunt-contrib-internal');
-
- // Whenever the "test" task is run, first clean the "tmp" dir, then run this
- // plugin's task(s), then test the result.
- grunt.registerTask('test', ['clean', 'requirejs', 'nodeunit']);
-
- // By default, lint and run all tests.
- grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
-
-};
+/*
+ * grunt-contrib-requirejs
+ * http://gruntjs.com/
+ *
+ * Copyright (c) 2012 Tyler Kellen, contributors
+ * Licensed under the MIT license.
+ */
+
+'use strict';
+
+module.exports = function(grunt) {
+
+ // Project configuration.
+ grunt.initConfig({
+ jshint: {
+ all: [
+ 'Gruntfile.js',
+ 'tasks/*.js',
+ '<%= nodeunit.tests %>'
+ ],
+ options: {
+ jshintrc: '.jshintrc'
+ }
+ },
+
+ // Before generating any new files, remove any previously-created files.
+ clean: {
+ test: ['tmp']
+ },
+
+ // Configuration to be run (and then tested).
+ requirejs: {
+ compile: {
+ options: {
+ baseUrl: 'test/fixtures',
+ name: 'project',
+ out: 'tmp/requirejs.js'
+ }
+ },
+ template: {
+ options: {
+ baseUrl: 'test/fixtures',
+ name: 'project',
+ out: 'tmp/requirejs-template.js'
+ }
+ },
+ onOptimize: {
+ options: {
+ baseUrl: 'test/fixtures',
+ name: 'project',
+ out: 'tmp/requirejs-onoptimize.js',
+ done: function(done, build) {
+ grunt.file.write('tmp/done-build.txt', build);
+ done();
+ }
+ }
+ }
+ },
+
+ // Unit tests.
+ nodeunit: {
+ tests: ['test/*_test.js']
+ }
+ });
+
+ // Actually load this plugin's task(s).
+ grunt.loadTasks('tasks');
+
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-nodeunit');
+ grunt.loadNpmTasks('grunt-contrib-internal');
+
+ // Whenever the "test" task is run, first clean the "tmp" dir, then run this
+ // plugin's task(s), then test the result.
+ grunt.registerTask('test', ['clean', 'requirejs', 'nodeunit']);
+
+ // By default, lint and run all tests.
+ grunt.registerTask('default', ['jshint', 'test', 'build-contrib']);
+
+};
View
@@ -1,22 +1,22 @@
-Copyright (c) 2012 Tyler Kellen, contributors
-
-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
+Copyright (c) 2012 Tyler Kellen, contributors
+
+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.
View
@@ -1,46 +1,46 @@
-{
- "name": "grunt-contrib-requirejs",
- "description": "Optimize RequireJS projects using r.js.",
- "version": "0.4.1",
- "homepage": "https://github.com/gruntjs/grunt-contrib-requirejs",
- "author": {
- "name": "Grunt Team",
- "url": "http://gruntjs.com/"
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/gruntjs/grunt-contrib-requirejs.git"
- },
- "bugs": {
- "url": "https://github.com/gruntjs/grunt-contrib-requirejs/issues"
- },
- "licenses": [
- {
- "type": "MIT",
- "url": "https://github.com/gruntjs/grunt-contrib-requirejs/blob/master/LICENSE-MIT"
- }
- ],
- "main": "Gruntfile.js",
- "engines": {
- "node": ">= 0.8.0"
- },
- "scripts": {
- "test": "grunt test"
- },
- "dependencies": {
- "requirejs": "~2.1.0"
- },
- "devDependencies": {
- "grunt-contrib-jshint": "~0.2.0",
- "grunt-contrib-nodeunit": "~0.1.2",
- "grunt-contrib-clean": "~0.4.0",
- "grunt-contrib-internal": "~0.4.2",
- "grunt": "~0.4.0"
- },
- "peerDependencies": {
- "grunt": "~0.4.0"
- },
- "keywords": [
- "gruntplugin"
- ]
-}
+{
+ "name": "grunt-contrib-requirejs",
+ "description": "Optimize RequireJS projects using r.js.",
+ "version": "0.4.1",
+ "homepage": "https://github.com/gruntjs/grunt-contrib-requirejs",
+ "author": {
+ "name": "Grunt Team",
+ "url": "http://gruntjs.com/"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git://github.com/gruntjs/grunt-contrib-requirejs.git"
+ },
+ "bugs": {
+ "url": "https://github.com/gruntjs/grunt-contrib-requirejs/issues"
+ },
+ "licenses": [
+ {
+ "type": "MIT",
+ "url": "https://github.com/gruntjs/grunt-contrib-requirejs/blob/master/LICENSE-MIT"
+ }
+ ],
+ "main": "Gruntfile.js",
+ "engines": {
+ "node": ">= 0.8.0"
+ },
+ "scripts": {
+ "test": "grunt test"
+ },
+ "dependencies": {
+ "requirejs": "~2.1.0"
+ },
+ "devDependencies": {
+ "grunt-contrib-jshint": "~0.2.0",
+ "grunt-contrib-nodeunit": "~0.1.2",
+ "grunt-contrib-clean": "~0.4.0",
+ "grunt-contrib-internal": "~0.4.2",
+ "grunt": "~0.4.0"
+ },
+ "peerDependencies": {
+ "grunt": "~0.4.0"
+ },
+ "keywords": [
+ "gruntplugin"
+ ]
+}
View
@@ -1,40 +1,40 @@
-/*
- * grunt-contrib-requirejs
- * http://gruntjs.com/
- *
- * Copyright (c) 2012 Tyler Kellen, contributors
- * Licensed under the MIT license.
- */
-
-module.exports = function(grunt) {
- 'use strict';
-
- var requirejs = require('requirejs');
-
- // TODO: extend this to send build log to grunt.log.ok / grunt.log.error
- // by overriding the r.js logger (or submit issue to r.js to expand logging support)
- requirejs.define('node/print', [], function() {
- return function print(msg) {
- if (msg.substring(0, 5) === 'Error') {
- grunt.log.errorlns(msg);
- grunt.fail.warn('RequireJS failed.');
- } else {
- grunt.log.oklns(msg);
- }
- };
- });
-
- grunt.registerMultiTask('requirejs', 'Build a RequireJS project.', function() {
-
- var done = this.async();
- var options = this.options({
- logLevel: 0,
- done: function(done, response){
- done();
- }
- });
- grunt.verbose.writeflags(options, 'Options');
-
- requirejs.optimize(options, options.done.bind(null, done));
- });
-};
+/*
+ * grunt-contrib-requirejs
+ * http://gruntjs.com/
+ *
+ * Copyright (c) 2012 Tyler Kellen, contributors
+ * Licensed under the MIT license.
+ */
+
+module.exports = function(grunt) {
+ 'use strict';
+
+ var requirejs = require('requirejs');
+
+ // TODO: extend this to send build log to grunt.log.ok / grunt.log.error
+ // by overriding the r.js logger (or submit issue to r.js to expand logging support)
+ requirejs.define('node/print', [], function() {
+ return function print(msg) {
+ if (msg.substring(0, 5) === 'Error') {
+ grunt.log.errorlns(msg);
+ grunt.fail.warn('RequireJS failed.');
+ } else {
+ grunt.log.oklns(msg);
+ }
+ };
+ });
+
+ grunt.registerMultiTask('requirejs', 'Build a RequireJS project.', function() {
+
+ var done = this.async();
+ var options = this.options({
+ logLevel: 0,
+ done: function(done, response){
+ done();
+ }
+ });
+ grunt.verbose.writeflags(options, 'Options');
+
+ requirejs.optimize(options, options.done.bind(null, done));
+ });
+};
Oops, something went wrong.

0 comments on commit 2cff4ca

Please sign in to comment.