Class: Csso::Loader::ModifiedEnvironment
- Inherits:
-
CommonJS::Environment
- Object
- CommonJS::Environment
- Csso::Loader::ModifiedEnvironment
- Defined in:
- lib/csso/loader.rb
Instance Method Summary collapse
-
#require(module_id) ⇒ Object
CommonJS’ require does append .js to modules no matter if it is there already.
Instance Method Details
#require(module_id) ⇒ Object
CommonJS’ require does append .js to modules no matter if it is there already
12 13 14 15 16 |
# File 'lib/csso/loader.rb', line 12 def require module_id path = module_id.gsub(/^\.\//, "") path = path.gsub(/\.js$/, "") super path end |