mirror of
https://github.com/DarrenOfficial/dpaste.git
synced 2024-11-15 08:02:54 +11:00
Ship compiled static files with Pypi package. #125
This commit is contained in:
parent
e945a8aa6d
commit
7acfa1f475
5 changed files with 17 additions and 6 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,7 +1,7 @@
|
||||||
.coverage
|
.coverage
|
||||||
build
|
|
||||||
docs/_build
|
docs/_build
|
||||||
dpaste/settings/local.py
|
dpaste/settings/local.py
|
||||||
|
dpaste/static/
|
||||||
dpaste.egg-info
|
dpaste.egg-info
|
||||||
dpaste.db
|
dpaste.db
|
||||||
node_modules
|
node_modules
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
Changelog
|
Changelog
|
||||||
=========
|
=========
|
||||||
|
|
||||||
|
3.3 (2019-07-12)
|
||||||
|
----------------
|
||||||
|
|
||||||
|
- The compiled static files (CSS, JS) are now shipped with the Pypi package since
|
||||||
|
its not possible to compile them after installation with pip.
|
||||||
|
|
||||||
3.2 (2019-06-24)
|
3.2 (2019-06-24)
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,12 @@ Python dependencies.
|
||||||
|
|
||||||
$ cd dpaste/
|
$ cd dpaste/
|
||||||
$ pipenv install --dev # Installs the project and Python dependencies
|
$ pipenv install --dev # Installs the project and Python dependencies
|
||||||
|
|
||||||
|
|
||||||
|
The static files are not shipped with the project repository and need to be
|
||||||
|
compiled manually. This is necessary since compiled CSS/JS files lead to too
|
||||||
|
many merge conflicts during development.
|
||||||
|
|
||||||
$ npm install # Installs the node dependencies and compiles
|
$ npm install # Installs the node dependencies and compiles
|
||||||
# the static files (JS/CSS).
|
# the static files (JS/CSS).
|
||||||
|
|
||||||
|
|
|
@ -64,8 +64,6 @@ STATICFILES_STORAGE = (
|
||||||
'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
|
'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
|
||||||
)
|
)
|
||||||
|
|
||||||
STATICFILES_DIRS = (os.path.join(PROJECT_DIR, 'build'),)
|
|
||||||
|
|
||||||
STATICFILES_FINDERS = (
|
STATICFILES_FINDERS = (
|
||||||
'django.contrib.staticfiles.finders.FileSystemFinder',
|
'django.contrib.staticfiles.finders.FileSystemFinder',
|
||||||
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
|
||||||
|
|
|
@ -7,11 +7,12 @@
|
||||||
"postinstall": "npm run build",
|
"postinstall": "npm run build",
|
||||||
"start": "npm run build && pipenv run ./manage.py runserver",
|
"start": "npm run build && pipenv run ./manage.py runserver",
|
||||||
"docs": "pipenv run sphinx-build -c docs docs docs/_build/html",
|
"docs": "pipenv run sphinx-build -c docs docs docs/_build/html",
|
||||||
"build-css": "sass --no-source-map --style=compressed client/scss/dpaste.scss:build/dpaste.css ",
|
"build-css": "sass --no-source-map --style=compressed client/scss/dpaste.scss:dpaste/static/dpaste.css ",
|
||||||
"build-js": "uglifyjs --compress=\"drop_console=true,ecma=6\" --mangle=\"toplevel\" --output=build/dpaste.js client/js/dpaste.js",
|
"build-js": "uglifyjs --compress=\"drop_console=true,ecma=6\" --mangle=\"toplevel\" --output=dpaste/static/dpaste.js client/js/dpaste.js",
|
||||||
"build": "npm run build-css && npm run build-js",
|
"build": "npm run build-css && npm run build-js",
|
||||||
"watch-css": "npm run build && sass --watch --style=compressed client/scss/dpaste.scss:build/dpaste.css",
|
"watch-css": "npm run build && sass --watch --style=compressed client/scss/dpaste.scss:build/dpaste.css",
|
||||||
"watch-docs": "pipenv run sphinx-autobuild -c docs docs docs/_build/html"
|
"watch-docs": "pipenv run sphinx-autobuild -c docs docs docs/_build/html",
|
||||||
|
"release": "npm run build && python setup.py sdist && python setup.py bdist_wheel --universal && printf \"\\n Now run: twine upload dist/* --sign\\n\""
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"sass": "^1.15.2",
|
"sass": "^1.15.2",
|
||||||
|
|
Loading…
Reference in a new issue