Doing custom dev/build steps



  • Hi there

    We’re using grpc and protobuf 3 for our app and I need to add a bit of scripting to integrate the tech into our quasar app project.

    With each call of the dev / build commands, I need the tooling to make sure that the required javascript code is generated from the protobuf files.

    The code I need to run is along the following lines (after doing npm install -g grpc-tools).

    cd ../../protos
    grpc_tools_node_protoc --js_out=import_style=commonjs,binary:../node/static_codegen/ --grpc_out=../node/static_codegen --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` helloworld.proto
    grpc_tools_node_protoc --js_out=import_style=commonjs,binary:../node/static_codegen/route_guide/ --grpc_out=../node/static_codegen/route_guide/ --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` route_guide.proto
    

    What is the correct / intended way of adding stuff like that to the Quasar tooling?

    Cheers,
    Michael



  • @mboeni during the build / dev, the code in this file is executed:

    quasar.conf.js

    you can detect command line args, env variables or anything and call whatever you wish.

    Another simple solution is just using whatever command shell and just write your own build/dev shell script which calls “quasar dev/build” and then your commands depending on exit code.



  • @qyloxe Okay, thanks. I’ll give quasar.conf.js a spin then. The shell scripting is of course a viable alternative. I was just curious if there is a ‘best practice’ way of doing this…


Log in to reply