Class: Jekyll::Assets::Plugins::SrcMap::Writer
- Inherits:
-
Sprockets::Exporters::Base
- Object
- Sprockets::Exporters::Base
- Jekyll::Assets::Plugins::SrcMap::Writer
- Defined in:
- lib/jekyll/assets/plugins/srcmap/writer.rb
Instance Method Summary collapse
-
#call ⇒ Object
–.
-
#files ⇒ Array<String>
– Provides our custom manifest key, full of files.
- #skip?(_) ⇒ Boolean
Instance Method Details
#call ⇒ Object
–
21 22 23 24 25 26 |
# File 'lib/jekyll/assets/plugins/srcmap/writer.rb', line 21 def call clean_file! clean_sources! write_map! write_src! end |
#files ⇒ Array<String>
Note:
We push everything from the file we are writing to the maps.
– Provides our custom manifest key, full of files. –
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/jekyll/assets/plugins/srcmap/writer.rb', line 33 def files @files ||= begin key = "sourceMapFiles" out = env.manifest.data[key] ||= [] unless Manifest.keep_keys.include?(key) Manifest.keep_keys << key end out end end |
#skip?(_) ⇒ Boolean
15 16 17 18 |
# File 'lib/jekyll/assets/plugins/srcmap/writer.rb', line 15 def skip?(_) !env.asset_config[:source_maps] || !asset.[:map] end |