BVB Source Codes

reactide Show index.js Source code

Return Download reactide: download index.js Source code - Download reactide Source code - Type:.js
  1. // Generated by LiveScript 1.4.0
  2. (function(){
  3.   var Promise, ref$, list, experimental, libraryBlacklist, es5SpecialCase, banner, readFile, writeFile, unlink, join, webpack, temp;
  4.   Promise = require('../library/fn/promise');
  5.   ref$ = require('./config'), list = ref$.list, experimental = ref$.experimental, libraryBlacklist = ref$.libraryBlacklist, es5SpecialCase = ref$.es5SpecialCase, banner = ref$.banner;
  6.   ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink;
  7.   join = require('path').join;
  8.   webpack = require('webpack');
  9.   temp = require('temp');
  10.   module.exports = function(arg$){
  11.     var modules, ref$, blacklist, library, umd, this$ = this;
  12.     modules = (ref$ = arg$.modules) != null
  13.       ? ref$
  14.       : [], blacklist = (ref$ = arg$.blacklist) != null
  15.       ? ref$
  16.       : [], library = (ref$ = arg$.library) != null ? ref$ : false, umd = (ref$ = arg$.umd) != null ? ref$ : true;
  17.     return new Promise(function(resolve, reject){
  18.       (function(){
  19.         var i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this;
  20.         if (this.exp) {
  21.           for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) {
  22.             x$ = ref$[i$];
  23.             this[x$] = true;
  24.           }
  25.         }
  26.         if (this.es5) {
  27.           for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) {
  28.             y$ = ref$[i$];
  29.             this[y$] = true;
  30.           }
  31.         }
  32.         for (ns in this) {
  33.           if (this[ns]) {
  34.             for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) {
  35.               name = ref$[i$];
  36.               if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) {
  37.                 this[name] = true;
  38.               }
  39.             }
  40.           }
  41.         }
  42.         if (library) {
  43.           blacklist = blacklist.concat(libraryBlacklist);
  44.         }
  45.         for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) {
  46.           ns = blacklist[i$];
  47.           for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) {
  48.             name = ref$[j$];
  49.             if (name === ns || name.indexOf(ns + ".") === 0) {
  50.               this[name] = false;
  51.             }
  52.           }
  53.         }
  54.         TARGET = temp.path({
  55.           suffix: '.js'
  56.         });
  57.         webpack({
  58.           entry: list.filter(function(it){
  59.             return this$[it];
  60.           }).map(function(it){
  61.             if (library) {
  62.               return join(__dirname, '..', 'library', 'modules', it);
  63.             } else {
  64.               return join(__dirname, '..', 'modules', it);
  65.             }
  66.           }),
  67.           output: {
  68.             path: '',
  69.             filename: TARGET
  70.           }
  71.         }, function(err, info){
  72.           if (err) {
  73.             return reject(err);
  74.           }
  75.           readFile(TARGET, function(err, script){
  76.             if (err) {
  77.               return reject(err);
  78.             }
  79.             unlink(TARGET, function(err){
  80.               var exportScript;
  81.               if (err) {
  82.                 return reject(err);
  83.               }
  84.               if (umd) {
  85.                 exportScript = "// CommonJS export\nif(typeof module != 'undefined' && module.exports)module.exports = __e;\n// RequireJS export\nelse if(typeof define == 'function' && define.amd)define(function(){return __e});\n// Export to global object\nelse __g.core = __e;";
  86.               } else {
  87.                 exportScript = "";
  88.               }
  89.               resolve("" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n" + exportScript + "\n}(1, 1);");
  90.             });
  91.           });
  92.         });
  93.       }.call(modules.reduce(function(memo, it){
  94.         memo[it] = true;
  95.         return memo;
  96.       }, {})));
  97.     });
  98.   };
  99.   function in$(x, xs){
  100.     var i = -1, l = xs.length >>> 0;
  101.     while (++i < l) if (x === xs[i]) return true;
  102.     return false;
  103.   }
  104. }).call(this);
  105.  
downloadindex.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