Skip to content
This repository was archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Merge pull request #20 from acacode/next-release
Browse files Browse the repository at this point in the history
Next release 3.0.0-alpha.1
  • Loading branch information
js2me authored Jul 22, 2019
2 parents 6d73acb + b52324e commit d983cb6
Show file tree
Hide file tree
Showing 35 changed files with 5,291 additions and 18,431 deletions.
6 changes: 0 additions & 6 deletions .babelrc

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
dist
es
lib
7 changes: 2 additions & 5 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,15 @@ plugins:

globals:
jasmine: true
typeCheck: true
emptyCheck: true

env:
browser: true

rules:
no-var: error
prefer-const: error
prettier/prettier:
- error
- trailingComma: es5
singleQuote: true
semi: false

# TODO: The following rules should be removed incrementally in order to fully
# integrate lint rules from the Standard ESLint config and Prettier
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
# production files
dist
lib
es


# other
node_modules
yarn-error.log
*.log
20 changes: 0 additions & 20 deletions .release-it.json

This file was deleted.

78 changes: 49 additions & 29 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,60 @@

language: node_js
node_js:
- "node"

cache:
yarn: true
directories:
- "node_modules"
- "node_modules"

before_install:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- export PACKAGE_VERSION=$(node -p "require('./package.json').version")
- export NPM_REMOTE_VERSION=$(npm view kinka version)
- export PACKAGE_NAME=$(node -p "require('./package.json').name")
- export BRANCH_IS_TAG=$(node -p "/^([0-9].[0-9].[0-9]+((-(alpha|beta))|))$/.test('${TRAVIS_BRANCH}')")
- export GIT_LOG="$(git log --pretty=format:"* %s (%h)")"
- export PROJECT_NAME="acacode/kinka"
- export RELEASE_BODY=$(node -p "'[Click here to see release changes](https://github.com/$PROJECT_NAME/blob/$TRAVIS_BRANCH/CHANGELOG.md#' + require('./bin/getLatestTag.js') + ')'")

install:
- yarn
script:
- yarn lint
- yarn unit-test
- yarn build
after_success:
- ls -l
- git remote rm origin
- git remote add origin https://js2me:${GITHUB_TOKEN}@github.com/acacode/kinka.git
- git remote set-url origin https://js2me:${GITHUB_TOKEN}@github.com/acacode/kinka.git
- git fetch -p
- git fetch
- git symbolic-ref HEAD refs/heads/${TRAVIS_BRANCH}
- git symbolic-ref HEAD
- git remote show origin
- git status
- if [ ${TRAVIS_BRANCH} = "master" ] && [ "${TRAVIS_PULL_REQUEST}" = "false" ];then
git add dist && git commit -m "build release ${PACKAGE_VERSION} [ci skip]";
git push --set-upstream origin ${TRAVIS_BRANCH};
yarn git-release ${PACKAGE_VERSION};
rm -rf test;
npm publish;
rm -rf dist;
git add dist && git commit -m "remove dist folder [ci skip]";
git push --set-upstream origin ${TRAVIS_BRANCH};
fi
- npm ci

jobs:
include:
- stage: lint
script: npm run lint
- stage: test
script:
- npm run build
- npm run test
- stage: publish
if: env(BRANCH_IS_TAG) != true AND branch = master AND type = push
name: "Create Github Release"
before_deploy:
- git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- git tag $PACKAGE_VERSION -a -m "Generated tag from TravisCI for build $TRAVIS_BUILD_NUMBER from $TRAVIS_BRANCH"
- git push -q https://$GITHUB_TOKEN@github.com/$PROJECT_NAME --tags
- zip -r release.zip dist lib es src index.d.ts LICENSE README.md package.json
- ls -l
deploy:
provider: releases
name: "Release ${PACKAGE_VERSION}"
body: "$RELEASE_BODY"
overwrite: true
skip_cleanup: true
api_key:
secure: ${GITHUB_TOKEN}
file:
- release.zip
on:
all_branches: true
repo: $PROJECT_NAME
after_deploy:
- echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" > .npmrc
- npm publish

