Update dependencies
This commit is contained in:
parent
564f44f053
commit
7c3b7a1164
13 changed files with 1215 additions and 965 deletions
75
.circleci/config.yml
Normal file
75
.circleci/config.yml
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
version: 2
|
||||
jobs:
|
||||
build-common: &common-build
|
||||
docker:
|
||||
- image: node
|
||||
working_directory: ~/diff2html
|
||||
steps: &common-steps
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "yarn.lock" }}
|
||||
- run: npm install
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- ./node_modules
|
||||
- run: npm run coverage
|
||||
- run: npm run check-coverage
|
||||
|
||||
build-latest: &latest-build
|
||||
docker:
|
||||
- image: node
|
||||
working_directory: ~/diff2html
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
key: dependency-cache-{{ checksum "yarn.lock" }}
|
||||
- run: yarn
|
||||
- save_cache:
|
||||
key: dependency-cache-{{ checksum "yarn.lock" }}
|
||||
paths:
|
||||
- ./node_modules
|
||||
- run: yarn run test
|
||||
- run: yarn run lint
|
||||
- run: yarn run codacy
|
||||
|
||||
build-node_0.12:
|
||||
<<: *common-build
|
||||
docker:
|
||||
- image: node:0.12
|
||||
|
||||
build-node_4:
|
||||
<<: *common-build
|
||||
docker:
|
||||
- image: node:4
|
||||
|
||||
build-node_5:
|
||||
<<: *common-build
|
||||
docker:
|
||||
- image: node:5
|
||||
|
||||
build-node_6:
|
||||
<<: *common-build
|
||||
docker:
|
||||
- image: node:6
|
||||
|
||||
build-node_7:
|
||||
<<: *common-build
|
||||
docker:
|
||||
- image: node:7
|
||||
|
||||
build-node_8:
|
||||
<<: *latest-build
|
||||
docker:
|
||||
- image: node:8
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
build:
|
||||
jobs:
|
||||
- build-node_0.12
|
||||
- build-node_4
|
||||
- build-node_5
|
||||
- build-node_6
|
||||
- build-node_7
|
||||
- build-node_8
|
||||
|
|
@ -8,9 +8,9 @@
|
|||
|
||||
* Before sending a pull request make sure your code is tested.
|
||||
|
||||
* Before sending a pull request for a feature, be sure to run tests with `npm test`.
|
||||
* Before sending a pull request for a feature, be sure to run tests with `yarn test`.
|
||||
|
||||
* Use the same coding style as the rest of the codebase, most of the check can be performed with `npm run style`.
|
||||
* Use the same coding style as the rest of the codebase, most of the check can be performed with `yarn run lint`.
|
||||
|
||||
* Use `git rebase` (not `git merge`) to sync your work from time to time with the master branch.
|
||||
|
||||
|
|
|
|||
|
|
@ -151,13 +151,13 @@ If your favourite language is not included in the default package also add its j
|
|||
|
||||
```html
|
||||
<!-- Stylesheet -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/styles/github.min.css">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="dist/diff2html.css">
|
||||
|
||||
<!-- Javascripts -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.3/jquery.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.6.0/languages/scala.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/scala.min.js"></script>
|
||||
<script type="text/javascript" src="dist/diff2html-ui.js"></script>
|
||||
```
|
||||
|
||||
|
|
|
|||
38
circle.yml
38
circle.yml
|
|
@ -1,38 +0,0 @@
|
|||
machine:
|
||||
node:
|
||||
version: 7
|
||||
dependencies:
|
||||
cache_directories:
|
||||
- ~/nvm
|
||||
- ~/.npm
|
||||
override:
|
||||
- git clean -dfx
|
||||
test:
|
||||
override:
|
||||
- echo "Running tests with node 7.x"
|
||||
- git clean -dfx
|
||||
- nvm install 7 && nvm use 7 && nvm alias default 7
|
||||
- npm install
|
||||
- npm run lint
|
||||
- npm run test
|
||||
- npm run codacy
|
||||
- echo "Running tests with node 6.x"
|
||||
- git clean -dfx
|
||||
- nvm install 6 && nvm use 6 && nvm alias default 6
|
||||
- npm install
|
||||
- npm run test
|
||||
- echo "Running tests with node 5.x"
|
||||
- git clean -dfx
|
||||
- nvm install 5 && nvm use 5 && nvm alias default 5
|
||||
- npm install
|
||||
- npm run test
|
||||
- echo "Running tests with node 4.x"
|
||||
- git clean -dfx
|
||||
- nvm install 4 && nvm use 4 && nvm alias default 4
|
||||
- npm install
|
||||
- npm run test
|
||||
- echo "Running tests with node 0.12.x"
|
||||
- git clean -dfx
|
||||
- nvm install 0.12 && nvm use 0.12 && nvm alias default 0.12
|
||||
- npm install
|
||||
- npm run test
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<!-- Custom styles for this template -->
|
||||
<link href="main.min.css" rel="stylesheet">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/github.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
|
||||
|
||||
<!-- diff2html -->
|
||||
<link rel="stylesheet" type="text/css" href="assets/diff2html.min.css">
|
||||
|
|
@ -240,8 +240,8 @@
|
|||
}
|
||||
</script>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/scala.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/scala.min.js"></script>
|
||||
|
||||
<!-- diff2html -->
|
||||
<script type="text/javascript" src="assets/diff2html.min.js"></script>
|
||||
|
|
|
|||
2
docs/demo.min.js
vendored
2
docs/demo.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
docs/main.min.css
vendored
2
docs/main.min.css
vendored
File diff suppressed because one or more lines are too long
28
package.json
28
package.json
|
|
@ -40,14 +40,14 @@
|
|||
"release-website": "./scripts/release-website.sh",
|
||||
"release-bower": "./scripts/update-bower-version.sh",
|
||||
"templates": "./scripts/hulk.js --wrapper node --variable 'browserTemplates' ./src/templates/*.mustache > ./src/templates/diff2html-templates.js",
|
||||
"style": "npm run lint",
|
||||
"style": "yarn run lint",
|
||||
"lint": "eslint .",
|
||||
"coverage": "istanbul cover _mocha -- -u exports -R spec ./test/**/*",
|
||||
"check-coverage": "istanbul check-coverage --statements 90 --functions 90 --branches 85 --lines 90 ./coverage/coverage.json",
|
||||
"test": "npm run coverage && npm run check-coverage",
|
||||
"test": "yarn run coverage && yarn run check-coverage",
|
||||
"codacy": "cat ./coverage/lcov.info | codacy-coverage",
|
||||
"preversion": "npm run release && npm run release-website && npm run lint && npm test",
|
||||
"version": "npm run release-bower && git add -A src dist docs package.json bower.json",
|
||||
"preversion": "yarn run release && yarn run release-website && yarn run lint && yarn test",
|
||||
"version": "yarn run release-bower && git add -A src dist docs package.json bower.json",
|
||||
"postversion": "git push && git push --tags"
|
||||
},
|
||||
"main": "./src/diff2html.js",
|
||||
|
|
@ -55,25 +55,25 @@
|
|||
"fs": false
|
||||
},
|
||||
"dependencies": {
|
||||
"diff": "^3.2.0",
|
||||
"diff": "^3.3.1",
|
||||
"hogan.js": "^3.0.2",
|
||||
"whatwg-fetch": "^2.0.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^6.7.7",
|
||||
"browserify": "^14.1.0",
|
||||
"clean-css-cli": "^4.0.9",
|
||||
"codacy-coverage": "^2.0.1",
|
||||
"eslint": "^3.18.0",
|
||||
"autoprefixer": "^7.1.4",
|
||||
"browserify": "^14.4.0",
|
||||
"clean-css-cli": "^4.1.10",
|
||||
"codacy-coverage": "^2.0.3",
|
||||
"eslint": "^4.8.0",
|
||||
"eslint-plugin-promise": "^3.5.0",
|
||||
"eslint-plugin-standard": "^2.1.1",
|
||||
"eslint-plugin-standard": "^3.0.1",
|
||||
"fast-html-parser": "^1.0.1",
|
||||
"istanbul": "^0.4.5",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mocha": "^3.2.0",
|
||||
"mocha": "^3.5.3",
|
||||
"nopt": "^4.0.1",
|
||||
"postcss-cli": "^3.0.0",
|
||||
"uglifyjs": "^2.4.10"
|
||||
"postcss-cli": "^4.1.1",
|
||||
"uglify-js": "^3.1.2"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ postcss --use autoprefixer -o ${OUTPUT_CSS_FILE} ${INPUT_CSS_FILE}
|
|||
cleancss --advanced --compatibility=ie8 -o ${OUTPUT_MIN_CSS_FILE} ${OUTPUT_CSS_FILE}
|
||||
|
||||
echo "Pre-compile hogan.js templates"
|
||||
npm run templates
|
||||
yarn run templates
|
||||
|
||||
echo "Generating js aggregation file in ${OUTPUT_JS_FILE}"
|
||||
browserify -e ${INPUT_JS_FILE} -o ${OUTPUT_JS_FILE}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/styles/github.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/github.min.css">
|
||||
|
||||
<!-- diff2html -->
|
||||
<link rel="stylesheet" type="text/css" href="assets/diff2html.min.css">
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.9.0/languages/scala.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/scala.min.js"></script>
|
||||
|
||||
<!-- diff2html -->
|
||||
<script type="text/javascript" src="assets/diff2html.min.js"></script>
|
||||
|
|
|
|||
Loading…
Reference in a new issue