Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
weiq committed Dec 24, 2017
0 parents commit 670d418
Show file tree
Hide file tree
Showing 8 changed files with 8,570 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"parser": "babel-eslint"
}
25 changes: 25 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build
lib
/es/

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*


6 changes: 6 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// 将设置放入此文件中以覆盖默认值和用户设置。
{
"editor.tabSize": 2,
"editor.renderIndentGuides": true,
"eslint.enable": true
}
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# common-api

公共的方法和请求封装.
47 changes: 47 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"name": "cmn-utils",
"version": "0.0.4",
"description": "common func & req",
"keywords": [
"react",
"util"
],
"files": [
"lib",
"es"
],
"main": "./lib",
"repository": "https://github.com/LANIF-UI/cmn-utils.git",
"license": "MIT",
"config": {
"port": 8000
},
"scripts": {
"build": "rc-tools run build",
"compile": "rc-tools run compile",
"pub": "rc-tools run pub --babel-runtime",
"lint": "rc-tools run lint",
"test": "jest",
"coverage": "jest --coverage"
},
"jest": {
"collectCoverageFrom": [
"src/*"
],
"transform": {
"\\.tsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js",
"\\.jsx?$": "./node_modules/rc-tools/scripts/jestPreprocessor.js"
}
},
"pre-commit": [
"lint"
],
"devDependencies": {
"jest": "^22.0.3",
"rc-tools": "^7.0.6",
"pre-commit": "1.x"
},
"dependencies": {
"whatwg-fetch": "^2.0.3"
}
}
3 changes: 3 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default () => {
return "ok";
}
9 changes: 9 additions & 0 deletions tests/index.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const text = require('../src/index');

describe('common-api', () => {
it('works', () => {
const ret = text();
expect(ret).toEqual("ok");
});

});
Loading

0 comments on commit 670d418

Please sign in to comment.