notifications:
slack:
rooms:
secure: t9LO6BExYzs4mElFgeeVhoDC01t9tg/L/6extSBqIQmJzvVNQaOMiZh6QYUg9wmnzVU4FqjoVeuMrR7bMrlzek2jvC7bPYHwnWCN86QFcbtnr8IApYhxLWmByDWruxcTbBhkTHzkyBJJboaZXnk0zcJhcsRkFYntUwBo/PTuYnQvZoAh/vQqRDoVQEUa+4dp+W3Muu7TTit06t+T4Qxk4wtoGd1ehVUoi4e/UONa7Ykm4QyQz16vksjz4loHly8aJ6hP4KP89vqksC1bGzn15StvA4YHBvg0PDrHcqGwVHtZUkD72CzKB7C96TFIojej+wh+MDX8SR9GDRpqlKNblCcbm+pObHPkvESC3+w9uZJAyLgoA398zp0sPt3RYZ37Rz+RXUx3Vnlu6t7IM+Bo6q6ZlivmiYKUujoX91cbBiMu2dOXWAtgVV3+qpsskUOEi8cm/O1/kuM/n2pjsgU4AYqE+f2rRNd9OeXHQoEr+j56PqgOcOOGdzOi8IxfpCfVSrrePHvTE534FbAySEbpX+Ulk1nuFzj6ort0DfYKDU8SxFCmfOl42BiCg/T4e5dxP9plpnBHBFJYNqqfcLIu9o2RsXILSAtoawzvrsBN3wxgeFmSJ9dMARODSRNGmeROwBDyT7y03gJcmxYT4UI8DsXkTEBANv/IfinbeBGrMo4=
31 changes: 30 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,35 @@

# CHANGELOG

<!-- TEMPLATE OF NEW VERSION -->

<!--
## [VERSION](https://github.com/acacode/kinka/releases/tag/VERSION)
### Changed
### Fixed
### Added
### Removed
-->

## [3.0.0-alpha.1]

### Fixed
- problem with using IP as baseURL ([issue](https://github.com/acacode/kinka/issues/19))

### Added
- More additional builds and rollup
- `middleware` option for kinka instance
- `.eslintignore` file to ignore production files

### Changed
- Reduced library size (-0.3KB)

### Removed
- `withAuth` property because it is deprecated property
- non promised builds (just use polyfills)
- [Internal] Webpack build


## [2.5.6](https://github.com/acacode/kinka/releases/tag/2.5.6)

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
</p>
</div>

**kinka** it is [most lighter 💨](https://bundlephobia.com/result?p=kinka) and very powerful JavaScript library designed for ajax requests!
**kinka** it is [most lighter 💨](https://bundlephobia.com/result?p=kinka) and very powerful JavaScript library designed for http requests!
It will reduce your http code (which are using [XMLHttpRequests](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest)) and allows do http code more simpler and easy to read.

## 🚀 Installation
Expand Down
19 changes: 19 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
module.exports = {
env: {
build: {
presets: ['@babel/preset-env'],
},
test: {
presets: [
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
},
},
}
20 changes: 0 additions & 20 deletions bin/compare-versions.js

This file was deleted.

16 changes: 16 additions & 0 deletions bin/getLatestTag.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const fs = require('fs')
const path = require('path')

const changelog = fs.readFileSync(path.resolve(__dirname, '../CHANGELOG.md'))
const latestVersionRow = changelog
.toString()
.split(/(\r\n)|(\n)/g)
.filter(
str => str && str.startsWith('## ') && !str.startsWith('## [VERSION]')
)[0]

if (!latestVersionRow) {
throw Error('Nothing any versions in changelog')
}

module.exports = latestVersionRow.split(/\[|\]/g)[1].replace(/\./g, '')
34 changes: 0 additions & 34 deletions bin/spawn-command.js

This file was deleted.

Loading

0 comments on commit d983cb6

Please sign in to comment.