Skip to content

Commit

Permalink
Ship compiled static files with Pypi package. #125
Browse files Browse the repository at this point in the history
  • Loading branch information
bartTC committed Jul 12, 2019
1 parent e945a8a commit 7acfa1f
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.coverage
build
docs/_build
dpaste/settings/local.py
dpaste/static/
dpaste.egg-info
dpaste.db
node_modules
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -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)
----------------

Expand Down
6 changes: 6 additions & 0 deletions docs/standalone_installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down
2 changes: 0 additions & 2 deletions dpaste/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
'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',
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 7acfa1f

Please sign in to comment.