Blame view

node_modules/less/test/plugins/filemanager/index.js 845 Bytes
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  (function(exports) {
      var plugin = function(less) {
          var FileManager = less.FileManager, TestFileManager = new FileManager();
          function TestFileManager() { };
          TestFileManager.loadFile = function (filename, currentDirectory, options, environment, callback) {
              if (filename.match(/.*\.test$/)) {
                  return less.environment.fileManagers[0].loadFile('colors.test', currentDirectory, options, environment, callback);
              }
              return less.environment.fileManagers[0].loadFile(filename, currentDirectory, options, environment, callback);
          };
  
          return TestFileManager;
      };
  
      exports.install = function(less, pluginManager) {
          less.environment.addFileManager(new plugin(less));
      };
  
  })(typeof exports === 'undefined' ? this['AddFilePlugin'] = {} : exports);