Kaynağa Gözat

import main

like `rake import`, but imports from the main file instead of the little
sub files
Ruduki2 5 yıl önce
ebeveyn
işleme
5aa85b39bb
1 değiştirilmiş dosya ile 15 ekleme ve 0 silme
  1. 15 0
      Rakefile

+ 15 - 0
Rakefile

@@ -117,6 +117,21 @@ task import: %w(bundle_install) do
   end
 end
 
+task import_main: %w(bundle_install) do
+  file_set = Set.new(files)
+  base_excludes=%w[../stylesheet.tw2 ../storyjs.tw2 ../stylesheet.tw2 ../images.tw2]
+  files.each do |file|
+    other_files = (file_set - Set.new(file)).map { |f| f.source_file }
+    excludes = others_files + base_excludes
+    sh(
+      'bundle', 'exec', 'twee2', 'decompile',
+      File.join(STORY_DIR, STORY_RELEASE_TITLE), file.source_file,
+      '--exclude=StoryJS,StoryCSS,StoryTitle',
+      "--exclude-from=../stylesheet.tw2,../storyjs.tw2,../stylesheet.tw2,../images.tw2',
+    )
+  end
+end
+
 task :bundle_install do
   sh 'bundle check || bundle install'
 end