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

Commit 7bba0a5

Browse files
committed
Merge branch 'release/0.7.4'
2 parents 0c28352 + 35e7a51 commit 7bba0a5

37 files changed

+2668
-3273
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015-2016 steffans
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ Add `vue` and `vue-resource` to your `package.json`, then `npm install`, then ad
1212

1313
```js
1414
var Vue = require('vue');
15+
var VueResource = require('vue-resource');
1516

16-
Vue.use(require('vue-resource'));
17+
Vue.use(VueResource);
1718
```
1819

1920
## Documentation
@@ -29,3 +30,7 @@ Details changes for each release are documented in the [release notes](https://g
2930
## Contribution
3031

3132
If you find a bug or want to contribute to the code or documentation, you can help by submitting an [issue](https://github.com/vuejs/vue-resource/issues) or a pull request.
33+
34+
## License
35+
36+
[MIT](http://opensource.org/licenses/MIT)

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vue-resource",
33
"main": "dist/vue-resource.js",
44
"description": "A web request service for Vue.js",
5-
"version": "0.7.3",
5+
"version": "0.7.4",
66
"homepage": "https://github.com/vuejs/vue-resource",
77
"license": "MIT",
88
"ignore": [

build/build.js

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
var fs = require('fs');
2+
var rollup = require('rollup');
3+
var uglify = require('uglify-js');
4+
var babel = require('rollup-plugin-babel');
5+
var package = require('../package.json');
6+
var version = process.env.VERSION || package.version;
7+
var banner =
8+
"/*!\n" +
9+
" * vue-resource v" + version + "\n" +
10+
" * https://github.com/vuejs/vue-resource\n" +
11+
" * Released under the MIT License.\n" +
12+
" */\n";
13+
14+
// Standalone
15+
rollup.rollup({
16+
entry: 'src/index.js',
17+
plugins: [
18+
babel({
19+
presets: ['es2015-rollup']
20+
})
21+
]
22+
})
23+
.then(function (bundle) {
24+
return write('dist/vue-resource.js', bundle.generate({
25+
format: 'umd',
26+
banner: banner,
27+
moduleName: 'VueResource'
28+
}).code);
29+
})
30+
.then(function () {
31+
return write(
32+
'dist/vue-resource.min.js',
33+
banner + '\n' + uglify.minify('dist/vue-resource.js').code
34+
);
35+
})
36+
.catch(logError);
37+
38+
// CommonJS
39+
rollup.rollup({
40+
entry: 'src/index.js',
41+
plugins: [
42+
babel({
43+
presets: ['es2015-rollup']
44+
})
45+
]
46+
})
47+
.then(function (bundle) {
48+
return write('dist/vue-resource.common.js', bundle.generate({
49+
format: 'cjs',
50+
banner: banner
51+
}).code);
52+
});
53+
54+
function write (dest, code) {
55+
return new Promise(function (resolve, reject) {
56+
fs.writeFile(dest, code, function (err) {
57+
if (err) return reject(err);
58+
console.log(blue(dest) + ' ' + getSize(code));
59+
resolve();
60+
});
61+
});
62+
}
63+
64+
function getSize (code) {
65+
return (code.length / 1024).toFixed(2) + 'kb';
66+
}
67+
68+
function logError (e) {
69+
console.log(e);
70+
}
71+
72+
function blue (str) {
73+
return '\x1b[1m\x1b[34m' + str + '\x1b[39m\x1b[22m';
74+
}

build/webpack.build.config.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)