Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit 7cbdd87

Browse files
committed
remove self-closing in link tags
fix linebreaks in README.md
1 parent 83f6821 commit 7cbdd87

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,28 +136,28 @@ useminPrepare: {
136136

137137
### dest
138138

139-
Type: 'string' <br/>
139+
Type: 'string'
140140
Default: `nil`
141141

142142
Base directory where the transformed files should be output.
143143

144144
### staging
145145

146-
Type: 'string' <br/>
146+
Type: 'string'
147147
Default: `.tmp`
148148

149149
Base directory where the temporary files should be output (e.g. concatenated files).
150150

151151
### root
152152

153-
Type: 'string' or 'Array' <br/>
154-
Default: `nil` <br/>
153+
Type: 'string' or 'Array'
154+
Default: `nil`
155155

156156
The root directory from which your files will be resolved.
157157

158158
### flow
159159

160-
Type: 'object' <br/>
160+
Type: 'object'
161161
Default: `{ steps: { js: ['concat', 'uglifyjs'], css: ['concat', 'cssmin'] }, post: {} }`
162162

163163
This allow you to configure the workflow, either on a per-target basis, or for all the targets.
@@ -327,7 +327,7 @@ By default `usemin` will look under `dist/html` for revved versions of `styles/m
327327

328328
#### assetsDirs
329329

330-
Type: 'Array' <br/>
330+
Type: 'Array'
331331
Default: Single item array set to the value of the directory where the currently looked at file is.
332332

333333
List of directories where we should start to look for revved version of the assets referenced in the currently looked at file.
@@ -344,7 +344,7 @@ usemin: {
344344

345345
#### patterns
346346

347-
Type: 'Object' <br/>
347+
Type: 'Object'
348348
Default: Empty
349349

350350
Allows for user defined pattern to replace reference to files. For example, let's suppose that you want to replace
@@ -377,7 +377,7 @@ So in short:
377377

378378
#### blockReplacements
379379

380-
Type: 'Object' <br/>
380+
Type: 'Object'
381381
Default: `{ css: function (block) { ... }, js: function (block) { ... } }`
382382

383383
This lets you define how blocks get their content replaced. Useful to have block types other that `css` and `js`.
@@ -395,7 +395,7 @@ usemin: {
395395
options: {
396396
blockReplacements: {
397397
less: function (block) {
398-
return '<link rel="stylesheet" href="' + block.dest + '" />';
398+
return '<link rel="stylesheet" href="' + block.dest + '">';
399399
}
400400
}
401401
}
@@ -404,7 +404,7 @@ usemin: {
404404

405405
#### revmap
406406

407-
Type: 'String' <br/>
407+
Type: 'String'
408408
Default: Empty
409409

410410
Indicate the location of a map file, as produced by `grunt-filerev` for example. This map file is a simple JSON file, holding an object

lib/fileprocessor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ var _defaultPatterns = {
7474
var defaultBlockReplacements = {
7575
css: function (block) {
7676
var media = block.media ? ' media="' + block.media + '"' : '';
77-
return '<link rel="stylesheet" href="' + block.dest + '"' + media + '/>';
77+
return '<link rel="stylesheet" href="' + block.dest + '"' + media + '>';
7878
},
7979
js: function (block) {
8080
var defer = block.defer ? 'defer ' : '';

test/test-fileprocessor.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ describe('FileProcessor', function () {
6666
};
6767

6868
var result = fp.replaceWith(block);
69-
assert.equal(result, ' <link rel="stylesheet" href="foo.css"/>');
69+
assert.equal(result, ' <link rel="stylesheet" href="foo.css">');
7070
});
7171

7272
it('should remove css blocks which have no stylesheets linked in them', function () {
@@ -165,7 +165,7 @@ describe('FileProcessor', function () {
165165
};
166166

167167
var result = fp.replaceWith(block);
168-
assert.equal(result, ' <link rel="stylesheet" href="foo.css" media="(min-width:980px)"/>');
168+
assert.equal(result, ' <link rel="stylesheet" href="foo.css" media="(min-width:980px)">');
169169
});
170170

171171
it('should preserve IE conditionals for js blocks', function () {
@@ -195,7 +195,7 @@ describe('FileProcessor', function () {
195195
};
196196

197197
var result = fp.replaceWith(block);
198-
assert.equal(result, ' <!--[if (lt IE 9) & (!IEmobile)]>\n <link rel="stylesheet" href="foo.css"/>\n <![endif]-->');
198+
assert.equal(result, ' <!--[if (lt IE 9) & (!IEmobile)]>\n <link rel="stylesheet" href="foo.css">\n <![endif]-->');
199199
});
200200
});
201201

test/test-usemin.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ describe('usemin', function () {
147147
var changed = grunt.file.read('build/foo/index.html');
148148

149149
assert.ok(changed.match(/<img src="\.\.\/images\/test\.23012\.png"\>/));
150-
assert.ok(changed.match(/<link rel=\"stylesheet\" href=\"styles\/main\.min\.css\"\/>/));
150+
assert.ok(changed.match(/<link rel=\"stylesheet\" href=\"styles\/main\.min\.css\">/));
151151
assert.ok(changed.match(/<img src=\"\.\.\/images\/misc\/test\.2a436\.png\">/));
152152

153153
});
@@ -339,7 +339,7 @@ describe('usemin', function () {
339339
options: {
340340
blockReplacements: {
341341
less: function (block) {
342-
return '<link rel="stylesheet" href="' + block.dest + '" />';
342+
return '<link rel="stylesheet" href="' + block.dest + '">';
343343
}
344344
}
345345
}
@@ -350,7 +350,7 @@ describe('usemin', function () {
350350

351351
var changed = grunt.file.read('index.html');
352352
// Check replace has performed its duty
353-
assert.equal(changed, '<link rel="stylesheet" href="styles/main.css" />');
353+
assert.equal(changed, '<link rel="stylesheet" href="styles/main.css">');
354354
});
355355
});
356356

0 commit comments

Comments
 (0)