-
Notifications
You must be signed in to change notification settings - Fork 322
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
Automate documentation builds with nox #487
Comments
+100. I don't know if
In addition, I think y'all need to pin some of your yarn dependencies. I literally just did the above steps in a new conda environment, and running |
As an aside - what do we use webpack for? Is it just for bundling our Javascript and SCSS as assets in the package? If that is the case, I'd also suggest we consider using |
Indeed, it's being used for building the SCSS sources and bundling them. If you have been happily using web-compile with the executable-books projects, it sounds good to switch here as well |
I've found web-compile to be much simpler and faster than the whole webpack toolchain. I think our problem is that we're using webpack for a lot of other stuff too, like vendoring fontawesome + bootstrap. In my opinion this is hard to maintain and follow since none of us are JS devs. I am curious what you think about just manually bundling all assets with this repository, removing webpack entirely, and then using web-compile to compile our theme-specific CSS and JS |
Description
I find the developer documentation for this theme to be pretty complex, especially as someone without a lot of background in
npm
/webpack
/yarn
workflows. As noted in #468 , I have a lot of weird behavior when I runyarn build:dev
and I have no idea how to resolve this. It makes developing this theme really cumbersome for me, and I suspect that other potential developers may have similar issues since many Python devs who come to this theme are not familiar with JS workflows either.I think it'd be helpful if we provided a
one-command
method of installing development dependencies, generating asset bundles, and building / previewing the documentation.I've found that the nox package is a really nice / lightweight way to do things like this. For example, we could turn most of our "Set up a development environment" documentation into two commands:
Benefits of this approach
I think the main benefits to this are:
nox
is more python-friendly than manually installing and runningyarn
nox
is more flexible and we could also use it for running our testsnox
handles the virtual environment for you, so you're more certain that your dev environment is what you expect.Implementation details
I think that this could be accomplished with a nox config like this:
or for docs previews, it might be the following (and invoked with
nox -s docs-live
:The text was updated successfully, but these errors were encountered: