Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ module.exports = {
rules: {
'no-unused-vars': 2,
'@typescript-eslint/no-unused-vars': 'off',
'@typescript-eslint/no-var-requires': 'off',
},
},
],
Expand Down
12 changes: 12 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
###################################################
# normalize line endings
###################################################
* text=auto

# source files
*.ts eol=lf
*.vue eol=lf

# windows files
*.bat eol=crlf
*.cmd eol=crlf
4 changes: 4 additions & 0 deletions .github_changelog_generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
user=eidng8
project=vue-tree
unreleased=false
since-tag=0.0.25-2020.04.16-4b5ea82
124 changes: 77 additions & 47 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,86 @@
os: linux
dist: bionic
language: node_js
node_js: 12
branches:
only:
- master
- dev
os:
- linux
language: node_js
node_js:
- 12
addons:
chrome: stable

cache:
directories:
- node_modules
install:
- npm install

before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- if [[ ${BUNDLE_ANALYZER_TOKEN} != "" ]]; then npm install --no-save @bundle-analyzer/webpack-plugin; fi
- npm run test:unit -- --coverage
- npm install coveralls
- cat ./coverage/lcov.info | coveralls
- npm run test:e2e
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || echo code climate error is ignored.
jobs:
include:
- stage: test
os: windows
addons:
chrome: stable
install:
- npm install
script:
- npm run test:unit

- stage: test
os: osx
addons:
chrome: stable
install:
- npm install
script:
- npm run test:unit

- stage: test
os: linux
env:
- secure: JZhvhE5uAXC1+WL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PZMmKzLKAjlSZAQksj2F2XX+PDhEqAhmQZcCU2ln4yDIJrAzODYIZIYwS4J8vtiOkrLfiiHQQNLB69TB6/dOD5Byyvf1UMdbA62VC2mXto5osATZOIQP9hHoWuvFWXFSHh+WBghHXc4HeYMvefUV4BsJ+mKLLhBq07DEml5+YF63psp++MtgZAixdGP8pSe36R2UWC5MwP8m1XI9x+OEmb589gaJv+gd3dIx9l6wbWan6YKaXlhRgv+OLCWLYdlmMG2g1Brc=
addons:
chrome: stable
install:
- npm install
before_script:
- npm install --no-save coveralls
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- npm run test:unit -- --coverage
- npm run test:e2e
after_script:
- cat ./coverage/lcov.info | coveralls
- ./cc-test-reporter after-build --exit-code ${TRAVIS_TEST_RESULT}

- stage: deploy
os: linux
script: skip
before_deploy:
- npm install
- npm install --no-save @bundle-analyzer/webpack-plugin
- npm run build
- export PACKAGE=$(npm pack --silent)
deploy:
provider: releases
edge: true
file: ${PACKAGE}
token:
secure: Z4+zHdz07/2oO6QPIeSk/ZaS8+QwldjYPc0iRPIF/6N0Cww35EIMvtEm/tLMyZcw8kYJHAdh9v7q/bNrBwCdhmZ7/8d4qk8cFfqhxjWfA/8EnA8Juo+5+3gkUpYPukcNtDlaei3l++96k3sQ4FyYxuEpY3lWGzFwJggWA+LQGVebGKDreFnVytEr8DeXnOUhCamN39uv8xqrbJufvp+3vWNXu4PwRd5R7N+HqoZGPIQMa8rJwbPhW2cJF4bQoy7ZNzhh6/C0UbhEG9ykBWy/9VXIjxq46RJcWXVSq0dUEhhGWn34F5OZqDxOElPDzntXpunbNb1HnDFCw/hWy4BhDTlNI7DLhFc1R4+PRfd0c0lY1flHt/Xza5O4kV7P24bhZHuf8qVQyWjBg6mf+AOON88k7ewPyqKbkYphoeGdG0AktMcJ3CMbsKvgYtp/+K0mVtPsrgrFkJrXK9vgUazhBlkeq8PRxOrkTP9XeazZR6WzE7tJAmd612Q8Ij7zC1KNyXD1OCoFUs5KkjVD0vx7dM5jafWjhd3GWTegGJgQ/OOecXbfsigvwbSeaMN9Mh9RP8XrKXV8ajj7QeqhHOCzBtt4OukhjXXoU24BK3/Lak/WznKbrnVdtEORlU0jPcnXJvKrMrsRjeHQOeqZOTs4Mgt2GXcKGnzvTbsZVyceMZI=
on:
repo: eidng8/vue-tree
branch: master
tags: true

