gulp/util.js
function buildJs() {
  const jsFiles = config.jsCoreFiles;
  config.componentPaths.forEach(component => {
    jsFiles.push(path.join(component, '*.js'));
    jsFiles.push(path.join(component, '**/*.js'));
  });

  gutil.log("building js files...");

  const jsBuildStream = gulp.src(jsFiles)
  .pipe(filterNonCodeFiles())
  .pipe(utils.buildNgMaterialDefinition())
  .pipe(plumber())
  .pipe(ngAnnotate())
  .pipe(utils.addJsWrapper(true));

  const jsProcess = series(jsBuildStream, themeBuildStream())
  .pipe(concat('angular-material.js'))
  .pipe(BUILD_MODE.transform())
  .pipe(insert.prepend(config.banner))
  .pipe(insert.append(';window.ngMaterial={version:{full: "' + VERSION + '"}};'))
  .pipe(gulp.dest(config.outputDir))
  .pipe(gulpif(!IS_DEV, uglify({output: {comments: 'some'}})))
  .pipe(rename({extname: '.min.js'}))
  .pipe(gulp.dest(config.outputDir));

  return series(jsProcess, deployMaterialMocks());

  // Deploy the `angular-material-mocks.js` file to the `dist` directory
  function deployMaterialMocks() {
    return gulp.src(config.mockFiles)
    .pipe(gulp.dest(config.outputDir));
  }
}
function buildJs() {
  const jsFiles = config.jsCoreFiles;
  config.componentPaths.forEach(component => {
    jsFiles.push(path.join(component, '*.js'));
    jsFiles.push(path.join(component, '**/*.js'));
  });

  gutil.log("building js files...");

  const jsBuildStream = gulp.src(jsFiles)
  .pipe(filterNonCodeFiles())
  .pipe(utils.buildNgMaterialDefinition())
  .pipe(plumber())
  .pipe(ngAnnotate())
  .pipe(utils.addJsWrapper(true));

  const jsProcess = series(jsBuildStream, themeBuildStream())
  .pipe(concat('angular-material.js'))
  .pipe(BUILD_MODE.transform())
  .pipe(insert.prepend(config.banner))
  .pipe(insert.append(';window.ngMaterial={version:{full: "' + VERSION + '"}};'))
  .pipe(gulp.dest(config.outputDir))
  .pipe(gulpif(!IS_DEV, uglify({output: {comments: 'some'}})))
  .pipe(rename({extname: '.min.js'}))
  .pipe(gulp.dest(config.outputDir));

  return series(jsProcess, deployMaterialMocks());

  // Deploy the `angular-material-mocks.js` file to the `dist` directory
  function deployMaterialMocks() {
    return gulp.src(config.mockFiles)
    .pipe(gulp.dest(config.outputDir));
  }
}
function buildJs ( ) { const jsFiles = config . jsCoreFiles ; config . componentPaths . forEach ( component => { jsFiles . push ( path . join ( component , '*.js' ) ) ; jsFiles . push ( path . join ( component , '**/*.js' ) ) ; } ) ; gutil . log ( "building js files..." ) ; const jsBuildStream = gulp . src ( jsFiles ) . pipe ( filterNonCodeFiles ( ) ) . pipe ( utils . buildNgMaterialDefinition ( ) ) . pipe ( plumber ( ) ) . pipe ( ngAnnotate ( ) ) . pipe ( utils . addJsWrapper ( true ) ) ; const jsProcess = series ( jsBuildStream , themeBuildStream ( ) ) . pipe ( concat ( 'angular-material.js' ) ) . pipe ( BUILD_MODE . transform ( ) ) . pipe ( insert . prepend ( config . banner ) ) . pipe ( insert . append ( ';window.ngMaterial={version:{full: "' + VERSION + '"}};' ) ) . pipe ( gulp . dest ( config . outputDir ) ) . pipe ( gulpif ( ! IS_DEV , uglify ( { output : { comments : 'some' } } ) ) ) . pipe ( rename ( { extname : '.min.js' } ) ) . pipe ( gulp . dest ( config . outputDir ) ) ; return series ( jsProcess , deployMaterialMocks ( ) ) ; // Deploy the `angular-material-mocks.js` file to the `dist` directory function deployMaterialMocks ( ) { return gulp . src ( config . mockFiles ) . pipe ( gulp . dest ( config . outputDir ) ) ; } }
Builds the entire component library javascript.
Builds the entire component library javascript .