BVB Source Codes

reactide Show plugin-pass.js Source code

Return Download reactide: download plugin-pass.js Source code - Download reactide Source code - Type:.js
  1. "use strict";
  2.  
  3. exports.__esModule = true;
  4.  
  5. var _classCallCheck2 = require("babel-runtime/helpers/classCallCheck");
  6.  
  7. var _classCallCheck3 = _interopRequireDefault(_classCallCheck2);
  8.  
  9. var _possibleConstructorReturn2 = require("babel-runtime/helpers/possibleConstructorReturn");
  10.  
  11. var _possibleConstructorReturn3 = _interopRequireDefault(_possibleConstructorReturn2);
  12.  
  13. var _inherits2 = require("babel-runtime/helpers/inherits");
  14.  
  15. var _inherits3 = _interopRequireDefault(_inherits2);
  16.  
  17. var _store = require("../store");
  18.  
  19. var _store2 = _interopRequireDefault(_store);
  20.  
  21. var _babelTraverse = require("babel-traverse");
  22.  
  23. var _babelTraverse2 = _interopRequireDefault(_babelTraverse);
  24.  
  25. var _file5 = require("./file");
  26.  
  27. var _file6 = _interopRequireDefault(_file5);
  28.  
  29. function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  30.  
  31. var PluginPass = function (_Store) {
  32.   (0, _inherits3.default)(PluginPass, _Store);
  33.  
  34.   function PluginPass(file, plugin) {
  35.     var options = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2];
  36.     (0, _classCallCheck3.default)(this, PluginPass);
  37.  
  38.     var _this = (0, _possibleConstructorReturn3.default)(this, _Store.call(this));
  39.  
  40.     _this.plugin = plugin;
  41.     _this.file = file;
  42.     _this.opts = options;
  43.     return _this;
  44.   }
  45.  
  46.   PluginPass.prototype.transform = function transform() {
  47.     var file = this.file;
  48.     file.log.debug("Start transformer " + this.key);
  49.     (0, _babelTraverse2.default)(file.ast, this.plugin.visitor, file.scope, file);
  50.     file.log.debug("Finish transformer " + this.key);
  51.   };
  52.  
  53.   PluginPass.prototype.addHelper = function addHelper() {
  54.     var _file;
  55.  
  56.     return (_file = this.file).addHelper.apply(_file, arguments);
  57.   };
  58.  
  59.   PluginPass.prototype.addImport = function addImport() {
  60.     var _file2;
  61.  
  62.     return (_file2 = this.file).addImport.apply(_file2, arguments);
  63.   };
  64.  
  65.   PluginPass.prototype.getModuleName = function getModuleName() {
  66.     var _file3;
  67.  
  68.     return (_file3 = this.file).getModuleName.apply(_file3, arguments);
  69.   };
  70.  
  71.   PluginPass.prototype.buildCodeFrameError = function buildCodeFrameError() {
  72.     var _file4;
  73.  
  74.     return (_file4 = this.file).buildCodeFrameError.apply(_file4, arguments);
  75.   };
  76.  
  77.   return PluginPass;
  78. }(_store2.default);
  79.  
  80. exports.default = PluginPass;
  81. module.exports = exports["default"];
downloadplugin-pass.js Source code - Download reactide Source code
Related Source Codes/Software:
rkt - rkt is a pod-native container engine for Linux. It... 2017-06-11
uWebSockets - Tiny WebSockets https://for... 2017-06-11
realworld - TodoMVC for the RealWorld - Exemplary fullstack Me... 2017-06-11
goreplay - GoReplay is an open-source tool for capturing and ... 2017-06-10
pyenv - Simple Python version management 2017-06-10
postal - 2017-06-11
CRYENGINE - CRYENGINE is a powerful real-time game development... 2017-06-11
reactide - Reactide is the first dedicated IDE for React web ... 2017-06-11
redux-saga - An alternative side effect model for Redux apps ... 2017-06-10
angular-starter - 2017-06-10

 Back to top