Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

Commit

Permalink
Merge branch 'release/1.3.5'
Browse files Browse the repository at this point in the history
  • Loading branch information
Steffan committed Dec 20, 2017
2 parents d66759e + bab013c commit 0fe6533
Show file tree
Hide file tree
Showing 17 changed files with 2,460 additions and 982 deletions.
28 changes: 21 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
version: 2

defaults: &defaults
docker:
- image: circleci/node:8-browsers
environment:
CHROME_BIN: /usr/bin/google-chrome
working_directory: ~/vue-resource

jobs:
build:
docker:
- image: node:7.9.0
working_directory: ~/vue-resource
<<: *defaults
steps:
- run:
name: Update Environment
command: apt-get update && apt-get -y install unzip
command: echo 'export PATH=$CIRCLE_WORKING_DIRECTORY/node_modules/.bin:$PATH' >> $BASH_ENV
- checkout
- restore_cache:
key: yarn-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn
command: yarn install --pure-lockfile --cache-folder ~/.yarn
- save_cache:
key: yarn-{{ checksum "yarn.lock" }}
paths:
- ~/.yarn
- run:
name: Run Tests
command: yarn test
command: |
yarn test
karma start test/karma.conf.js --single-run --browsers Chrome
- run:
name: Build Release
command: yarn run build
command: yarn run build
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Thank you!
<!-- BUG REPORT TEMPLATE -->
### Reproduction Link
<!-- A minimal jsfiddle that can reproduce the bug. -->
<!-- You could start with this template: https://jsfiddle.net/qhh7sqc6/ -->
<!-- You could start with this template: https://jsfiddle.net/pjjr7e7m/ -->

### Steps to reproduce
<!-- Incl. which version is used on what browser and device. -->
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# vue-resource [![Version](https://img.shields.io/npm/v/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![License](https://img.shields.io/npm/l/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![Downloads](https://img.shields.io/npm/dt/vue-resource.svg)](https://www.npmjs.com/package/vue-resource)
# vue-resource [![Build](https://img.shields.io/circleci/project/pagekit/vue-resource/develop.svg)](https://circleci.com/gh/pagekit/vue-resource) [![Downloads](https://img.shields.io/npm/dm/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![Version](https://img.shields.io/npm/v/vue-resource.svg)](https://www.npmjs.com/package/vue-resource) [![License](https://img.shields.io/npm/l/vue-resource.svg)](https://www.npmjs.com/package/vue-resource)

The plugin for [Vue.js](http://vuejs.org) provides services for making web requests and handle responses using a [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) or JSONP.

Expand All @@ -18,9 +18,9 @@ $ npm install vue-resource
```

### CDN
Available on [jsdelivr](https://cdn.jsdelivr.net/npm/[email protected].4), [unpkg](https://unpkg.com/[email protected].4) or [cdnjs](https://cdnjs.com/libraries/vue-resource).
Available on [jsdelivr](https://cdn.jsdelivr.net/npm/[email protected].5), [unpkg](https://unpkg.com/[email protected].5) or [cdnjs](https://cdnjs.com/libraries/vue-resource).
```html
<script src="https://cdn.jsdelivr.net/npm/[email protected].4"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected].5"></script>
```

## Example
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vue-resource",
"main": "dist/vue-resource.js",
"version": "1.3.4",
"version": "1.3.5",
"description": "The HTTP client for Vue.js",
"homepage": "https://github.com/pagekit/vue-resource",
"license": "MIT",
Expand Down
43 changes: 23 additions & 20 deletions build/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,37 +11,40 @@ var banner =
" */\n";

rollup.rollup({
entry: 'src/index.js',
input: 'src/index.js',
plugins: [buble()]
})
.then(function (bundle) {
return write('dist/vue-resource.js', bundle.generate({
.then(bundle =>
bundle.generate({
format: 'umd',
banner: banner,
moduleName: 'VueResource'
}).code, bundle);
})
.then(function (bundle) {
var code = fs.readFileSync('dist/vue-resource.js', 'utf8');
return write('dist/vue-resource.min.js',
banner + '\n' + uglify.minify(code).code,
bundle);
})
.then(function (bundle) {
return write('dist/vue-resource.es2015.js', bundle.generate({
name: 'VueResource'
}).then(({code}) => write('dist/vue-resource.js', code, bundle))
)
.then(bundle =>
write('dist/vue-resource.min.js', banner + '\n' +
uglify.minify(read('dist/vue-resource.js')).code,
bundle)
)
.then(bundle =>
bundle.generate({
format: 'es',
banner: banner,
footer: 'export { Url, Http, Resource };'
}).code, bundle);
})
.then(function (bundle) {
return write('dist/vue-resource.common.js', bundle.generate({
}).then(({code}) => write('dist/vue-resource.esm.js', code, bundle))
)
.then(bundle =>
bundle.generate({
format: 'cjs',
banner: banner
}).code, bundle);
})
}).then(({code}) => write('dist/vue-resource.common.js', code, bundle))
)
.catch(logError);

function read(path) {
return fs.readFileSync(path, 'utf8');
}

function write(dest, code, bundle) {
return new Promise(function (resolve, reject) {
fs.writeFile(dest, code, function (err) {
Expand Down
Loading

0 comments on commit 0fe6533

Please sign in to comment.