UNPKG

@haxtheweb/haxcms-nodejs

Version:

HAXcms single and multisite nodejs server, api, and administration

11 lines 1.05 kB
/* * @license * Copyright (c) 2014 The Polymer Project Authors. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt The complete set of authors may be found * at http://polymer.github.io/AUTHORS.txt The complete set of contributors may * be found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by * Google as part of the polymer project is also subject to an additional IP * rights grant found at http://polymer.github.io/PATENTS.txt */ var r=require("fs"),e=require("cheerio"),n=require("path"),a={xmlMode:!0};process.argv.slice(2).forEach((function(i){var o=function path2IconName(r){return parts=n.basename(r).split("_"),parts.shift(),parts.pop(),parts.join("-")}(i),t=function read(n){var i=r.readFileSync(n,"utf8");return e.load(i,a)}(i);!function transmogrify(r,e){var n=r("svg");n.find("[fill=none]").remove(),n.find("[fill]").each((function(e,n){r(n).attr("fill",null)}));var a='<g id="'+e+'">'+r.xml(n.children())+"</g>";console.log(a)}(t,o)}));