Closed daniilsunyaev closed 10 years ago
@antongudkov @daniilsunyaev what you think if we will use https://github.com/aanand/deadweight instead of Grunt task?
:-1: on idea with grunt - "костыль"-like dependency.
:+1: on adding deadweight to build process
@vast unfortunately deadweight uses nokogiri, which fails to parse our deafdult css files
@daniilsunyaev, can we create Ruby wrapper/adapter for the uncss: https://github.com/giakki/uncss In that case we'll still have js-runtime dependency, but won't have to install and use grunt.
What do you think?
Sounds ok, just... requires some time. Right now I have no idea how this can be made, so I have to perform a little investigation. Have to realize how everything works undercover.
@daniilsunyaev, no worries. I guess, you can take a look, for example, at ruby-stylus for ideas on how to wrap js library in Ruby:
@vast thanks for the link, I'll take a look as soon as I'll got some time
@daniilsunyaev could you please share errors from nokogiri?
@timurvafin sure, here you go:
$ deadweight -s build/assets/stylesheets/*.css build/*.html
build/assets/stylesheets/application-3d25a045.css
found 1491 selectors
build/404.html
html
body
h1
*
/home/das/.rvm/gems/ruby-2.1.0/gems/nokogiri-1.6.1/lib/nokogiri/css/parser_extras.rb:87:in `on_error': unexpected '"' after 'prefix_match' (Nokogiri::CSS::SyntaxError)
Line-by-line I've found that troubles are caused by this lines
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
If we'll remove content: "";
no errors will riase during execution.
closing since no action on this
https://github.com/fs/static-base/issues/31