Skip to content

Commit

Permalink
Merge pull request #20 from lifeomic/v1.1.2
Browse files Browse the repository at this point in the history
v1.1.2
  • Loading branch information
Derrick Hathaway authored Dec 16, 2020
2 parents 244d55d + e2cfc5e commit 0765196
Show file tree
Hide file tree
Showing 9 changed files with 1,348 additions and 51 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
run: yarn install --frozen-lockfile
- name: Lint
run: yarn lint
- name: TypeScript
run: yarn tsc
- name: Test
run: yarn test
- name: Build
Expand All @@ -40,4 +42,4 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{secrets.LIFEOMIC_NPM_TOKEN}}
PR_TAG: pr-${{ github.event.number }}
run: cd dist && npm publish --tag "${PR_TAG}"
run: npm publish --tag "${PR_TAG}"
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ module.exports = {
clearMocks: true,
preset: 'react-native',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
modulePathIgnorePatterns: ['<rootDir>/lib/'],
testPathIgnorePatterns: ['dist/', 'utils/'],
setupFilesAfterEnv: ['<rootDir>/jest.afterEnv.js'],
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
Expand Down
31 changes: 24 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lifeomic/prim",
"version": "1.1.1",
"version": "1.1.2",
"description": "Prim is a customizable TypeScript atomic styles framework for React Native.",
"repository": "[email protected]:lifeomic/react-native-prim.git",
"author": "LifeOmic <[email protected]>",
Expand All @@ -12,12 +12,14 @@
"react",
"typescript"
],
"main": "dist/commonjs/index.js",
"module": "dist/module/index.js",
"react-native": "src/index.ts",
"types": "dist/typescript/index.d.ts",
"scripts": {
"clean": "rm -rf dist",
"build": "tsc --build tsconfig.build.json",
"prebuild": "yarn clean",
"postbuild": "cp package.json ./dist/",
"build": "bob build",
"test": "jest",
"tsc": "tsc --noEmit",
"lint": "eslint --ext .ts,.tsx,.js,.jsx src/**/*.tsx src/**/*.ts"
},
"husky": {
Expand All @@ -30,12 +32,13 @@
"use-memo-one": "^1.0.0"
},
"peerDependencies": {
"react": ">=16.13.1",
"react-native": ">=0.63.2"
"react": "*",
"react-native": ">=0.50.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
"@babel/runtime": "^7.11.2",
"@react-native-community/bob": "^0.16.2",
"@testing-library/react-hooks": "^3.4.1",
"@testing-library/react-native": "^7.0.2",
"@types/hoist-non-react-statics": "^3.3.1",
Expand All @@ -61,5 +64,19 @@
},
"publishConfig": {
"access": "public"
},
"@react-native-community/bob": {
"source": "src",
"output": "dist",
"targets": [
"commonjs",
"module",
[
"typescript",
{
"project": "./tsconfig.build.json"
}
]
]
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from 'react'
import { renderHook, act } from '@testing-library/react-hooks'
import { render } from '@testing-library/react-native'
import configurePrim from './configurePrim'
import configurePrim from '../configurePrim'
import { StyleSheet, View, Text } from 'react-native'

enum ScreenSize {
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import configurePrim from './configurePrim'
import defaultOptions from './defaultOptions'

export { default as configurePrim } from './configurePrim'
export { default as defaultOptions } from './defaultOptions'

export const { PrimProvider, usePrim, primmed } = configurePrim(defaultOptions)
4 changes: 0 additions & 4 deletions tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "dist",
"noEmit": false
},
"exclude": ["node_modules", "dist/*", "**/*.test.*", "coverage"]
}
19 changes: 5 additions & 14 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
{
"compilerOptions": {
"target": "esnext",
"module": "commonjs",
"lib": ["es6"],
"module": "es2015",
"lib": ["es6", "es2016", "es2018"],
"jsx": "react-native",
"noEmit": true,
"isolatedModules": true,
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"baseUrl": "./src/",
"forceConsistentCasingInFileNames": true
"types": ["react", "react-native"]
},
"exclude": [
"node_modules",
"dist/*",
"babel.config.js",
"jest.*.js",
"coverage"
]
"include": ["src/index.ts"]
}
Loading

0 comments on commit 0765196

Please sign in to comment.