Skip to content

Commit 0922113

Browse files
committed
Add webpack for static asset generatino
1 parent e6a52f9 commit 0922113

14 files changed

+6428
-398
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -99,3 +99,5 @@ ENV/
9999

100100
# mypy
101101
.mypy_cache/
102+
103+
node_modules/

package.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "pandas_sphinx_theme",
3+
"version": "0.0.1",
4+
"main": "js/theme.js",
5+
"repository": "https://github.com/pandas-dev/pydata-bootstrap-sphinx-theme",
6+
"scripts": {
7+
"build:dev": "webpack-dev-server --config webpack.dev.js",
8+
"build:production": "webpack --config webpack.prod.js"
9+
},
10+
"devDependencies": {
11+
"copy-webpack-plugin": "^5.1.1",
12+
"css-loader": "^3.4.2",
13+
"extract-loader": "^4.0.3",
14+
"file-loader": "^5.0.2",
15+
"imports-loader": "^0.8.0",
16+
"mini-css-extract-plugin": "^0.9.0",
17+
"node-sass": "^4.13.1",
18+
"sass-loader": "^8.0.2",
19+
"style-loader": "^1.1.3",
20+
"webpack": "^4.41.6",
21+
"webpack-cli": "^3.3.11",
22+
"webpack-dev-server": "^3.10.3",
23+
"webpack-merge": "^4.2.2",
24+
"webpack-shell-plugin": "^0.5.0",
25+
"webpack-watch-files-plugin": "^1.0.3"
26+
}
27+
}

pandas_sphinx_theme/layout.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.11.2/css/all.min.css" integrity="sha384-KA6wR/X5RY4zFAHpv/CnoG2UW1uogYfdnP67Uv7eULvTveboZJg0qUpmJZb5VqzN" crossorigin="anonymous">
1717

1818
{{- css() }}
19-
<link href="{{ pathto('_static/css/custom.css', 1) }}" rel="stylesheet">
19+
<link href="{{ pathto('_static/css/theme.css', 1) }}" rel="stylesheet">
2020
{%- endblock %}
2121

2222
{%- block extrahead %}
@@ -67,8 +67,8 @@
6767

6868
</div>
6969
</div>
70-
{%- include "scripts.html" %}
7170

71+
<script src="{{ pathto('_static/js/theme.js', 1) }}"></script>
7272
{% if theme_google_analytics_id %}
7373
<!-- Google Analytics -->
7474
<script>

pandas_sphinx_theme/scripts.html

-47
This file was deleted.

0 commit comments

Comments
 (0)