Skip to content

Commit f07549b

Browse files
committed
Add building from source section to project readme
1 parent ee2989b commit f07549b

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,72 @@ You can find the documentation for the **latest release version** on the [PowerT
2828

2929
[projectpage]: https://stevenbenner.github.io/jquery-powertip/
3030
[docs]: https://github.com/stevenbenner/jquery-powertip/tree/master/doc
31+
32+
## Building from source
33+
34+
> [!NOTE]
35+
> You do not have to build this project to use it. This is only needed if you intend to do development work or release your own version. For typical usage please follow the installation instructions in the documentation linked above. Alternatively, you can find examples of using the source version of PowerTip without any build steps in the html files in the `test` folder.
36+
37+
You can build your own release version of PowerTip from the source code by using the included task runner commands.
38+
39+
### Dependencies
40+
41+
You should have the following software installed on your computer to run the build system:
42+
43+
* [Node.js][nodejs]
44+
* [GruntJS][gruntjs] (optional)
45+
46+
[gruntjs]: https://gruntjs.com/
47+
[nodejs]: https://nodejs.org/
48+
49+
### Instructions
50+
51+
#### Clone git repo
52+
53+
Clone the git repository to your local system:
54+
55+
```shell
56+
git clone https://github.com/stevenbenner/jquery-powertip.git
57+
cd jquery-powertip
58+
```
59+
60+
#### Install npm dependencies
61+
62+
First you will need to install the npm dependencies to run the build system. Run the following command to install all project dependencies:
63+
64+
```shell
65+
npm install
66+
```
67+
68+
You only need to do this once.
69+
70+
#### Build distributale version
71+
72+
Then you can run the following command to build a distributable version of the project with all of the assets included:
73+
74+
```shell
75+
npm run build
76+
```
77+
78+
The built assets will be placed in the `dist` folder.
79+
80+
#### Other commands
81+
82+
If you installed GruntJS on your computer then you can run various other commands that are useful for development or debugging.
83+
84+
| Command | Action |
85+
| :------------- | :------------------------------------------- |
86+
| `grunt build` | Run a minimal build (skip docs and zip file) |
87+
| `grunt clean` | Remove build artifacts |
88+
| `grunt eslint` | Run the code linter |
89+
| `grunt test` | Run the test suite |
90+
91+
There are many other grunt tasks available as well. You can review the `Gruntfile.js` file to see the whole list.
92+
93+
##### Further reading
94+
95+
* For more detailed instructions on running the test suite please see the [testing documentation][testingdoc].
96+
* For instructions on publishing a new version please see the [release process documentation][releasedoc].
97+
98+
[testingdoc]: test/README.md
99+
[releasedoc]: doc/release-process.md

0 commit comments

Comments
 (0)