| body { | ||
| width: 100%; | ||
| height: 100vh; | ||
| margin: 0; | ||
| padding: 0; | ||
| } |
| import React from 'react'; | ||
| // STYLE | ||
| import './App.sass'; | ||
| const App = () => { | ||
| return ( | ||
| <div>App by <b>nuke CLI</b></div> | ||
| ); | ||
| }; | ||
| export default App; |
| .<%= props.name %> { | ||
| width: 100%; | ||
| height: 100vh; | ||
| margin: 0; | ||
| padding: 0; | ||
| } |
| import React from 'react'; | ||
| import '@testing-library/jest-dom'; | ||
| import { render } from '@testing-library/react'; | ||
| import <%= props.name %>, { Props as TProps } from './component'; | ||
| let wrapper = (props: TProps): JSX.Element => <<%= props.name %> {...props} />; | ||
| describe('<%= props.name %>', (): void => { | ||
| afterAll((): void => (wrapper = null)); | ||
| it('should render', (): void => { | ||
| const props: TProps = { | ||
| id: 'jest', | ||
| }; | ||
| const { getByTestId } = render(wrapper(props)); | ||
| expect(getByTestId('jest').className).toBe('<%= props.name %>'); | ||
| }); | ||
| }); |
| import React from 'react'; | ||
| // STYLE | ||
| import './component.sass'; | ||
| export type Props = { | ||
| id: string; | ||
| } | ||
| const <%= props.name %> = (props: Props): JSX.Element => { | ||
| const { id } = props; | ||
| return ( | ||
| <div id={id} data-testid={id} className="<%= props.name %>"><%= props.name %></div> | ||
| ); | ||
| }; | ||
| export default <%= props.name %>; |
| version: '3' | ||
| services: | ||
| app: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| volumes: | ||
| - ./src:/app/src | ||
| ports: | ||
| - '8080:8080' |
| FROM node:17-alpine | ||
| WORKDIR /app | ||
| COPY package.json ./ | ||
| RUN npm install | ||
| COPY . . | ||
| EXPOSE 8080 | ||
| CMD ["npm", "run", "run:dev"] |
| node_modules | ||
| Dockerfile | ||
| .dockerignore | ||
| .github |
| node_modules | ||
| coverage | ||
| .DS_Store |
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE-edge" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <!-- GOOGLE FONTS --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| <!-- GOOGLE FONTS --> | ||
| <title>React Setup</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script src="./bundle.js"></script> | ||
| </body> | ||
| </html> |
| import React from 'react'; | ||
| import ReactDOM from 'react-dom'; | ||
| import App from './App'; | ||
| ReactDOM.render(<App />, document.querySelector('#root')); |
| { | ||
| "testRegex": "((\\.|/*.)(test))\\.tsx?$", | ||
| "testEnvironment": "jsdom", | ||
| "transform": { | ||
| "^.+\\.tsx?$": "ts-jest" | ||
| }, | ||
| "collectCoverage": true, | ||
| "collectCoverageFrom": [ | ||
| "src/{components,containers}/**/*.tsx", | ||
| "!src/{components,containers}/index.{js,jsx,ts}" | ||
| ], | ||
| "moduleNameMapper": { | ||
| "^.+\\.(css|less|scss)$": "identity-obj-proxy", | ||
| "@components": "<rootDir>/src/components" | ||
| } | ||
| } |
| # Ignore artifacts: | ||
| coverage/ | ||
| node_modules/ | ||
| .github |
| { | ||
| "printWidth": 100, | ||
| "proseWrap": "always", | ||
| "tabWidth": 2, | ||
| "useTabs": true, | ||
| "singleQuote": true, | ||
| "semi": true, | ||
| "arrowParens": "always", | ||
| "jsxBracketSameLine": true, | ||
| "bracketSpacing": true | ||
| } |
| # <%= props.name %> | ||
| This project has beeen generated by [nuke-cli](https://github.com/cl4pper/nuke-cli) :smiley: | ||
| You can find the original boilerplate on [react-setup](https://github.com/cl4pper/react-setup). | ||
| Code linting and testing setups **_ready to go_**. | ||
| ## INSTRCTIONS: | ||
| 1. Run **npm install** or **yarn install** to download the packages. | ||
| 2. Follow the scripts bellow. | ||
| ### Scripts: | ||
| - **run:dev** to run the project locally (port **8080** by default) | ||
| - **lint** (apply code styling) | ||
| - **test:all** (runs tests once) | ||
| - **test:watch** (keeps tests running) |
+2
-2
| { | ||
| "name": "nuke-cli", | ||
| "version": "1.1.0", | ||
| "version": "1.1.1", | ||
| "description": "A CLI focused on powering the start of your web project.", | ||
@@ -16,3 +16,3 @@ "author": { | ||
| "compile": "tsc -p .", | ||
| "copy-templates": "copyfiles ./src/templates/* ./build/templates", | ||
| "copy-templates": "cp -a ./src/templates ./build/templates", | ||
| "build": "yarn clean-build && yarn compile && yarn copy-templates", | ||
@@ -19,0 +19,0 @@ "prepublishOnly": "yarn build", |
| body { | ||
| width: 100%; | ||
| height: 100vh; | ||
| margin: 0; | ||
| padding: 0; | ||
| } |
| import React from 'react'; | ||
| // STYLE | ||
| import './App.sass'; | ||
| const App = () => { | ||
| return ( | ||
| <div>App by <b>nuke CLI</b></div> | ||
| ); | ||
| }; | ||
| export default App; |
| .<%= props.name %> { | ||
| width: 100%; | ||
| height: 100vh; | ||
| margin: 0; | ||
| padding: 0; | ||
| } |
| import React from 'react'; | ||
| import '@testing-library/jest-dom'; | ||
| import { render } from '@testing-library/react'; | ||
| import <%= props.name %>, { Props as TProps } from './component'; | ||
| let wrapper = (props: TProps): JSX.Element => <<%= props.name %> {...props} />; | ||
| describe('<%= props.name %>', (): void => { | ||
| afterAll((): void => (wrapper = null)); | ||
| it('should render', (): void => { | ||
| const props: TProps = { | ||
| id: 'jest', | ||
| }; | ||
| const { getByTestId } = render(wrapper(props)); | ||
| expect(getByTestId('jest').className).toBe('<%= props.name %>'); | ||
| }); | ||
| }); |
| import React from 'react'; | ||
| // STYLE | ||
| import './component.sass'; | ||
| export type Props = { | ||
| id: string; | ||
| } | ||
| const <%= props.name %> = (props: Props): JSX.Element => { | ||
| const { id } = props; | ||
| return ( | ||
| <div id={id} data-testid={id} className="<%= props.name %>"><%= props.name %></div> | ||
| ); | ||
| }; | ||
| export default <%= props.name %>; |
| version: '3' | ||
| services: | ||
| app: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| volumes: | ||
| - ./src:/app/src | ||
| ports: | ||
| - '8080:8080' |
| FROM node:17-alpine | ||
| WORKDIR /app | ||
| COPY package.json ./ | ||
| RUN npm install | ||
| COPY . . | ||
| EXPOSE 8080 | ||
| CMD ["npm", "run", "run:dev"] |
| node_modules | ||
| Dockerfile | ||
| .dockerignore | ||
| .github |
| node_modules | ||
| coverage | ||
| .DS_Store |
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta http-equiv="X-UA-Compatible" content="IE-edge" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <!-- GOOGLE FONTS --> | ||
| <link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
| <link | ||
| href="https://fonts.googleapis.com/css2?family=Nunito:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" | ||
| rel="stylesheet" | ||
| /> | ||
| <!-- GOOGLE FONTS --> | ||
| <title>React Setup</title> | ||
| </head> | ||
| <body> | ||
| <div id="root"></div> | ||
| <script src="./bundle.js"></script> | ||
| </body> | ||
| </html> |
| import React from 'react'; | ||
| import ReactDOM from 'react-dom'; | ||
| import App from './App'; | ||
| ReactDOM.render(<App />, document.querySelector('#root')); |
| { | ||
| "testRegex": "((\\.|/*.)(test))\\.tsx?$", | ||
| "testEnvironment": "jsdom", | ||
| "transform": { | ||
| "^.+\\.tsx?$": "ts-jest" | ||
| }, | ||
| "collectCoverage": true, | ||
| "collectCoverageFrom": [ | ||
| "src/{components,containers}/**/*.tsx", | ||
| "!src/{components,containers}/index.{js,jsx,ts}" | ||
| ], | ||
| "moduleNameMapper": { | ||
| "^.+\\.(css|less|scss)$": "identity-obj-proxy", | ||
| "@components": "<rootDir>/src/components" | ||
| } | ||
| } |
| # Ignore artifacts: | ||
| coverage/ | ||
| node_modules/ | ||
| .github |
| { | ||
| "printWidth": 100, | ||
| "proseWrap": "always", | ||
| "tabWidth": 2, | ||
| "useTabs": true, | ||
| "singleQuote": true, | ||
| "semi": true, | ||
| "arrowParens": "always", | ||
| "jsxBracketSameLine": true, | ||
| "bracketSpacing": true | ||
| } |
| # <%= props.name %> | ||
| This project has beeen generated by [nuke-cli](https://github.com/cl4pper/nuke-cli) :smiley: | ||
| You can find the original boilerplate on [react-setup](https://github.com/cl4pper/react-setup). | ||
| Code linting and testing setups **_ready to go_**. | ||
| ## INSTRCTIONS: | ||
| 1. Run **npm install** or **yarn install** to download the packages. | ||
| 2. Follow the scripts bellow. | ||
| ### Scripts: | ||
| - **run:dev** to run the project locally (port **8080** by default) | ||
| - **lint** (apply code styling) | ||
| - **test:all** (runs tests once) | ||
| - **test:watch** (keeps tests running) |
60734
-0.01%