Skip to content

Commit 10d9f51

Browse files
committed
Merge branch 'master' into style-cpp-domain
2 parents 26b72a7 + 7e0d793 commit 10d9f51

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+249
-328
lines changed

Gruntfile.js

Lines changed: 0 additions & 189 deletions
This file was deleted.

bower.json

Lines changed: 0 additions & 37 deletions
This file was deleted.

docs/changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Other Changes
1919
* Add the ``navigation`` template block around the navigation area.
2020
* Added Spanish translation
2121
* Added i18n support using Babel
22+
* Moved build system from Grunt and friends to Webpack
2223

2324
0.4.3
2425
======

docs/contributing.rst

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ Modifying the theme
1010
===================
1111

1212
The styles for this theme use SASS_ and a custom CSS framework called Wyrm_. We
13-
use Bower_ to manage these dependencies and SASS_ to build the CSS. Grunt_ is
14-
used to watch for changes, rebuild the static assets, and rebuild the Sphinx
15-
demo documentation.
13+
use Webpack_ and node-sass_ to build the CSS. Webpack_ is used to watch for
14+
changes, rebuild the static assets, and rebuild the Sphinx demo documentation.
1615

1716
.. note::
18-
The installation of Ruby and Node is outside the scope of this
19-
documentation. You will need both in order to make changes to this theme.
17+
The installation of Node is outside the scope of this documentation. You
18+
will need Node version 10+ in order to make changes to this theme.
2019

2120
Set up your environment
2221
-----------------------
@@ -27,13 +26,7 @@ Set up your environment
2726
2827
pip install -e '.[dev]'
2928
30-
#. Install SASS.
31-
32-
.. code:: console
33-
34-
gem install sass
35-
36-
#. Install Bower, Grunt, and theme dependencies locally.
29+
#. Install Webpack_, node-sass_, and theme dependencies locally.
3730

3831
.. code:: console
3932
@@ -42,31 +35,31 @@ Set up your environment
4235
Making changes
4336
--------------
4437

45-
Changes to the theme can be compiled and tested with the default Grunt task:
38+
Changes to the theme can be compiled and tested with Webpack_:
4639

4740
.. code:: console
4841
49-
grunt
42+
npm run dev
5043
51-
This default task will do the following:
44+
This script will do the following:
5245

53-
#. Install and update any Bower dependencies.
46+
#. Install and update any dependencies.
5447
#. Build the static CSS from SASS source files.
5548
#. Build the demo documentation.
5649
#. Watch for changes to the SASS files and documentation and rebuild everything
5750
on any detected changes.
5851

59-
Alternatively, if you don't need to watch the files, Grunt can be called with
60-
the same task used for releases:
52+
Alternatively, if you don't need to watch the files, the release build script
53+
can be used to test built assets:
6154

6255
.. code:: console
6356
64-
grunt build
57+
npm run build
6558
66-
.. _Bower: http://www.bower.io
59+
.. _Webpack: https://webpack.js.org/
60+
.. _node-sass: https://github.com/sass/node-sass
6761
.. _SASS: http://www.sass-lang.com
6862
.. _Wyrm: http://www.github.com/snide/wyrm/
69-
.. _Grunt: http://www.gruntjs.com
7063
.. _Sphinx: http://www.sphinx-doc.org/en/stable/
7164

7265
Translations
@@ -96,10 +89,12 @@ Releasing the theme
9689

9790
To release a new version of the theme, core team will take the following steps:
9891

99-
#. Bump the version in ``sphinx_rtd_theme/__init__.py``, ``bower.json`` and ``package.json`` --
100-
we try to follow `semver <http://semver.org/>`_, so be careful with breaking changes.
92+
#. Bump the version in ``sphinx_rtd_theme/__init__.py``, ``setup.py`` and
93+
``package.json``. We follow `semver <http://semver.org/>`_ and `PEP440`_
94+
(with regards to alpha release and development versions). The version
95+
increment should reflect these releases and any potentially breaking changes.
10196
#. Update the changelog (``docs/changelog.rst``) with the version information.
102-
#. Run ``grunt build`` to rebuild all the theme assets.
97+
#. Run ``npm run build`` to rebuild all the theme assets.
10398
#. Run ``python setup.py update_translations`` to compile new translation files and update Transifex
10499
#. Commit that change.
105100
#. Tag the release in git: ``git tag $NEW_VERSION``.
@@ -111,3 +106,5 @@ To release a new version of the theme, core team will take the following steps:
111106
rm -rf dist/
112107
python setup.py sdist bdist_wheel
113108
twine upload --sign --identity [email protected] dist/*
109+
110+
.. _PEP440: https://www.python.org/dev/peps/pep-0440/

package.json

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,33 @@
33
"main": "js/theme.js",
44
"version": "0.4.3",
55
"private": true,
6+
"scripts": {
7+
"dev": "webpack-dev-server --open --config webpack.dev.js",
8+
"build": "webpack --config webpack.prod.js"
9+
},
10+
"dependencies": {},
611
"devDependencies": {
7-
"bower": "^1.8.4",
8-
"browserify": "^13.0.0",
9-
"connect-livereload": "~0.6.0",
10-
"grunt": "~1.0.1",
11-
"grunt-banner": "^0.6.0",
12-
"grunt-browserify": "^5.0.0",
13-
"grunt-contrib-clean": "^1.0.0",
14-
"grunt-contrib-connect": "^1.0.2",
15-
"grunt-contrib-copy": "~1.0.0",
16-
"grunt-contrib-sass": "~1.0.0",
17-
"grunt-contrib-uglify": "~3.3.0",
18-
"grunt-contrib-watch": "~1.0.0",
19-
"grunt-exec": "~1.0.1",
20-
"grunt-open": "0.2.3",
21-
"matchdep": "~1.0.1"
12+
"bourbon": "~4.3",
13+
"bourbon-neat": "~1.9",
14+
"css-loader": "^3.1.0",
15+
"file-loader": "^3.0.1",
16+
"font-awesome": "^4.7.0",
17+
"imports-loader": "^0.8.0",
18+
"jquery": "^3.4.1",
19+
"lato-font": "^3.0.0",
20+
"matchdep": "~1.0.1",
21+
"mini-css-extract-plugin": "^0.6.0",
22+
"node-sass": "^4.12.0",
23+
"optimize-css-assets-webpack-plugin": "^5.0.3",
24+
"roboto-fontface": "^0.10.0",
25+
"sass-loader": "^7.1.0",
26+
"style-loader": "^0.23.1",
27+
"webpack": "^4.30.0",
28+
"webpack-cli": "^3.3.1",
29+
"webpack-dev-server": "^3.3.1",
30+
"webpack-merge": "^4.2.1",
31+
"webpack-shell-plugin": "^0.5.0",
32+
"webpack-watch-files-plugin": "^1.0.3",
33+
"wyrm": "^1.0.9"
2234
}
2335
}

0 commit comments

Comments
 (0)