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/0.7.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
steffans committed Jun 12, 2016
2 parents 0c28352 + 35e7a51 commit 7bba0a5
Show file tree
Hide file tree
Showing 37 changed files with 2,668 additions and 3,273 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2015-2016 steffans

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ Add `vue` and `vue-resource` to your `package.json`, then `npm install`, then ad

```js
var Vue = require('vue');
var VueResource = require('vue-resource');

Vue.use(require('vue-resource'));
Vue.use(VueResource);
```

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

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.

## License

[MIT](http://opensource.org/licenses/MIT)
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vue-resource",
"main": "dist/vue-resource.js",
"description": "A web request service for Vue.js",
"version": "0.7.3",
"version": "0.7.4",
"homepage": "https://github.com/vuejs/vue-resource",
"license": "MIT",
"ignore": [
Expand Down
74 changes: 74 additions & 0 deletions build/build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
var fs = require('fs');
var rollup = require('rollup');
var uglify = require('uglify-js');
var babel = require('rollup-plugin-babel');
var package = require('../package.json');
var version = process.env.VERSION || package.version;
var banner =
"/*!\n" +
" * vue-resource v" + version + "\n" +
" * https://github.com/vuejs/vue-resource\n" +
" * Released under the MIT License.\n" +
" */\n";

// Standalone
rollup.rollup({
entry: 'src/index.js',
plugins: [
babel({
presets: ['es2015-rollup']
})
]
})
.then(function (bundle) {
return write('dist/vue-resource.js', bundle.generate({
format: 'umd',
banner: banner,
moduleName: 'VueResource'
}).code);
})
.then(function () {
return write(
'dist/vue-resource.min.js',
banner + '\n' + uglify.minify('dist/vue-resource.js').code
);
})
.catch(logError);

// CommonJS
rollup.rollup({
entry: 'src/index.js',
plugins: [
babel({
presets: ['es2015-rollup']
})
]
})
.then(function (bundle) {
return write('dist/vue-resource.common.js', bundle.generate({
format: 'cjs',
banner: banner
}).code);
});

function write (dest, code) {
return new Promise(function (resolve, reject) {
fs.writeFile(dest, code, function (err) {
if (err) return reject(err);
console.log(blue(dest) + ' ' + getSize(code));
resolve();
});
});
}

function getSize (code) {
return (code.length / 1024).toFixed(2) + 'kb';
}

function logError (e) {
console.log(e);
}

function blue (str) {
return '\x1b[1m\x1b[34m' + str + '\x1b[39m\x1b[22m';
}
67 changes: 0 additions & 67 deletions build/webpack.build.config.js

This file was deleted.

Loading

0 comments on commit 7bba0a5

Please sign in to comment.