-
Paper and CodePen (CDN)
I'm trying to see the results of this code in CodePen with Paper.js using the following CDN(https://cdn.jsdelivr.net/paperjs/0.10.2/paper-full.min.js) but I see nothing within CodePen ? var path = new Path(); path.strokeColor = '#567e37'; path.strokeWidth = 5; var firstPoint = new Point(0, 550); path.add(firstPoint); var throughPoint = new Point(75, 400); var toPoint = new Point(100, 250); path.arcTo(throughPoint, toPoint);
-
svgo minor problem
Look as if I'm going to have to manually edit the SVG file None of these processors can do what manually I can do.
-
svgo minor problem
Anyone familiar as to what options might be able to drastically reduce the XML data with SVGO because that is my biggest concern as there is too much XML data.
-
svgo minor problem
Processing the folder worked. If I should have multiple SVG and I want to do specific settings for individual SVG I suppose at this point I can't.
-
svgo minor problem
No change when not appending a number to the original file name; the file size remains the same and so it appears the contexts of the file as well. Removing the flags causes a Unknown Argument for: convertShapeToPath and removing convertShapeToPath causes an unknown argument; for the file name in the path which is as you know C:\1
-
svgo minor problem
I got SVGO which as you all probably know is a Node.js module working I ran the following command but svgo didn't generate a second version of the original file but the process was complete ? svgo -i INPUT C:\1\woolpartmorph.svg convertShapeToPath -o C:\1\woolpartmorph2.svg
-
How - Grunt Task
rbrsmith - You add a class to all <path> tags, you can't tell me that, that is not possible, maybe you will !
-
How - Grunt Task
The site mentioned in post #11 the person wants identical to that what I want to do, and it appears possible. rbrsmith, based on what you are telling me and I understand that the computer needs a consistent path to follow to make it work but the site I mentioned in post #11 appears to have solved that problem ? Regardless if we understand each other, there must be a method to which I can parse a SVG file and for each <path> tag add a class name ?
-
How - Grunt Task
SVG files have <path> tags that is where you can insert class names. It sounds as if you're saying it can't be done, but it can be done in your paragraph following ?
-
How - Grunt Task
First off, before I dive into any other question asked, is; shouldn't the command grunt in the node command prompt not cause an error ? I want to feed a SVG file and have all paths in the SVG file be given custom class names automatically, eliminating the need for me to do it manually; that is where I hope my assumption was correct where grunt come in to help ?
-
How - Grunt Task
This is a supposedly a complete grunt task as mentioned here and so this is wrong ?
-
How - Grunt Task
Here is the code ? replace: { // ID cleanup: performs a manual ID cleanup as Illustrator exports a mess illustrator: { src: ['assets/svg/optimised/*.svg'], overwrite: true, replacements: [{ // Remove escaped underscore character from: '_x5F_', to: '_' }, { // Replace class names with proper classes //class_x3D__x22_tank-option_x22__2_ from: /id\=\"class_x3D__x22_(.+?)_x22_(.*?)\"/gi, to: function(matchedWord, index, fullText, regexMatches) { return 'class="'+ regexMatches[0].toLowerCase()+'"'; } }, { // Lowercase all ids from: /id\=\"(.+?)\"/gi, to: function(matchedWord, index, fullText, regexMatches) { return 'id="'+ regexMatches[0].toLowerCase()+'"'; } }, { // Lowercase all id references to match the previous replace rule from: /url\(\#(.+?)\)/gi, to: function(matchedWord, index, fullText, regexMatches) { return 'url(#'+ regexMatches[0].toLowerCase() +')'; } }, { // Lowercase all id href to match the previous replace rule from: /href\=\"\#(.+?)\"/gi, to: function(matchedWord, index, fullText, regexMatches) { return 'href="#'+ regexMatches[0].toLowerCase() +'"'; } }, { // Remove all font references as we will use CSS for this from: /font\-family\=\"(.+?)\"/gi, to: function(matchedWord, index, fullText, regexMatches) { return ''; } }] } }
-
How - Grunt Task
jak - Before I proceed any further, placing the grunt task in a file called gruntfile.js, is correct ? I have the task command to trigger the task, as well, why am I getting this error when running the command; grunt ?
-
How - Grunt Task
That is the error I get; how do I create a default task ?
-
How - Grunt Task
I managed, to get Grunt Installed. I have a gruntfile.js, within the gruntfile.js I have a grunt file task, how do I run a grunt task within obviously node command prompt ?