-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Swap to using webpack #771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
beca6ea
successful build with webpack
SimonBiggs 0ab7645
commit the built files
SimonBiggs 006921a
A few additions for migration to webpack
agjohnson fb934e0
Change port and do make clean build
agjohnson af7d610
Pin Neat v1.9 to avoid node-gyp 3.8
agjohnson c5d01ad
Merge branch 'agj/more-webpack' into swap-to-webpack
agjohnson cb87d8f
Drop yarn lock, move deps to devdeps in package.json
agjohnson 9a8699b
Merge branch 'master' into swap-to-webpack
agjohnson 472b3ae
Final doc updates and fix tests
agjohnson 94d5743
Review fixes on typo and missing change to package.json
agjohnson a591817
Forgot a changelog entry
agjohnson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,13 +10,12 @@ Modifying the theme | |
| =================== | ||
|
|
||
| The styles for this theme use SASS_ and a custom CSS framework called Wyrm_. We | ||
| use Bower_ to manage these dependencies and SASS_ to build the CSS. Grunt_ is | ||
| used to watch for changes, rebuild the static assets, and rebuild the Sphinx | ||
| demo documentation. | ||
| use Webpack_ and node-sass_ to build the CSS. Webpack_ is used to watch for | ||
| changes, rebuild the static assets, and rebuild the Sphinx demo documentation. | ||
|
|
||
| .. note:: | ||
| The installation of Ruby and Node is outside the scope of this | ||
| documentation. You will need both in order to make changes to this theme. | ||
| The installation of Node is outside the scope of this documentation. You | ||
| will need Node version 10+ in order to make changes to this theme. | ||
|
|
||
| Set up your environment | ||
| ----------------------- | ||
|
|
@@ -27,13 +26,7 @@ Set up your environment | |
|
|
||
| pip install -e '.[dev]' | ||
|
|
||
| #. Install SASS. | ||
|
|
||
| .. code:: console | ||
|
|
||
| gem install sass | ||
|
|
||
| #. Install Bower, Grunt, and theme dependencies locally. | ||
| #. Install Webpack_, node-sass_, and theme dependencies locally. | ||
|
|
||
| .. code:: console | ||
|
|
||
|
|
@@ -42,31 +35,31 @@ Set up your environment | |
| Making changes | ||
| -------------- | ||
|
|
||
| Changes to the theme can be compiled and tested with the default Grunt task: | ||
| Changes to the theme can be compiled and tested with Webpack_: | ||
|
|
||
| .. code:: console | ||
|
|
||
| grunt | ||
| npm run dev | ||
|
|
||
| This default task will do the following: | ||
| This script will do the following: | ||
|
|
||
| #. Install and update any Bower dependencies. | ||
| #. Install and update any dependencies. | ||
| #. Build the static CSS from SASS source files. | ||
| #. Build the demo documentation. | ||
| #. Watch for changes to the SASS files and documentation and rebuild everything | ||
| on any detected changes. | ||
|
|
||
| Alternatively, if you don't need to watch the files, Grunt can be called with | ||
| the same task used for releases: | ||
| Alternatively, if you don't need to watch the files, the release build script | ||
| can be used to test built assets: | ||
|
|
||
| .. code:: console | ||
|
|
||
| grunt build | ||
| npm run build | ||
|
|
||
| .. _Bower: http://www.bower.io | ||
| .. _Webpack: https://webpack.js.org/ | ||
| .. _node-sass: https://github.com/sass/node-sass | ||
| .. _SASS: http://www.sass-lang.com | ||
| .. _Wyrm: http://www.github.com/snide/wyrm/ | ||
| .. _Grunt: http://www.gruntjs.com | ||
| .. _Sphinx: http://www.sphinx-doc.org/en/stable/ | ||
|
|
||
| Translations | ||
|
|
@@ -96,10 +89,12 @@ Releasing the theme | |
|
|
||
| To release a new version of the theme, core team will take the following steps: | ||
|
|
||
| #. Bump the version in ``sphinx_rtd_theme/__init__.py``, ``bower.json`` and ``package.json`` -- | ||
| we try to follow `semver <http://semver.org/>`_, so be careful with breaking changes. | ||
| #. Bump the version in ``sphinx_rtd_theme/__init__.py``, ``setup.py`` and | ||
| ``package.json``. We follow `semver <http://semver.org/>`_ and `PEP440`_ | ||
| (with regards to alpha release and development versions). The version | ||
| increment should reflect these releases and any potentially breaking changes. | ||
| #. Update the changelog (``docs/changelog.rst``) with the version information. | ||
| #. Run ``grunt build`` to rebuild all the theme assets. | ||
| #. Run ``npm run build`` to rebuild all the theme assets. | ||
| #. Run ``python setup.py update_translations`` to compile new translation files and update Transifex | ||
| #. Commit that change. | ||
| #. 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: | |
| rm -rf dist/ | ||
| python setup.py sdist bdist_wheel | ||
| twine upload --sign --identity [email protected] dist/* | ||
|
|
||
| .. _PEP440: https://www.python.org/dev/peps/pep-0440/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.