Class: BPM::PluginAsset
- Inherits:
-
GeneratedAsset
- Object
- Sprockets::BundledAsset
- GeneratedAsset
- BPM::PluginAsset
- Defined in:
- lib/bpm/pipeline/plugin_asset.rb
Overview
Defines an asset that represents a build plugin (such as a transport or a minifier.) The generated asset will include dependencies of the plugin module as well as the module itself.
Constant Summary
Constants inherited from GeneratedAsset
GeneratedAsset::FORMAT_METHODS
Instance Method Summary collapse
-
#initialize(environment, module_name) ⇒ PluginAsset
constructor
A new instance of PluginAsset.
Methods inherited from GeneratedAsset
#build_settings, generating_asset, #minify_as_js, #minify_body, pop_generating_asset, push_generating_asset
Constructor Details
#initialize(environment, module_name) ⇒ PluginAsset
Returns a new instance of PluginAsset.
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bpm/pipeline/plugin_asset.rb', line 10 def initialize(environment, module_name) pathname = Pathname.new(File.join(environment.project.root_path, BPM_DIR, 'plugins', module_name+'.js')) unless File.exists? pathname FileUtils.mkdir_p File.dirname(pathname) FileUtils.touch pathname end super(environment, module_name, pathname, {}) end |