Difference between revisions of "Editing ImpVis Components"
Jump to navigation
Jump to search
(Created page with "To edit locally, clone the vue components repository (you may want to create your own fork or branch). Run “npm run template” to get an example template to view while edit...") |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
To edit | If you want to make a change to one of the ImpVis components in any visualisation (referred to by <iv-component>) then you will need to follow the steps on this page. | ||
# To edit the components library you must first clone [https://github.com/Imperial-visualizations/Vue-Components the repository]. If you are making a small change then cloning and editing directly on the "dev" branch may work, however if you are making larger changes you may want to consider making your own fork or branch. | |||
Make your | # To start editing you must navigate to the folder you have cloned in a command prompt/terminal using "cd <directory path>". Once in the correct location you can run the example template to test your component by running <code>npm run template</code>. The code for this example template is located within the "template" folder. | ||
Create pull request from | #Make your edits to the components located within the "src/components" folder, and test them using the example template. | ||
Now run | #Iterate the version number in the package.json (line 3). For minor changes, iterate the last digit; for medium changes, the middle digit; and for very large changes iterate the first digit. E.g. a medium change would make 1.1.6 -> 1.2.6. | ||
#Create a pull request from your branch to the master branch, you will need two approving reviews to get your pull request approved and merged. The reviewers should thoroughly test your components and give suggestions for improvements. | |||
#Now run <code>npm update @impvis/components</code> in the folders of your existing visualisations to get the latest updates. | |||
#Update the documentation for the [[Vue Components|vue components]] on the wiki to include your changes. | |||
#<code>@impvis/components</code> library is currently on version 1.4.6 | |||
[[Category:Maintaining_ImpVis]] |
Latest revision as of 15:09, 30 September 2021
If you want to make a change to one of the ImpVis components in any visualisation (referred to by <iv-component>) then you will need to follow the steps on this page.
- To edit the components library you must first clone the repository. If you are making a small change then cloning and editing directly on the "dev" branch may work, however if you are making larger changes you may want to consider making your own fork or branch.
- To start editing you must navigate to the folder you have cloned in a command prompt/terminal using "cd <directory path>". Once in the correct location you can run the example template to test your component by running
npm run template
. The code for this example template is located within the "template" folder. - Make your edits to the components located within the "src/components" folder, and test them using the example template.
- Iterate the version number in the package.json (line 3). For minor changes, iterate the last digit; for medium changes, the middle digit; and for very large changes iterate the first digit. E.g. a medium change would make 1.1.6 -> 1.2.6.
- Create a pull request from your branch to the master branch, you will need two approving reviews to get your pull request approved and merged. The reviewers should thoroughly test your components and give suggestions for improvements.
- Now run
npm update @impvis/components
in the folders of your existing visualisations to get the latest updates. - Update the documentation for the vue components on the wiki to include your changes.
@impvis/components
library is currently on version 1.4.6