Skip to content

Commit 75b481e

Browse files
authored
Add a package.json file for a better javascript development experience (#365)
* Add a package.json file for a better javascript development experience * remove publushing information from the package.json
1 parent d104477 commit 75b481e

File tree

3 files changed

+45
-12
lines changed

3 files changed

+45
-12
lines changed

.github/workflows/actions.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,10 @@ jobs:
123123
node-version: '12.x'
124124
- name: Install Dependencies
125125
run: |
126-
npm install [email protected] grunt-cli grunt grunt-contrib-qunit
126+
npm install
127127
- name: QUnit Tests
128128
run: |
129-
grunt test
129+
npm test
130130
env:
131131
CI: true
132132
publish:

development.rst

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ it.
3232

3333
You can do this with `git commit --allow-empty`
3434

35-
Running Tests
36-
-------------
35+
Running Tests - Python
36+
----------------------
3737

3838
You will need `Tox <https://tox.readthedocs.io>`_ installed to run the tests
3939
against the supported Python versions. If you're using `Pipenv`_ it will be
@@ -52,18 +52,38 @@ Otherwise, to install and run, do:
5252
$ pip install tox
5353
$ tox
5454
55+
Running Tests - JavaScript
56+
--------------------------
57+
58+
You will need `npm <https://www.npmjs.com>`_ installed to run the JavaScript tests.
59+
Internally, we use `Grunt <https://gruntjs.com>`_ and `QUnit <https://qunitjs.com>`_ to run the tests.
60+
61+
Once ``npm`` is installed, you can install all needed dependencies by running:
62+
63+
.. code-block:: bash
64+
65+
$ npm install
66+
67+
Run the following to execute the tests:
68+
69+
.. code-block:: bash
70+
71+
$ npm test
72+
5573
Releasing a new version
5674
-----------------------
5775

5876
Follow these steps to release a new version of the project:
5977

60-
1. Update your local master with the upstream master (``git pull --rebase upstream master``)
61-
2. Create a new branch and update ``CHANGES.rst`` with the new version, today's date, and all changes/new features
62-
3. Commit and push the new branch and then create a new pull request
63-
4. Wait for tests and reviews and then merge the branch
64-
5. Once merged, update your local master again (``git pull --rebase upstream master``)
65-
6. Tag the release with the new release version (``git tag v<new tag>``)
66-
7. Push the tag (``git push upstream --tags``)
67-
8. Done. Check `CI <https://github.com/pytest-dev/pytest-html/actions>`_ for release progress.
78+
1. Update your local master with the upstream master (``git pull --rebase upstream master``)
79+
2. Create a new branch
80+
3. Update ``CHANGES.rst`` with the new version, today's date, and all changes/new features
81+
4. Update the ``version`` field in ``package.json`` with the new version
82+
5. Commit and push the new branch and then create a new pull request
83+
6. Wait for tests and reviews and then merge the branch
84+
7. Once merged, update your local master again (``git pull --rebase upstream master``)
85+
8. Tag the release with the new release version (``git tag v<new tag>``)
86+
9. Push the tag (``git push upstream --tags``)
87+
10. Done. Check `CI <https://github.com/pytest-dev/pytest-html/actions>`_ for release progress.
6888

6989
.. _Pipenv: https://pipenv.pypa.io/en/latest/

package.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"main": "Gruntfile.js",
3+
"dependencies": {
4+
"grunt": "^1.3.0",
5+
"grunt-cli": "^1.3.2",
6+
"grunt-contrib-qunit": "^4.0.0",
7+
"phantomjs-prebuilt": "2.1.15"
8+
},
9+
"devDependencies": {},
10+
"scripts": {
11+
"test": "grunt test"
12+
}
13+
}

0 commit comments

Comments
 (0)