Skip to content
This repository has been archived by the owner on Feb 6, 2022. It is now read-only.

Commit

Permalink
Init
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Demedes committed Sep 2, 2019
0 parents commit c92cdec
Show file tree
Hide file tree
Showing 24 changed files with 2,498 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = tab
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.yml]
indent_style = space
indent_size = 2
20 changes: 20 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,20 @@
name: Test

on: [push]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [8.x, 10.x, 12.x]
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- run: npm test
env:
CI: true
9 changes: 9 additions & 0 deletions .gitignore
@@ -0,0 +1,9 @@
*.log
.DS_Store
node_modules
.cache
.rts2_cache_cjs
.rts2_cache_esm
.rts2_cache_umd
dist
.rpt2_cache
1 change: 1 addition & 0 deletions .npmrc
@@ -0,0 +1 @@
package-lock=false
112 changes: 112 additions & 0 deletions package.json
@@ -0,0 +1,112 @@
{
"name": "draqula",
"version": "0.0.0",
"main": "dist/index.js",
"module": "dist/draqula.esm.js",
"typings": "dist/index.d.ts",
"files": [
"dist"
],
"scripts": {
"build": "rollup -c",
"dev": "rollup -cw",
"test": "npm run build && xo && ava"
},
"peerDependencies": {
"react": ">=16",
"graphql": ">=14"
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"prettier": {
"printWidth": 120,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"useTabs": true,
"bracketSpacing": false
},
"dependencies": {
"@sindresorhus/fnv1a": "^1.2.0",
"@types/graphql": "^14.2.3",
"abort-controller": "^3.0.0",
"dependency-graph": "^0.8.0",
"emittery": "^0.4.1",
"ky": "^0.12.0",
"ky-universal": "^0.3.0",
"lodash": "^4.17.15",
"p-retry": "^4.1.0"
},
"devDependencies": {
"@babel/core": "^7.5.5",
"@babel/preset-react": "^7.0.0",
"@testing-library/react-hooks": "^2.0.1",
"@types/lodash": "^4.14.137",
"@types/react": "^16.9.2",
"@typescript-eslint/eslint-plugin": "^2.0.0",
"@typescript-eslint/parser": "^2.0.0",
"ava": "^2.3.0",
"babel-plugin-lodash": "^3.3.4",
"eslint-config-xo-react": "^0.20.0",
"eslint-config-xo-typescript": "^0.17.0",
"eslint-plugin-react": "^7.14.3",
"eslint-plugin-react-hooks": "^2.0.1",
"graphql-tag": "^2.10.1",
"husky": "^3.0.4",
"nock": "^10.0.6",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1",
"react": "^16.9.0",
"react-test-renderer": "^16.9.0",
"rollup": "^1.19.4",
"rollup-plugin-babel": "^4.3.3",
"rollup-plugin-typescript2": "^0.22.1",
"typescript": "^3.5.3",
"xo": "^0.24.0"
},
"ava": {
"serial": true,
"babel": {
"testOptions": {
"presets": [
"@babel/preset-react"
]
}
}
},
"xo": {
"extends": [
"xo-react",
"xo-typescript"
],
"extensions": [
"ts",
"tsx",
"js"
],
"ignore": [
"rollup.config.js",
"test"
],
"rules": {
"unicorn/filename-case": 0,
"generator-star-spacing": 0,
"lines-between-class-members": 0,
"react/prop-types": 0,
"@typescript-eslint/promise-function-async": 0,
"@typescript-eslint/member-naming": 0,
"@typescript-eslint/no-explicit-any": 1,
"@typescript-eslint/member-ordering": 0,
"quotes": [
2,
"single",
{
"avoidEscape": true
}
]
}
}
}
27 changes: 27 additions & 0 deletions rollup.config.js
@@ -0,0 +1,27 @@
import typescript from 'rollup-plugin-typescript2';
import babel from 'rollup-plugin-babel';
import pkg from './package.json';

export default {
input: 'src/index.ts',
output: [
{
file: pkg.main,
format: 'cjs'
},
{
file: pkg.module,
format: 'es'
}
],
external: [...Object.keys(pkg.dependencies), ...Object.keys(pkg.peerDependencies)],
plugins: [
typescript({typescript: require('typescript')}),
babel({
extensions: ['.ts', '.tsx'],
exclude: 'node_modules/**',
plugins: ['babel-plugin-lodash'],
comments: false
})
]
};

0 comments on commit c92cdec

Please sign in to comment.