<commit_before>'use strict';

var path = require('path');
var async = require('async');
var rimraf = require('rimraf');
var chalk = require('chalk');
var SVGO = require('svgo');
var svgo = new SVGO();

module.exports = function(grunt) {

    grunt.registerMultiTask('svg-react-component', 'Create inline SVG React components from svg files', function() {
        var options = this.options({
            ext: '.jsx',
            clean: false,
            svgo: false
        });

        var TEMPLATE = {
            SVG: '{SVG}',
            CLASSNAME: '{CLASSNAME}'
        };

        var COMPONENT = [
            '/**',
            ' * Generated by react-svg-component',
            ' */',
            '',
            '\'use strict\'',
            '',
            'import React from \'react\';',
            '',
            'class ' + TEMPLATE.CLASSNAME + ' extends React.Component {',
            '    constructor(props) {',
            '        super(props);',
            '    }',
            '',
            '    render() {',
            '        return (',
            '            ' + TEMPLATE.SVG,
            '        );',
            '    }',
            '}',
            '',
            'export default ' + TEMPLATE.CLASSNAME + ';'<commit_msg>Update banner to mention real component name<commit_after>'use strict';

var path = require('path');
var async = require('async');
var rimraf = require('rimraf');
var chalk = require('chalk');
var SVGO = require('svgo');
var svgo = new SVGO();

module.exports = function(grunt) {

    grunt.registerMultiTask('svg-react-component', 'Create inline SVG React components from svg files', function() {
        var options = this.options({
            ext: '.jsx',
            clean: false,
            svgo: false
        });

        var TEMPLATE = {
            SVG: '{SVG}',
            CLASSNAME: '{CLASSNAME}'
        };

        var COMPONENT = [
            '/**',
            ' * Generated by grunt-svg-react-component',
            ' * https://github.com/okcoker/grunt-svg-react-component',
            ' */',
            '',
            '\'use strict\'',
            '',
            'import React from \'react\';',
            '',
            'class ' + TEMPLATE.CLASSNAME + ' extends React.Component {',
            '    constructor(props) {',
            '        super(props);',
            '    }',
            '',
            '    render() {',
            '        return (',
            '            ' + TEMPLATE.SVG,
            '        );',
            '    }',
            '}',
            '',
            'export default ' + TEMPLATE.CLASSNAME + ';'
{'fraction_non_alphanumeric': 0.15701219512195122, 'fraction_numerical': 0.0, 'mean_word_length': 1.3416592328278323, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3075394', 'n_tokens_mistral': 734, 'n_tokens_neox': 722, 'n_words': 149}