This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { transform } from '@svgr/core' | |
import fs from 'fs' | |
import template from "./template" | |
const ICON_DEFAULT_COLOR = 'black' | |
const fileName = "svgs/myIcon.svg" | |
const svgData = fs.readFileSync(fileName) | |
const componentData = transform.sync( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Incredibly simple Node.js and Express application server for serving static assets. | |
DON'T USE THIS IN PRODUCTION! | |
It is meant for learning purposes only. This server is not optimized for performance, | |
and is missing key features such as error pages, compression, and caching. | |
For production, I recommend using an application framework that supports server-side rendering, | |
such as Next.js. https://nextjs.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc 'Run Rubocop on uncommitted changed files' | |
task :git_rubocop do | |
RUBY_FILENAME_PATTERNS = %w(Gemfile Rakefile .rb .rake) | |
def ruby_file?(filename) | |
RUBY_FILENAME_PATTERNS.each do |pattern| | |
return true if filename.include? pattern | |
end | |
false | |
end |