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

Commit 0fe6533

Browse files
author
Steffan
committed
Merge branch 'release/1.3.5'
2 parents d66759e + bab013c commit 0fe6533

File tree

17 files changed

+2460
-982
lines changed

17 files changed

+2460
-982
lines changed

.circleci/config.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
11
version: 2
2+
3+
defaults: &defaults
4+
docker:
5+
- image: circleci/node:8-browsers
6+
environment:
7+
CHROME_BIN: /usr/bin/google-chrome
8+
working_directory: ~/vue-resource
9+
210
jobs:
311
build:
4-
docker:
5-
- image: node:7.9.0
6-
working_directory: ~/vue-resource
12+
<<: *defaults
713
steps:
814
- run:
915
name: Update Environment
10-
command: apt-get update && apt-get -y install unzip
16+
command: echo 'export PATH=$CIRCLE_WORKING_DIRECTORY/node_modules/.bin:$PATH' >> $BASH_ENV
1117
- checkout
18+
- restore_cache:
19+
key: yarn-{{ checksum "yarn.lock" }}
1220
- run:
1321
name: Install Dependencies
14-
command: yarn
22+
command: yarn install --pure-lockfile --cache-folder ~/.yarn
23+
- save_cache:
24+
key: yarn-{{ checksum "yarn.lock" }}
25+
paths:
26+
- ~/.yarn
1527
- run:
1628
name: Run Tests
17-
command: yarn test
29+
command: |
30+
yarn test
31+
karma start test/karma.conf.js --single-run --browsers Chrome
1832
- run:
1933
name: Build Release
20-
command: yarn run build
34+
command: yarn run build

.github/ISSUE_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Thank you!
1212
<!-- BUG REPORT TEMPLATE -->
1313
### Reproduction Link
1414
<!-- A minimal jsfiddle that can reproduce the bug. -->
15-
<!-- You could start with this template: https://jsfiddle.net/qhh7sqc6/ -->
15+
<!-- You could start with this template: https://jsfiddle.net/pjjr7e7m/ -->
1616

1717
### Steps to reproduce
1818
<!-- Incl. which version is used on what browser and device. -->

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# 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)
1+
# 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)
22

33
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.
44

@@ -18,9 +18,9 @@ $ npm install vue-resource
1818
```
1919

2020
### CDN
21-
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).
21+
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).
2222
```html
23-
<script src="https://cdn.jsdelivr.net/npm/[email protected].4"></script>
23+
<script src="https://cdn.jsdelivr.net/npm/[email protected].5"></script>
2424
```
2525

2626
## Example

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-resource",
33
"main": "dist/vue-resource.js",
4-
"version": "1.3.4",
4+
"version": "1.3.5",
55
"description": "The HTTP client for Vue.js",
66
"homepage": "https://github.com/pagekit/vue-resource",
77
"license": "MIT",

build/build.js

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,40 @@ var banner =
1111
" */\n";
1212

1313
rollup.rollup({
14-
entry: 'src/index.js',
14+
input: 'src/index.js',
1515
plugins: [buble()]
1616
})
17-
.then(function (bundle) {
18-
return write('dist/vue-resource.js', bundle.generate({
17+
.then(bundle =>
18+
bundle.generate({
1919
format: 'umd',
2020
banner: banner,
21-
moduleName: 'VueResource'
22-
}).code, bundle);
23-
})
24-
.then(function (bundle) {
25-
var code = fs.readFileSync('dist/vue-resource.js', 'utf8');
26-
return write('dist/vue-resource.min.js',
27-
banner + '\n' + uglify.minify(code).code,
28-
bundle);
29-
})
30-
.then(function (bundle) {
31-
return write('dist/vue-resource.es2015.js', bundle.generate({
21+
name: 'VueResource'
22+
}).then(({code}) => write('dist/vue-resource.js', code, bundle))
23+
)
24+
.then(bundle =>
25+
write('dist/vue-resource.min.js', banner + '\n' +
26+
uglify.minify(read('dist/vue-resource.js')).code,
27+
bundle)
28+
)
29+
.then(bundle =>
30+
bundle.generate({
3231
format: 'es',
3332
banner: banner,
3433
footer: 'export { Url, Http, Resource };'
35-
}).code, bundle);
36-
})
37-
.then(function (bundle) {
38-
return write('dist/vue-resource.common.js', bundle.generate({
34+
}).then(({code}) => write('dist/vue-resource.esm.js', code, bundle))
35+
)
36+
.then(bundle =>
37+
bundle.generate({
3938
format: 'cjs',
4039
banner: banner
41-
}).code, bundle);
42-
})
40+
}).then(({code}) => write('dist/vue-resource.common.js', code, bundle))
41+
)
4342
.catch(logError);
4443

44+
function read(path) {
45+
return fs.readFileSync(path, 'utf8');
46+
}
47+
4548
function write(dest, code, bundle) {
4649
return new Promise(function (resolve, reject) {
4750
fs.writeFile(dest, code, function (err) {

0 commit comments

Comments
 (0)