mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Adding project files
This commit is contained in:
@@ -0,0 +1,3 @@
|
|||||||
|
.idea
|
||||||
|
*.iml
|
||||||
|
node_modules
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
module.exports = function(grunt) {
|
||||||
|
require('load-grunt-tasks')(grunt);
|
||||||
|
|
||||||
|
grunt.initConfig({
|
||||||
|
clean: {
|
||||||
|
dist: 'dist/**'
|
||||||
|
},
|
||||||
|
|
||||||
|
update_json: {
|
||||||
|
bower: {
|
||||||
|
src: 'package.json',
|
||||||
|
dest: 'bower.json',
|
||||||
|
fields: [
|
||||||
|
'name',
|
||||||
|
'description',
|
||||||
|
'version',
|
||||||
|
'homepage',
|
||||||
|
'license',
|
||||||
|
'keywords'
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
karma: {
|
||||||
|
options: {
|
||||||
|
configFile: 'karma.conf.js'
|
||||||
|
},
|
||||||
|
single: {
|
||||||
|
singleRun: true
|
||||||
|
},
|
||||||
|
continuous: {
|
||||||
|
singleRun: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
webpack: generateWebpackConfig(),
|
||||||
|
|
||||||
|
watch: {
|
||||||
|
build: {
|
||||||
|
files: ['lib/**/*.js'],
|
||||||
|
tasks: ['build']
|
||||||
|
},
|
||||||
|
test: {
|
||||||
|
files: ['lib/**/*.js', 'specs/**/*.js'],
|
||||||
|
tasks: ['test']
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
grunt.registerTask('test', ['webpack:global', 'karma:single']);
|
||||||
|
grunt.registerTask('build', ['webpack']);
|
||||||
|
grunt.registerTask('publish', ['clean', 'test', 'build', 'update_json']);
|
||||||
|
|
||||||
|
function generateWebpackConfig() {
|
||||||
|
var webpack = require('webpack');
|
||||||
|
var webpackConfig = {};
|
||||||
|
var webpackBase = {
|
||||||
|
entry: './index.js',
|
||||||
|
output: {
|
||||||
|
path: 'dist/',
|
||||||
|
filename: 'axios.js',
|
||||||
|
library: 'axios'
|
||||||
|
},
|
||||||
|
devtool: '#inline-source-map'
|
||||||
|
};
|
||||||
|
|
||||||
|
['amd', 'global'].forEach(function (key) {
|
||||||
|
webpackConfig[key] = JSON.parse(JSON.stringify(webpackBase));
|
||||||
|
webpackConfig[key + '-min'] = JSON.parse(JSON.stringify(webpackBase));
|
||||||
|
webpackConfig[key + '-min'].pugins = [
|
||||||
|
new webpack.optimize.UglifyJsPlugin()
|
||||||
|
];
|
||||||
|
});
|
||||||
|
|
||||||
|
webpackConfig['amd'].output.filename = 'axios.amd.js';
|
||||||
|
webpackConfig['amd'].output.libraryTarget = 'amd';
|
||||||
|
webpackConfig['amd-min'].output.filename = 'axios.amd.min.js';
|
||||||
|
webpackConfig['amd-min'].output.libraryTarget = 'amd';
|
||||||
|
webpackConfig['global-min'].output.filename = 'axios.min.js';
|
||||||
|
|
||||||
|
return webpackConfig;
|
||||||
|
}
|
||||||
|
};
|
||||||
+35
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"name": "axios",
|
||||||
|
"main": "./dist/axios.js",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"homepage": "https://github.com/mzabriskie/axios",
|
||||||
|
"authors": [
|
||||||
|
"Matt Zabriskie"
|
||||||
|
],
|
||||||
|
"description": "Lightweight Promise based XHR library",
|
||||||
|
"moduleType": [
|
||||||
|
"amd",
|
||||||
|
"globals"
|
||||||
|
],
|
||||||
|
"keywords": [
|
||||||
|
"xhr",
|
||||||
|
"http",
|
||||||
|
"ajax",
|
||||||
|
"promise"
|
||||||
|
],
|
||||||
|
"license": "MIT",
|
||||||
|
"ignore": [
|
||||||
|
"**/.*",
|
||||||
|
"*.md",
|
||||||
|
"*.iml",
|
||||||
|
"example",
|
||||||
|
"bower_components",
|
||||||
|
"node_modules",
|
||||||
|
"lib",
|
||||||
|
"specs",
|
||||||
|
"index.js",
|
||||||
|
"karma.conf.js",
|
||||||
|
"Gruntfile.js",
|
||||||
|
"package.json"
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
{
|
||||||
|
"name": "axios",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"description": "Lightweight Promise based XHR library",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "grunt test"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/mzabriskie/axios.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"xhr",
|
||||||
|
"http",
|
||||||
|
"ajax",
|
||||||
|
"promise"
|
||||||
|
],
|
||||||
|
"author": "Matt Zabriskie",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/mzabriskie/axios/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/mzabriskie/axios",
|
||||||
|
"dependencies": {
|
||||||
|
"es6-promise": "^1.0.0"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"grunt": "^0.4.5",
|
||||||
|
"grunt-contrib-clean": "^0.6.0",
|
||||||
|
"grunt-contrib-watch": "^0.6.1",
|
||||||
|
"webpack": "^1.3.3-beta2",
|
||||||
|
"webpack-dev-server": "^1.4.10",
|
||||||
|
"grunt-webpack": "^1.0.8",
|
||||||
|
"load-grunt-tasks": "^0.6.0",
|
||||||
|
"karma": "^0.12.21",
|
||||||
|
"karma-jasmine": "^0.1.5",
|
||||||
|
"grunt-karma": "^0.8.3",
|
||||||
|
"karma-phantomjs-launcher": "^0.1.4",
|
||||||
|
"karma-jasmine-ajax": "^0.1.4",
|
||||||
|
"grunt-update-json": "^0.1.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user