before_deploy:
- export TRAVIS_TAG=${TRAVIS_TAG:-$(node -p "require('./package.json').version")-$(date +'%Y.%m.%d')-$(git log --format=%h -1)}
- echo ${TRAVIS_TAG}
- 'if [[ ${TAGGED} != 1 ]]; then git tag ${TRAVIS_TAG} && export TAGGED=1; fi'
- 'if [[ ! -e dist ]]; then npm run build && export PACKAGE=$(npm pack --silent); fi'
deploy:
- provider: releases
skip_cleanup: true
file: $PACKAGE
api_key:
secure: Z4+zHdz07/2oO6QPIeSk/ZaS8+QwldjYPc0iRPIF/6N0Cww35EIMvtEm/tLMyZcw8kYJHAdh9v7q/bNrBwCdhmZ7/8d4qk8cFfqhxjWfA/8EnA8Juo+5+3gkUpYPukcNtDlaei3l++96k3sQ4FyYxuEpY3lWGzFwJggWA+LQGVebGKDreFnVytEr8DeXnOUhCamN39uv8xqrbJufvp+3vWNXu4PwRd5R7N+HqoZGPIQMa8rJwbPhW2cJF4bQoy7ZNzhh6/C0UbhEG9ykBWy/9VXIjxq46RJcWXVSq0dUEhhGWn34F5OZqDxOElPDzntXpunbNb1HnDFCw/hWy4BhDTlNI7DLhFc1R4+PRfd0c0lY1flHt/Xza5O4kV7P24bhZHuf8qVQyWjBg6mf+AOON88k7ewPyqKbkYphoeGdG0AktMcJ3CMbsKvgYtp/+K0mVtPsrgrFkJrXK9vgUazhBlkeq8PRxOrkTP9XeazZR6WzE7tJAmd612Q8Ij7zC1KNyXD1OCoFUs5KkjVD0vx7dM5jafWjhd3GWTegGJgQ/OOecXbfsigvwbSeaMN9Mh9RP8XrKXV8ajj7QeqhHOCzBtt4OukhjXXoU24BK3/Lak/WznKbrnVdtEORlU0jPcnXJvKrMrsRjeHQOeqZOTs4Mgt2GXcKGnzvTbsZVyceMZI=
on:
repo: eidng8/vue-tree
branch: master
#tags: true
condition: ${TRAVIS_EVENT_TYPE} == push
- provider: npm
skip_cleanup: true
email: cheung.jackey@gmail.com
api_key:
secure: 2mIMc5dD88yzeeAhV1D8uTFJIJhYKgTMPH36K3HbLvMHUtSYRQBOob9H075iEsQ3Ta1Liuk27T93Q0atVsybUj1ufWo0Hzal0iYd4s1aj08hTsiIahD0EPf+dmSRaUELXqjFofXgboRugpxDeyTvOjCTjKT+eF3c1c+X7AFiPMmVzLJmx3eFRb8y3F9yUJ5nVz8NyvjJzv6Me6sf59O8a04awqL9okaSmJcdj79/7lkUzWAQ00LNKHXU+eP5C65VMciqu02PCRIk+C2nNOfw7IH5cRW3ZPzngPu6HAPgeUP0CloRU8yM8qU1LF9A/1IE09fRvctZnOCR2zt3EigmrmWVPPqiYBy2G95NQCJfGlAfynWVl+r/aMHmtABb818OBUyOXBxhEISrW9jJVm3z1N4gqYr+/Yfc62jkCGwUQHhDBOgOuNQv+G/8dN/FzRqRbCm/rXLcP4HaRfFu+CDkf+MFKu5jF5R7QFydRG3XVCOv73mpt/AFewJUJs7+IY/jPQ7J4JMeVhDYo3l31iC1mPE4+ylk9skq6Ss5v17N7/uahE8odV9tUyx0vDUTXfzjtIp6EH+y59HFNHn6dO2wAnQyozGvcDiQazt8jgcEcEAsRiVjrfVYO+UxBLTV2keXkvE4rzdAJZXJZblwRuyC5yFmBlUNGY38bpVBZZYTB+g=
on:
repo: eidng8/vue-tree
branch: master
condition: ${TRAVIS_EVENT_TYPE} == push
#tags: true
- stage: deploy
os: linux
script: skip
deploy:
provider: npm
edge: true
email: cheung.jackey@gmail.com
api_token:
secure: 2mIMc5dD88yzeeAhV1D8uTFJIJhYKgTMPH36K3HbLvMHUtSYRQBOob9H075iEsQ3Ta1Liuk27T93Q0atVsybUj1ufWo0Hzal0iYd4s1aj08hTsiIahD0EPf+dmSRaUELXqjFofXgboRugpxDeyTvOjCTjKT+eF3c1c+X7AFiPMmVzLJmx3eFRb8y3F9yUJ5nVz8NyvjJzv6Me6sf59O8a04awqL9okaSmJcdj79/7lkUzWAQ00LNKHXU+eP5C65VMciqu02PCRIk+C2nNOfw7IH5cRW3ZPzngPu6HAPgeUP0CloRU8yM8qU1LF9A/1IE09fRvctZnOCR2zt3EigmrmWVPPqiYBy2G95NQCJfGlAfynWVl+r/aMHmtABb818OBUyOXBxhEISrW9jJVm3z1N4gqYr+/Yfc62jkCGwUQHhDBOgOuNQv+G/8dN/FzRqRbCm/rXLcP4HaRfFu+CDkf+MFKu5jF5R7QFydRG3XVCOv73mpt/AFewJUJs7+IY/jPQ7J4JMeVhDYo3l31iC1mPE4+ylk9skq6Ss5v17N7/uahE8odV9tUyx0vDUTXfzjtIp6EH+y59HFNHn6dO2wAnQyozGvcDiQazt8jgcEcEAsRiVjrfVYO+UxBLTV2keXkvE4rzdAJZXJZblwRuyC5yFmBlUNGY38bpVBZZYTB+g=
on:
repo: eidng8/vue-tree
branch: master
tags: true
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Changelog

