I would like to create npm script allowing me to build and deploy Vue & Node app to public host, in my case it is Heroku.
My app structure looks like this:
- client // Vue front-end
- dist // built files
- node_modules
- public
- src // source code
- babel.config.js
- package.json
- package-lock.json
- server // Node back-end
- node_modules
- src
- config // configuration files
- controllers
- models
- routes
- app.js // starting file
- package.json
- package-lock.json
- package.json
- .gitignore
On my git master
branch that is pushed on GitLab repo I am ignoring /dist
from client
directory and index.js
file from server/src/config
where I store secret keys.
Is there any possibility to write one npm script that would build Vue app, and push only /dist
and /server
directories (including ignored index.js
file as it is needed for production)?
Thanks in advance.