You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/firestore/scripts/build-bundle.js
+185-2
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
"use strict";
1
+
'use strict';
2
2
/**
3
3
* @license
4
4
* Copyright 2020 Google LLC
@@ -14,4 +14,187 @@
14
14
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
15
* See the License for the specific language governing permissions and
16
16
* limitations under the License.
17
-
*/var__awaiter=this&&this.__awaiter||function(thisArg,_arguments,P,generator){functionadopt(value){returnvalueinstanceofP?value:newP((function(resolve){resolve(value)}))}returnnew(P||(P=Promise))((function(resolve,reject){functionfulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}functionrejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}functionstep(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}step((generator=generator.apply(thisArg,_arguments||[])).next())}))};var__generator=this&&this.__generator||function(thisArg,body){var_={label:0,sent:function(){if(t[0]&1)throwt[1];returnt[1]},trys:[],ops:[]},f,y,t,g;returng={next:verb(0),throw:verb(1),return:verb(2)},typeofSymbol==="function"&&(g[Symbol.iterator]=function(){returnthis}),g;functionverb(n){returnfunction(v){returnstep([n,v])}}functionstep(op){if(f)thrownewTypeError("Generator is already executing.");while(_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)returnt;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case0:case1:t=op;break;case4:_.label++;return{value:op[1],done:false};case5:_.label++;y=op[1];op=[0];continue;case7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]<t[3])){_.label=op[1];break}if(op[0]===6&&_.label<t[1]){_.label=t[1];t=op;break}if(t&&_.label<t[2]){_.label=t[2];_.ops.push(op);break}if(t[2])_.ops.pop();_.trys.pop();continue}op=body.call(thisArg,_)}catch(e){op=[6,e];y=0}finally{f=t=0}if(op[0]&5)throwop[1];return{value:op[0]?op[1]:void0,done:true}}};exports.__esModule=true;varyargs=require("yargs");varrollup_1=require("rollup");vartypescriptPlugin=require("rollup-plugin-typescript2");varalias=require("@rollup/plugin-alias");varjson=require("rollup-plugin-json");varutil=require("../rollup.shared");varargv=yargs.options({input:{type:"string",demandOption:true,desc:"The location of the index.ts file"},output:{type:"string",demandOption:true,desc:"The location for the transpiled JavaScript bundle"}}).argv;functionbuildBundle(input,output){return__awaiter(this,void0,void0,(function(){varbundle;return__generator(this,(function(_a){switch(_a.label){case0:return[4,rollup_1.rollup({input:input,plugins:[alias(util.generateAliasConfig("node")),typescriptPlugin({tsconfigOverride:{compilerOptions:{target:"es2017"}},transformers:[util.removeAssertTransformer]}),json({preferConst:true})],external:util.resolveNodeExterns})];case1:bundle=_a.sent();return[4,bundle.write({file:output,format:"es"})];case2:_a.sent();return[2]}}))}))}buildBundle(argv.input,argv.output);
0 commit comments