Browse Source

Merge branch 'master' of https://github.com/nthall/watershed

py3-upgrade
noah 2 years ago
parent
commit
059cd5ec01
5 changed files with 18 additions and 15 deletions
  1. +7
    -6
      fabfile.py
  2. +1
    -1
      package.json
  3. +4
    -3
      watershed/settings.py
  4. +4
    -4
      webpack.config.js
  5. +2
    -1
      yarn.lock

+ 7
- 6
fabfile.py View File

@ -4,6 +4,7 @@ from fabric import Connection, task
from invoke import Context
prod = Connection('watershed-prod')
local = Context()
@task
@ -40,7 +41,7 @@ def deploy(remote=prod, migrate=False):
remote.run("pip install -r requirements.txt", echo=True)
remote.run("yarn install", echo=True)
remote.run("webpack --config=webpack.config.js", echo=True)
remote.run("webpack --mode=production --config=webpack.config.js", echo=True)
remote.run("./manage.py collectstatic --noinput", echo=True)
if migrate:
@ -61,18 +62,18 @@ def deploy(remote=prod, migrate=False):
@task
def package_ext():
def package_ext(c=local):
"""
zip the extension. just making sure idk
"""
local = Context()
GIT_SHA = git_hash()
local.run("webpack --browser", echo=True)
local.run("zip -r browser/dist/ browser/releases/extension-{}".format(GIT_SHA))
local.run("webpack --mode=production --browser", echo=True)
with local.cd("browser/dist"):
local.run("zip -r ../releases/extension_{} *".format(GIT_SHA), echo=True)
def git_hash():
local = Context()
return local.run("git rev-parse --short HEAD", echo=True).stdout
return local.run("git rev-parse --short HEAD", echo=True).stdout.rstrip("\n")

+ 1
- 1
package.json View File

@ -32,7 +32,7 @@
"react": "^16.2.0",
"react-dom": "^16.2.0",
"react-fontawesome": "^1.6.1",
"react-soundcloud-widget": "file:../react-soundcloud-widget",
"react-soundcloud-widget": "https://github.com/nthall/react-soundcloud-widget",
"react-youtube": "^7.5.0",
"sass-loader": "^6.0.6",
"style-loader": "^0.20.1",


+ 4
- 3
watershed/settings.py View File

@ -85,18 +85,19 @@ DATABASES = {
}
}
if not DEBUG:
DATABASES['default']['USER'] = 'watershed'
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
TIME_ZONE = 'America/New York'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'frontend'),
)


+ 4
- 4
webpack.config.js View File

@ -8,9 +8,9 @@ const CleanWebpackPlugin = require('clean-webpack-plugin');
module.exports = [
{
name: 'site',
mode: 'development',
// the base directory (absolute path) for resolving the entry option
context: __dirname,
node: false,
// the entry point we created earlier. Note that './' means
// your current directory. You don't have to specify the extension now,
// because you will specify extensions later in the `resolve` section
@ -52,7 +52,7 @@ module.exports = [
loader: 'babel-loader',
query: {
// specify that we will be dealing with React code
presets: ['react', 'env']
presets: ['react', 'babel-preset-env']
}
},
{
@ -75,8 +75,8 @@ module.exports = [
},
{
name: 'browser',
mode: 'development',
context: path.resolve(__dirname, 'browser'),
node: false,
entry: {
background: './src/js/background',
bandcamp: './src/js/bandcamp',
@ -105,7 +105,7 @@ module.exports = [
exclude: /node_modules/,
loader: 'babel-loader',
query: {
presets: ['env']
presets: ['babel-preset-env']
}
}
]


+ 2
- 1
yarn.lock View File

@ -4989,8 +4989,9 @@ react-fontawesome@^1.6.1:
dependencies:
prop-types "^15.5.6"
"react-soundcloud-widget@file:../react-soundcloud-widget":
"react-soundcloud-widget@https://github.com/nthall/react-soundcloud-widget":
version "2.1.1"
resolved "https://github.com/nthall/react-soundcloud-widget#0e8aac5e5003ce2de7fd44f02bd79bccdb252b5a"
dependencies:
load-script "^1.0.0"


Loading…
Cancel
Save