Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions components/.babelrc

This file was deleted.

7 changes: 0 additions & 7 deletions components/README.md

This file was deleted.

10 changes: 0 additions & 10 deletions components/jest.config.ts

This file was deleted.

2 changes: 0 additions & 2 deletions components/src/index.ts

This file was deleted.

28 changes: 0 additions & 28 deletions components/src/lib/components.tsx

This file was deleted.

30 changes: 0 additions & 30 deletions components/tsconfig.lib.json

This file was deleted.

16 changes: 16 additions & 0 deletions libs/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"presets": [
[
"@nrwl/react/babel", {
"runtime": "automatic",
"useBuiltIns": "usage"

}
]
],
"plugins": [



]
}
File renamed without changes.
7 changes: 7 additions & 0 deletions libs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# libs

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test libs` to execute the unit tests via [Jest](https://jestjs.io).
11 changes: 11 additions & 0 deletions libs/jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/* eslint-disable */
export default {
displayName: 'libs',
preset: '../jest.preset.js',
transform: {
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest',
'^.+\\.[tj]sx?$': ['babel-jest', { presets: ['@nrwl/react/babel'] }]
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'],
coverageDirectory: '../coverage/libs'
};
8 changes: 4 additions & 4 deletions components/project.json → libs/project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "components",
"name": "libs",
"$schema": "../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "components/src",
"sourceRoot": "libs/src",
"projectType": "library",
"tags": [],
"targets": {
Expand All @@ -12,7 +12,7 @@
],
"options": {
"lintFilePatterns": [
"components/**/*.{ts,tsx,js,jsx}"
"libs/**/*.{ts,tsx,js,jsx}"
]
}
},
Expand All @@ -22,7 +22,7 @@
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "components/jest.config.ts",
"jestConfig": "libs/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand Down
21 changes: 21 additions & 0 deletions libs/src/components/carousel.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
export default function Carousel() {
return (
<div className="container">
<div className="left">
<div className="parag1">
<p id="pa1">Movies</p>
<p id="pa2">532 Titles</p>
</div>
</div>
<img id="img1" src="/images/Movie11nobg 1.png" />

<div className="right">
<div className="parag">
<p id="p1">Anime</p>
<p id="p2">532 Titles</p>
</div>
</div>
<img id="img2" src="/images/Anime1nobg 1.png" />
</div>
);
}
5 changes: 5 additions & 0 deletions libs/src/components/example.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
//@ts-ignore
export function ExampleComponent({children}){

return <h1>This is just for reference {children}</h1>
}
3 changes: 3 additions & 0 deletions libs/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export * from './example'
export * from './splashscreen'
export * from './carousel'
36 changes: 36 additions & 0 deletions libs/src/components/splashscreen.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
export default function splashscreen () {
return(
<>
<div className='header'>
<img src='/images/movie 1.png'
style={
{
clipPath: 'polygon(100% 7%, 100% 58%, 0% 100%, 0 49%)'
}
}
/>
</div>
<div className='header2'>
<img src='/images/Stranger-things-4 1.png'
style={
{
clipPath: ' polygon(100% 7%, 100% 55%, 0 100%, 0 49%)'
}
}

/>
</div>
<div>
<img src='/images/Animeee 1.png'
style={
{
clipPath: ' polygon(100% 2%, 100% 55%, 0 100%, 0 49%)'
}
}

/>
</div>

</>
)
}
3 changes: 3 additions & 0 deletions libs/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

export * from './lib/libs';
export * from './components'
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { render } from '@testing-library/react';

import Components from './components';
import Libs from './libs';

describe('Components', () => {
describe('Libs', () => {

it('should render successfully', () => {
const { baseElement } = render(<Components />);
const { baseElement } = render(<Libs />);
expect(baseElement).toBeTruthy();
});

Expand Down
28 changes: 28 additions & 0 deletions libs/src/lib/libs.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@





import styles from './libs.module.css';


/* eslint-disable-next-line */
export interface LibsProps {
}



export function Libs(props: LibsProps) {
return (
<div className={styles['container']}>

<h1>Welcome to Libs!</h1>

</div>
);
};


export default Libs;


2 changes: 1 addition & 1 deletion components/tsconfig.json → libs/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"allowJs": false,
"esModuleInterop": false,
"allowSyntheticDefaultImports": true,
"strict": true
"strict": true,
},
"files": [],
"include": [],
Expand Down
13 changes: 13 additions & 0 deletions libs/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../dist/out-tsc",
"types": ["node"]
},
"files": [
"../node_modules/@nrwl/react/typings/cssmodule.d.ts",
"../node_modules/@nrwl/react/typings/image.d.ts"
],
"exclude": ["jest.config.ts", "src/**/*.spec.ts", "src/**/*.test.ts", "src/**/*.spec.tsx", "src/**/*.test.tsx", "src/**/*.spec.js", "src/**/*.test.js", "src/**/*.spec.jsx", "src/**/*.test.jsx"],
"include": ["src/**/*.js", "src/**/*.jsx", "src/**/*.ts", "src/**/*.tsx"]
}
File renamed without changes.
3 changes: 2 additions & 1 deletion movie-app/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { AppProps } from 'next/app';
import Head from 'next/head';
import './styles.css';

function CustomApp({ Component, pageProps }: AppProps) {

return (
<>
<Head>
Expand All @@ -11,6 +11,7 @@ function CustomApp({ Component, pageProps }: AppProps) {
<main className="app">
<Component {...pageProps}/>
</main>

</>
);
};
Expand Down
Loading