creactive 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./components"), exports);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "creactive",
3
- "version": "0.0.2",
4
- "main": "index.ts",
3
+ "version": "0.0.3",
4
+ "main": "build/index.js",
5
5
  "files": [
6
6
  "components/**/*"
7
7
  ],
@@ -10,7 +10,8 @@
10
10
  "start": "expo start",
11
11
  "test": "jest --watchAll",
12
12
  "lint": "expo lint",
13
- "prepublishOnly": "node scripts/update-package-main.js index.ts",
13
+ "build": "tsc",
14
+ "prepublishOnly": "node scripts/update-package-main.js build/index.js",
14
15
  "postpublish": "node scripts/update-package-main.js .storybook"
15
16
  },
16
17
  "jest": {
@@ -1 +0,0 @@
1
- export * from './text'
@@ -1 +0,0 @@
1
- export * from './text'
@@ -1,11 +0,0 @@
1
- import { faker } from '@faker-js/faker'
2
- import { render, screen } from '@testing-library/react-native'
3
- import { Text } from './text'
4
-
5
- describe('Text component', () => {
6
- it('renders provided text child', () => {
7
- const text = faker.lorem.words(2)
8
- render(<Text>{text}</Text>)
9
- expect(screen.getByText(text)).toBeTruthy()
10
- })
11
- })
@@ -1,13 +0,0 @@
1
- import { faker } from '@faker-js/faker'
2
- import type { StoryObj } from '@storybook/react'
3
- import { Text } from './text'
4
-
5
- export default {
6
- component: Text,
7
- }
8
-
9
- export const DefaultState: StoryObj<typeof Text> = {
10
- args: {
11
- children: faker.lorem.words(2),
12
- },
13
- }
@@ -1,13 +0,0 @@
1
- import { Text as ReactNativeText, StyleSheet } from 'react-native'
2
- import type { TextComponent } from './types'
3
-
4
- const styleSheet = StyleSheet.create({
5
- element: {
6
- color: 'red',
7
- },
8
- })
9
- export const Text: TextComponent = ({ children }) => {
10
- return (
11
- <ReactNativeText style={styleSheet.element}>{children}</ReactNativeText>
12
- )
13
- }
@@ -1,6 +0,0 @@
1
- import type { FunctionComponent } from 'react'
2
-
3
- interface TextProps {
4
- children: string
5
- }
6
- export type TextComponent = FunctionComponent<TextProps>
package/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from './components'