Skip to content

Commit 35b5d4a

Browse files
committed
Update svg-sprite to v3.0.0-rc2 and drop Node.js < 18 support
Also, switch to 2-space indentation like upstream
1 parent bbedf52 commit 35b5d4a

File tree

12 files changed

+2952
-8874
lines changed

12 files changed

+2952
-8874
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ root = true
55
[*]
66
charset = utf-8
77
end_of_line = lf
8-
indent_size = 4
8+
indent_size = 2
99
indent_style = space
1010
insert_final_newline = true
1111
trim_trailing_whitespace = true

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fail-fast: false
2525
matrix:
2626
os: [ubuntu-latest]
27-
node: [12, 14, 16, 18, 20]
27+
node: [18, 20]
2828
include:
2929
- os: macos-latest
3030
node: 18

.npmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

Gruntfile.js

Lines changed: 76 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -9,89 +9,89 @@
99
'use strict';
1010

1111
module.exports = function(grunt) {
12-
// Project configuration.
13-
grunt.initConfig({
14-
// Before generating any new files, remove any previously-created files.
15-
clean: {
16-
tests: ['tmp']
17-
},
12+
// Project configuration.
13+
grunt.initConfig({
14+
// Before generating any new files, remove any previously-created files.
15+
clean: {
16+
tests: ['tmp']
17+
},
1818

19-
// Configuration to be run (and then tested).
20-
svg_sprite: {
21-
options: {
22-
log: 'info'
19+
// Configuration to be run (and then tested).
20+
svg_sprite: {
21+
options: {
22+
log: 'info'
23+
},
24+
orthogonal: {
25+
src: ['**/*.svg'],
26+
dest: 'tmp',
27+
expand: true,
28+
cwd: 'test/fixtures',
29+
options: {
30+
mode: {
31+
css: {
32+
layout: 'vertical',
33+
sprite: '../svg/vertical.svg',
34+
render: {
35+
css: true,
36+
scss: true,
37+
less: true,
38+
styl: true
39+
},
40+
bust: false
2341
},
24-
orthogonal: {
25-
src: ['**/*.svg'],
26-
dest: 'tmp',
27-
expand: true,
28-
cwd: 'test/fixtures',
29-
options: {
30-
mode: {
31-
css: {
32-
layout: 'vertical',
33-
sprite: '../svg/vertical.svg',
34-
render: {
35-
css: true,
36-
scss: true,
37-
less: true,
38-
styl: true
39-
},
40-
bust: false
41-
},
42-
view: {
43-
layout: 'horizontal',
44-
sprite: '../svg/horizontal.svg',
45-
bust: false
46-
},
47-
defs: {
48-
sprite: '../svg/defs.svg'
49-
},
50-
symbol: {
51-
sprite: '../svg/symbol.svg'
52-
},
53-
stack: {
54-
sprite: '../svg/stack.svg'
55-
}
56-
}
57-
}
42+
view: {
43+
layout: 'horizontal',
44+
sprite: '../svg/horizontal.svg',
45+
bust: false
5846
},
59-
others: {
60-
src: ['**/*.svg'],
61-
dest: 'tmp',
62-
expand: true,
63-
cwd: 'test/fixtures',
64-
options: {
65-
shape: {
66-
dest: 'intermediate'
67-
},
68-
mode: {
69-
css: {
70-
layout: 'diagonal',
71-
sprite: '../svg/diagonal.svg',
72-
bust: false
73-
},
74-
view: {
75-
layout: 'packed',
76-
sprite: '../svg/packed.svg',
77-
bust: false
78-
}
79-
}
80-
}
47+
defs: {
48+
sprite: '../svg/defs.svg'
49+
},
50+
symbol: {
51+
sprite: '../svg/symbol.svg'
52+
},
53+
stack: {
54+
sprite: '../svg/stack.svg'
55+
}
56+
}
57+
}
58+
},
59+
others: {
60+
src: ['**/*.svg'],
61+
dest: 'tmp',
62+
expand: true,
63+
cwd: 'test/fixtures',
64+
options: {
65+
shape: {
66+
dest: 'intermediate'
67+
},
68+
mode: {
69+
css: {
70+
layout: 'diagonal',
71+
sprite: '../svg/diagonal.svg',
72+
bust: false
73+
},
74+
view: {
75+
layout: 'packed',
76+
sprite: '../svg/packed.svg',
77+
bust: false
8178
}
79+
}
8280
}
83-
});
81+
}
82+
}
83+
});
8484

85-
// Actually load this plugin's task(s).
86-
grunt.loadTasks('tasks');
85+
// Actually load this plugin's task(s).
86+
grunt.loadTasks('tasks');
8787

88-
// These plugins provide necessary tasks.
89-
grunt.loadNpmTasks('grunt-contrib-clean');
88+
// These plugins provide necessary tasks.
89+
grunt.loadNpmTasks('grunt-contrib-clean');
9090

91-
// Whenever the "test" task is run, first clean the "tmp" dir,
92-
// then run this plugin's tasks.
93-
grunt.registerTask('test', ['clean', 'svg_sprite']);
91+
// Whenever the "test" task is run, first clean the "tmp" dir,
92+
// then run this plugin's tasks.
93+
grunt.registerTask('test', ['clean', 'svg_sprite']);
9494

95-
// By default, lint and run all tests.
96-
grunt.registerTask('default', 'test');
95+
// By default, lint and run all tests.
96+
grunt.registerTask('default', 'test');
9797
};

0 commit comments

Comments
 (0)