-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use webpack for bundling, add coverage, remove gulp
- Loading branch information
Showing
28 changed files
with
16,793 additions
and
222 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,25 @@ | ||
|
||
{ | ||
"presets": ["es2015"], | ||
"plugins": [["add-module-exports"]] | ||
"presets": [ | ||
["@babel/env", { | ||
"loose": true, | ||
"useBuiltIns": "usage", | ||
"targets": { | ||
"browsers": ["last 2 versions", "safari >= 7", "ie 9"], | ||
"node": "8" | ||
} | ||
}] | ||
], | ||
"plugins": [ | ||
["module-resolver", { | ||
"root": ["./nested_admin/static/nested_admin/src"], | ||
"alias": { | ||
"jquery": "./nested_admin/static/nested_admin/src/nested-admin/jquery.shim.js" | ||
} | ||
}] | ||
], | ||
"env": { | ||
"test": { | ||
"plugins": ["istanbul"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
comment: | ||
require_changes: yes | ||
layout: "header, diff, flags, files, footer" | ||
|
||
coverage: | ||
status: | ||
project: no | ||
patch: no | ||
changes: no | ||
project: | ||
default: off | ||
javascript: | ||
flags: javascript | ||
python: | ||
flags: python | ||
|
||
ignore: | ||
- "nested_admin/tests/**/*.*" | ||
- "nested_admin/tests/*" | ||
|
||
flags: | ||
python: | ||
paths: | ||
- "nested_admin/*.py" | ||
- "nested_admin/**/*.py" | ||
javascript: | ||
paths: | ||
- "nested_admin/**/*.js" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
module.exports = { | ||
'extends': [ | ||
'airbnb-base/legacy', | ||
], | ||
'parserOptions': { | ||
'sourceType': 'module', | ||
'ecmaVersion': 2017, | ||
}, | ||
'env': { | ||
'node': true, | ||
'es6': true, | ||
}, | ||
"rules": { | ||
// The one assertion of personal preference: no spaces before parentheses | ||
// of anonymous functions | ||
'space-before-function-paren': ['error', { | ||
anonymous: 'never', | ||
named: 'never', | ||
asyncArrow: 'always', | ||
}], | ||
// Temporarily disabled rules | ||
// | ||
// no-use-before-define is a good rule, but it would make the diff for | ||
// linting the code even more inscrutible than it already is. | ||
'no-use-before-define': 'off', | ||
// Relax some rules | ||
'no-cond-assign': ['error', 'except-parens'], | ||
'no-unused-vars': ['error', { | ||
'args': 'none', | ||
}], | ||
// Disable some overly-strict airbnb style rules | ||
'no-underscore-dangle': 'off', | ||
'no-param-reassign': 'off', | ||
'class-methods-use-this': 'off', | ||
'function-paren-newline': 'off', | ||
'no-plusplus': 'off', | ||
'object-curly-spacing': 'off', | ||
'no-multi-assign': 'off', | ||
'no-else-return': 'off', | ||
// While technically useless from the point of view of the regex parser, | ||
// escaping characters inside character classes is more consistent. I | ||
// would say that they make the regular expression more readable, if the | ||
// idea of readable regular expressions wasn't absurd on its face. | ||
'no-useless-escape': 'off', | ||
// I'm inclined to reverse this rule to be ['error', 'always'], but not just yet | ||
// IE 8 is a thing of the past and trailing commas are useful. | ||
'comma-dangle': 'off', | ||
}, | ||
'globals': { | ||
'django': false, | ||
'grappelli': false | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,3 +13,7 @@ pip-log.txt | |
*swp | ||
.tox | ||
node_modules | ||
.coverage.* | ||
/.nyc_output | ||
/coverage/ | ||
/nested_admin/tests/static |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,8 @@ matrix: | |
include: | ||
- { python: 2.7, env: TOXENV=py27-dj18 } | ||
- { python: 2.7, env: TOXENV=py27-dj18-grp } | ||
- { python: 2.7, env: TOXENV=py27-dj18-suit } | ||
- { python: 3.4, env: TOXENV=py34-dj18 } | ||
- { python: 2.7, env: TOXENV=py27-dj19 } | ||
- { python: 2.7, env: TOXENV=py27-dj19-grp } | ||
- { python: 3.4, env: TOXENV=py34-dj19 } | ||
- { python: 2.7, env: TOXENV=py27-dj110 } | ||
- { python: 2.7, env: TOXENV=py27-dj110-grp } | ||
- { python: 3.4, env: TOXENV=py34-dj110 } | ||
- { python: 2.7, env: TOXENV=py27-dj111 } | ||
- { python: 2.7, env: TOXENV=py27-dj111-grp } | ||
- { python: 3.6, env: TOXENV=py36-dj111 } | ||
|
@@ -32,11 +27,9 @@ addons: | |
env: | ||
global: | ||
- PATH=$HOME/bin:$PATH | ||
# - BLINKDIFF_BIN=$TRAVIS_BUILD_DIR/node_modules/.bin/blink-diff | ||
- PIXELMATCH_BIN=$TRAVIS_BUILD_DIR/node_modules/.bin/pixelmatch | ||
|
||
before_script: | ||
- if [ "$DATABASE_URL" == "postgres://[email protected]/nested_admin_test" ]; then psql -c "DROP DATABASE IF EXISTS nested_admin_test;" -U postgres; fi | ||
- if [ "$DATABASE_URL" == "postgres://[email protected]/nested_admin_test" ]; then psql -c "create database nested_admin_test;" -U postgres; fi | ||
- mkdir -p ~/bin | ||
- | | ||
if [ ! -e ~/bin/chromedriver ]; then | ||
|
@@ -47,15 +40,25 @@ before_script: | |
chmod +x ~/bin/chromedriver | ||
fi | ||
# before_install: | ||
# - nvm install node | ||
# - nvm use node | ||
# - npm install blink-diff | ||
before_install: | ||
- nvm install node | ||
- nvm use node | ||
- travis_retry travis_retry npm install | ||
- travis_retry travis_retry npm install codecov | ||
- travis_retry travis_retry npm install pixelmatch | ||
- NODE_ENV=test npm run build | ||
|
||
install: | ||
- pip install tox | ||
- pip install tox coverage codecov | ||
|
||
script: | ||
- travis_retry travis_retry travis_retry tox -- --verbosity=3 --selenium=chrome-headless --failfast | ||
- | | ||
travis_retry travis_retry travis_retry tox -- \ | ||
--selenium=chrome-headless \ | ||
--failfast | ||
- npm run report | ||
- npm run codecov | ||
- coverage xml | ||
- codecov -F python | ||
|
||
sudo: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
nested_admin/static/nested_admin/src/nested-admin/jquery.djnutils.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import $ from 'jquery'; | ||
const $ = require('jquery'); | ||
|
||
var prefixCache = {}; | ||
|
||
|
1 change: 1 addition & 0 deletions
1
nested_admin/static/nested_admin/src/nested-admin/jquery.shim.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = window.django.jQuery; |
2 changes: 1 addition & 1 deletion
2
nested_admin/static/nested_admin/src/nested-admin/jquery.ui.djnsortable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
nested_admin/static/nested_admin/src/nested-admin/jquery.ui.nestedsortable.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
nested_admin/static/nested_admin/src/nested-admin/regexquote.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export default function regexQuote(str) { | ||
module.exports = function regexQuote(str) { | ||
return (str+'').replace(/([\.\?\*\+\^\$\[\]\\\(\)\{\}\|\-])/g, '\\$1'); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.