How to use the @angular-devkit/architect/src/index2.createBuilder function in @angular-devkit/architect

To help you get started, we’ve selected a few @angular-devkit/architect examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github steveblue / architect / build_tools / src / rollup / index.ts View on Github external
options.step = 0;
  options.tally = 4;
  return of(context).pipe(
            concatMap( results => ngc(options, context) ),
            (options.compilationMode !== 'aot') ? concatMap( results => of(results) ) : concatMap( results => compileMain(options, context) ),
            concatMap( results => rollup(options, context) ),
            mapTo({ success: true }),
            catchError(error => {
              context.reportStatus('Error: ' + error);
              return [{ success: false }];
            })
          );
}

export default createBuilder & RollupBuilderSchema>(executeRollup);
github steveblue / architect / build_tools / src / closure / index.ts View on Github external
return of(context).pipe(
    concatMap( results => ngc(options, context) ),
    (options.compilationMode !== 'aot') ? concatMap( results => of(results) ) : concatMap( results => compileMain(options, context) ),
    concatMap( results => optimizeBuild(options, context)),
    concatMap( results => handleEnvironment(options, context)),
    concatMap( results => closure(options, context) ),
    mapTo({ success: true }),
    catchError(error => {
      context.reportStatus('Error: ' + error);
      return [{ success: false }];
    }),
  );
}

export default createBuilder & ClosureBuilderSchema>(executeClosure);
github steveblue / architect / build_rollup / src / rollup / index.js View on Github external
}
exports.rollup = rollup;
async function build(options, context) {
    await ngc(options, context);
    await rollup(options, context);
    return options;
}
function execute(options, context) {
    context.reportProgress(2, 5, 'ngc');
    return rxjs_1.from(build(options, context)).pipe(operators_1.mapTo({ success: true }), operators_1.catchError(error => {
        context.reportStatus('Error: ' + error);
        return [{ success: false }];
    }));
}
exports.execute = execute;
exports.default = index2_1.createBuilder(execute);