Define a command to install customized patch
mahsashadi opened this issue · 7 comments
After cloning OSjs project, I need to install my patch by simply executing one command in terminal (right after installation commands).
My patch include adding or changing files, for example:
- adding some fonts files
- changing client index file to add some tray icon.
What is you suggestion for this functionality?
Sound like all you need is a shell script maybe ?
By executing a script, I think all needed files for changes should be available.
I need it to be as simple as executing a command like npm
.
As you said, one way is to do this:
- clone the osjs project
- place
patchScript.sh
file andpatch_files
directory (containing all files needed) in the root of osjs project --- in this way user also have to download these files from some repository. - execute ./patchSrcipt.sh command
- execute other commands (including
npm install
,npm run build
andnpm run package:discovery
) - osjs with my patch is ready to use!
#!/bin/bash
# this is patchScript.sh file
mkdir src/client/typeface
cp -R patch_files/client-typeface/* src/client/typeface
cp patch_files/client-index.js src/client/index.js
cp patch_files/client-index.scss src/client/index.scss
So, is there any better way to achieve this?
So, is there any better way to achieve this?
Create a fork of the repo and replace anything you need.
So how can I get the repo updates?
This repo almost never changes. It's just a basic template project.
But if you want to get the updates, simply add a upstream remote that points to this repo in your project, then do a git merge.