diff --git a/.gitignore b/.gitignore index f39226a..c3430d7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ .coverage -build docs/_build dpaste/settings/local.py +dpaste/static/ dpaste.egg-info dpaste.db node_modules diff --git a/CHANGELOG.rst b/CHANGELOG.rst index b6babe9..a16ee20 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,12 @@ 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) ---------------- diff --git a/docs/standalone_installation.rst b/docs/standalone_installation.rst index d3e72ba..2949bef 100644 --- a/docs/standalone_installation.rst +++ b/docs/standalone_installation.rst @@ -23,6 +23,12 @@ Python dependencies. $ cd dpaste/ $ 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 # the static files (JS/CSS). diff --git a/dpaste/settings/base.py b/dpaste/settings/base.py index 30d8392..ba4f98a 100644 --- a/dpaste/settings/base.py +++ b/dpaste/settings/base.py @@ -64,8 +64,6 @@ STATICFILES_STORAGE = ( 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' ) -STATICFILES_DIRS = (os.path.join(PROJECT_DIR, 'build'),) - STATICFILES_FINDERS = ( 'django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', diff --git a/package.json b/package.json index 23159f0..d8be12a 100644 --- a/package.json +++ b/package.json @@ -7,11 +7,12 @@ "postinstall": "npm run build", "start": "npm run build && pipenv run ./manage.py runserver", "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-js": "uglifyjs --compress=\"drop_console=true,ecma=6\" --mangle=\"toplevel\" --output=build/dpaste.js client/js/dpaste.js", + "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=dpaste/static/dpaste.js client/js/dpaste.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-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": { "sass": "^1.15.2",