-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use style-guide to import fonts and favicons #1582
Conversation
0999be4
to
29539b3
Compare
spec/svg_spec.rb
Outdated
@@ -1,7 +1,7 @@ | |||
require 'rails_helper' | |||
|
|||
RSpec.describe 'SVG files' do | |||
Dir[Rails.root.join('**', '*.svg')].each do |svg_path| | |||
Dir[Rails.root.join('**', '*.svg')].reject { |f| f['node_modules'] }.each do |svg_path| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this rejecting files that contain node_modules
in the path? I would be more explicit than using the indexing syntax"
.reject { |f| f.include?('node_modules') }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, there are some offenders in the identity-style-guide
npm package so this is a temporary measure to exclude those for now. None of the images are being used within the app at this point. I will update to the syntax you provided... I wasn't sure the best way to handle excluding just that one folder.
29539b3
to
42277bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
448966c
to
03ddda5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the vulnerabilities reported by Snyk? What are we doing about them? Seems like there isn't a fix for the shelljs
vulnerability right now. Can we use something else?
Yeah I'm not sure what to do about this - there are a number of dependencies that don't seem to currently have a fix. All of these dependencies are brought in because the None of these dependencies are actually used within the identity-idp app, I'm just copying asset files out of the package folder into the app. Since they are not being used is it safe to ignore them, or does their presence in the |
Hmm. Sounds like the |
I think that's probably the best solution. If the style guide is meant to be used outside of Federalist, and if fractal is specific to Federalist, then I would remove fractal as a dependency, and instruct people who want to use it with Federalist to add fractal to their package.json. What do you think? |
6345d62
to
39cb25d
Compare
@monfresh I modified the node package to only include the assets and not install any of the dependencies. |
Awesome. Thanks! |
39cb25d
to
30999cd
Compare
This needs to be configured in Chef first.
Revert "Merge pull request #1582 from 18F/bh-use-style-guide"
This uses the
identity-style-guide
NPM package to import shared assets. This first PR imports relatively low risk assets: font files, and favicons. A follow up PR will address shared stylesheets, images, and possibly some Javascript.