Skip to content

Commit

Permalink
Update svg-sprite to v3.0.0-rc2 and drop Node.js < 18 support
Browse files Browse the repository at this point in the history
Also, switch to 2-space indentation like upstream
  • Loading branch information
XhmikosR committed Jun 26, 2024
1 parent bbedf52 commit 55fc8b7
Show file tree
Hide file tree
Showing 12 changed files with 2,982 additions and 8,908 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
node: [12, 14, 16, 18, 20]
node: [18, 20]
include:
- os: macos-latest
node: 18
Expand Down
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

152 changes: 76 additions & 76 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,89 +9,89 @@
'use strict';

module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
// Before generating any new files, remove any previously-created files.
clean: {
tests: ['tmp']
},
// Project configuration.
grunt.initConfig({
// Before generating any new files, remove any previously-created files.
clean: {
tests: ['tmp']
},

// Configuration to be run (and then tested).
svg_sprite: {
options: {
log: 'info'
// Configuration to be run (and then tested).
svg_sprite: {
options: {
log: 'info'
},
orthogonal: {
src: ['**/*.svg'],
dest: 'tmp',
expand: true,
cwd: 'test/fixtures',
options: {
mode: {
css: {
layout: 'vertical',
sprite: '../svg/vertical.svg',
render: {
css: true,
scss: true,
less: true,
styl: true
},
bust: false
},
orthogonal: {
src: ['**/*.svg'],
dest: 'tmp',
expand: true,
cwd: 'test/fixtures',
options: {
mode: {
css: {
layout: 'vertical',
sprite: '../svg/vertical.svg',
render: {
css: true,
scss: true,
less: true,
styl: true
},
bust: false
},
view: {
layout: 'horizontal',
sprite: '../svg/horizontal.svg',
bust: false
},
defs: {
sprite: '../svg/defs.svg'
},
symbol: {
sprite: '../svg/symbol.svg'
},
stack: {
sprite: '../svg/stack.svg'
}
}
}
view: {
layout: 'horizontal',
sprite: '../svg/horizontal.svg',
bust: false
},
others: {
src: ['**/*.svg'],
dest: 'tmp',
expand: true,
cwd: 'test/fixtures',
options: {
shape: {
dest: 'intermediate'
},
mode: {
css: {
layout: 'diagonal',
sprite: '../svg/diagonal.svg',
bust: false
},
view: {
layout: 'packed',
sprite: '../svg/packed.svg',
bust: false
}
}
}
defs: {
sprite: '../svg/defs.svg'
},
symbol: {
sprite: '../svg/symbol.svg'
},
stack: {
sprite: '../svg/stack.svg'
}
}
}
},
others: {
src: ['**/*.svg'],
dest: 'tmp',
expand: true,
cwd: 'test/fixtures',
options: {
shape: {
dest: 'intermediate'
},
mode: {
css: {
layout: 'diagonal',
sprite: '../svg/diagonal.svg',
bust: false
},
view: {
layout: 'packed',
sprite: '../svg/packed.svg',
bust: false
}
}
}
});
}
}
});

// Actually load this plugin's task(s).
grunt.loadTasks('tasks');
// Actually load this plugin's task(s).
grunt.loadTasks('tasks');

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

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

// By default, lint and run all tests.
grunt.registerTask('default', 'test');
// By default, lint and run all tests.
grunt.registerTask('default', 'test');
};
Loading

0 comments on commit 55fc8b7

Please sign in to comment.