\* _This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)_
64 changes: 34 additions & 30 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "g8-vue-tree",
"version": "0.0.25",
"version": "0.0.26",
"description": "A Vue.js tree view component with stable DOM tree.",
"repository": "git@github.com:eidng8/vue-tree.git",
"bugs": "git@github.com:eidng8/vue-tree/issues",
Expand Down Expand Up @@ -46,7 +46,7 @@
"@vue/eslint-config-standard": "^5.1.0",
"@vue/eslint-config-typescript": "^5.0.1",
"@vue/test-utils": "1.0.0-beta.31",
"chromedriver": "80",
"chromedriver": "latest",
"core-js": "^3.6.4",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.10.1",
Expand All @@ -56,7 +56,7 @@
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^6.1.2",
"geckodriver": "^1.19.1",
"geckodriver": "latest",
"husky": "^4.2.5",
"prettier": "2.0.4",
"pretty-data": "^0.40.0",
Expand All @@ -68,7 +68,8 @@
"vue-class-component": "^7.2.2",
"vue-docgen-cli": "^4.16.0",
"vue-property-decorator": "^8.3.0",
"vue-template-compiler": "^2.6.11"
"vue-template-compiler": "^2.6.11",
"webpack-bundle-analyzer": "^3.7.0"
},
"peerDependencies": {
"vue": "^2.6.11"
Expand Down
15 changes: 15 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

# we have multiple deployment jobs
# we just need to build the package only once
[[ "${PACKAGE}" != '' ]] && exit 0

# setup bundle-analyzer
npm install --no-save @bundle-analyzer/webpack-plugin

npm run build || exit 1

# set's the environment variable to indicate the package has been built
# this variable is also used by github deployment
export PACKAGE=$(npm pack --silent)

14 changes: 14 additions & 0 deletions scripts/make-release-note.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
const fs = require('fs');
const path = require('path');

const log = path.resolve(path.join(__dirname, '../CHANGELOG.md'));
const text = fs.readFileSync(log).toString('utf-8');
const matches = /## \[.+?## \[/ms.exec(text);
if (!matches || !matches.length || !matches[0] || !matches[0].length) return;

const match = matches[0];
const note = path.resolve(path.join(__dirname, '../RELEASE.md'));
fs.writeFileSync(note, match.substr(0, match.length - 4), {
encoding: 'utf-8',
flag: 'w+',
});
35 changes: 35 additions & 0 deletions scripts/release.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF
SETLOCAL EnableDelayedExpansion

cd /d "%~dp0"
cd ..

for /f %%i in ('git rev-parse --abbrev-ref HEAD') do set BRANCH=%%i
if not "%BRANCH%"=="master" (
echo You are not on master branch.
goto ERR
)

git reset --hard --quiet
git clean -fdx --quiet
git pull
bash.exe -lc github_changelog_generator
node scripts\make-release-note.js
git add CHANGELOG.md
git add RELEASE.md
git commit -m "update changelog [ci skip]"
git push

set RELEASE=%1
if "%RELEASE%"=="" set RELEASE=patch
npm version "%RELEASE%"
git push --follow-tags

goto END


:ERR
pause
exit 1

:END
Loading