Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, 22]
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
Loading