protoc/protoc.js
// Copies a package to proto folder
Copies a package to proto folder
Copies a package to proto folder
copyPackage(originProtoPath) {
    if (!fs.existsSync(originProtoPath)) {
      this.error(originProtoPath + ' not found');
    }
    const filename = path.parse(originProtoPath).base;
    const newPackagePath = path.join(this.projectExportPath, filename);
    if (this.protoFileList.indexOf(newPackagePath) === -1) {
      this.protocFilenameList.push(filename);
      this.protoFileList.push(newPackagePath);
      fs.copySync(originProtoPath, newPackagePath);
    }
  }
copyPackage ( originProtoPath ) { if ( ! fs . existsSync ( originProtoPath ) ) { this . error ( originProtoPath + ' not found' ) ; } const filename = path . parse ( originProtoPath ) . base ; const newPackagePath = path . join ( this . projectExportPath , filename ) ; if ( this . protoFileList . indexOf ( newPackagePath ) === - 1 ) { this . protocFilenameList . push ( filename ) ; this . protoFileList . push ( newPackagePath ) ; fs . copySync ( originProtoPath , newPackagePath ) ; } }
Copies a package to proto folder
Copies a package to proto folder
// If the file wasn't copied before, then copy it now