Skip to content

Commit 37676d7

Browse files
committed
Add standardjs linter to CI suite
1 parent 53c5554 commit 37676d7

File tree

4 files changed

+88
-37
lines changed

4 files changed

+88
-37
lines changed

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lts/*

.travis.yml

+55-35
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,72 @@
11
language: python
22
sudo: false
3-
dist: trusty
3+
44
cache:
5-
- apt
6-
- pip
5+
- packages
6+
- pip
7+
78
addons:
89
apt:
910
sources:
10-
- google-chrome
11+
- google-chrome
1112
packages:
12-
- google-chrome-stable
13+
- google-chrome-stable
1314
python:
14-
- '3.6'
15+
- "3.6"
1516
env:
1617
global:
17-
- CHROME_DRIVER_VERSION=2.36
18+
- CHROME_DRIVER_VERSION=2.36
1819
matrix:
19-
- DJANGO=111
20-
- DJANGO=20
21-
- DJANGO=21
22-
- DJANGO=master
23-
- TOXENV=qa
20+
- DJANGO=111
21+
- DJANGO=20
22+
- DJANGO=21
23+
- DJANGO=master
24+
- TOXENV=qa
2425
matrix:
2526
fast_finish: true
2627
allow_failures:
27-
- env: DJANGO=master
28+
- env: DJANGO=master
2829
install:
29-
- pip install -qU pip tox codecov
30+
- pip install -qU pip tox codecov
31+
- npm install --dev
3032
before_script:
31-
- mkdir bin
32-
- curl -O https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip
33-
- unzip chromedriver_linux64.zip -d bin
34-
- PATH=$PATH:$PWD/bin
35-
- |
36-
if [[ -z $TOXENV ]]; then
37-
export TOXENV=py$(echo $TRAVIS_PYTHON_VERSION | sed -e 's/\.//g')-dj$DJANGO
38-
fi
39-
- echo $TOXENV
33+
- mkdir bin
34+
- curl -O https://chromedriver.storage.googleapis.com/${CHROME_DRIVER_VERSION}/chromedriver_linux64.zip
35+
- unzip chromedriver_linux64.zip -d bin
36+
- PATH=$PATH:$PWD/bin
37+
- |
38+
if [[ -z $TOXENV ]]; then
39+
export TOXENV=py$(echo $TRAVIS_PYTHON_VERSION | sed -e 's/\.//g')-dj$DJANGO
40+
fi
41+
- echo $TOXENV
4042
script:
41-
- tox -e $TOXENV
42-
after_success:
43-
- codecov
44-
deploy:
45-
provider: pypi
46-
user: codingjoe
47-
password:
48-
secure: OzNShO+N3zL3LIyJ7Fu/TFgJTaI+FlZxLItjPTu5tAfvrxPWmKXJkA7b8znx5O2w0kSynk0R1Ddyd6Ri4AIyS5SGm2ZbvrTyIpaXPvWMBl1o8X/nH14f61HP2piEtnk24FBLTbublgC9N1G4w/166jAwv2dxS9aWJGioAlSOgH8=
49-
on:
50-
tags: true
51-
distributions: sdist bdist_wheel
52-
repo: codingjoe/django-s3file
43+
- tox -e $TOXENV
44+
after_success: codecov
45+
46+
stages:
47+
- test
48+
- name: deploy
49+
if: tag is present
50+
51+
jobs:
52+
include:
53+
- language: node_js
54+
addons: {}
55+
install: npm install --dev
56+
script: npm test
57+
node_js: lts/*
58+
cache: npm
59+
- stage: deploy
60+
python: "3.7"
61+
install: skip
62+
script: skip
63+
after_success: true
64+
deploy:
65+
provider: pypi
66+
distributions: sdist bdist_wheel
67+
on:
68+
tags: true
69+
repo: codingjoe/django-s3file
70+
user: codingjoe
71+
password:
72+
secure: OzNShO+N3zL3LIyJ7Fu/TFgJTaI+FlZxLItjPTu5tAfvrxPWmKXJkA7b8znx5O2w0kSynk0R1Ddyd6Ri4AIyS5SGm2ZbvrTyIpaXPvWMBl1o8X/nH14f61HP2piEtnk24FBLTbublgC9N1G4w/166jAwv2dxS9aWJGioAlSOgH8=

package.json

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "django-s3file",
3+
"version": "1.0.0",
4+
"description": "A lightweight file uploader input for Django and Amazon S3",
5+
"directories": {
6+
"test": "tests"
7+
},
8+
"scripts": {
9+
"test": "standard"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/codingjoe/django-s3file.git"
14+
},
15+
"keywords": [
16+
"aws",
17+
"s3",
18+
"django",
19+
"file"
20+
],
21+
"author": "Johannes Hoppe <[email protected]>",
22+
"license": "MIT",
23+
"bugs": {
24+
"url": "https://github.com/codingjoe/django-s3file/issues"
25+
},
26+
"homepage": "https://github.com/codingjoe/django-s3file#readme",
27+
"dependencies": {
28+
"standard": "*"
29+
}
30+
}

s3file/static/s3file/js/s3file.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
window.uploading += 1
9797
uploadFiles(form, input, input.name)
9898
}
99-
)
99+
)
100100
waitForAllFiles(form)
101101
}
102102

@@ -112,7 +112,7 @@
112112
})
113113
let submitButtons = form.querySelectorAll('input[type=submit], button[type=submit]')
114114
Array.from(submitButtons).forEach(submitButton => {
115-
submitButton.addEventListener('click', clickSubmit)
115+
submitButton.addEventListener('click', clickSubmit)
116116
}
117117
)
118118
})

0 commit comments

Comments
 (0)