-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug with react app generator for pascalCaseFiles
`yarn nx generate @nrwl/react:application --name=react-pascal --style=none --e2eTestRunner=none --pascalCaseFiles --no-interactive`
- Loading branch information
1 parent
4ce39df
commit a49b47d
Showing
22 changed files
with
1,318 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@nrwl/react/babel", | ||
{ | ||
"runtime": "automatic" | ||
} | ||
] | ||
], | ||
"plugins": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file is used by: | ||
# 1. autoprefixer to adjust CSS to support the below specified browsers | ||
# 2. babel preset-env to adjust included polyfills | ||
# | ||
# For additional information regarding the format and rule options, please see: | ||
# https://github.com/browserslist/browserslist#queries | ||
# | ||
# If you need to support different browsers in production, you may tweak the list below. | ||
|
||
last 1 Chrome version | ||
last 1 Firefox version | ||
last 2 Edge major versions | ||
last 2 Safari major version | ||
last 2 iOS major versions | ||
Firefox ESR | ||
not IE 9-11 # For IE 9-11 support, remove 'not'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"], | ||
"ignorePatterns": ["!**/*"], | ||
"overrides": [ | ||
{ | ||
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.ts", "*.tsx"], | ||
"rules": {} | ||
}, | ||
{ | ||
"files": ["*.js", "*.jsx"], | ||
"rules": {} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
module.exports = { | ||
displayName: 'react-pascal', | ||
preset: '../../jest.preset.js', | ||
transform: { | ||
'^(?!.*\\.(js|jsx|ts|tsx|css|json)$)': '@nrwl/react/plugins/jest', | ||
'^.+\\.[tj]sx?$': 'babel-jest', | ||
}, | ||
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx'], | ||
coverageDirectory: '../../coverage/apps/react-pascal', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
{ | ||
"root": "apps/react-pascal", | ||
"sourceRoot": "apps/react-pascal/src", | ||
"projectType": "application", | ||
"targets": { | ||
"build": { | ||
"executor": "@nrwl/web:webpack", | ||
"outputs": ["{options.outputPath}"], | ||
"defaultConfiguration": "production", | ||
"options": { | ||
"compiler": "babel", | ||
"outputPath": "dist/apps/react-pascal", | ||
"index": "apps/react-pascal/src/index.html", | ||
"baseHref": "/", | ||
"main": "apps/react-pascal/src/main.tsx", | ||
"polyfills": "apps/react-pascal/src/polyfills.ts", | ||
"tsConfig": "apps/react-pascal/tsconfig.app.json", | ||
"assets": [ | ||
"apps/react-pascal/src/favicon.ico", | ||
"apps/react-pascal/src/assets" | ||
], | ||
"styles": [], | ||
"scripts": [], | ||
"webpackConfig": "@nrwl/react/plugins/webpack" | ||
}, | ||
"configurations": { | ||
"production": { | ||
"fileReplacements": [ | ||
{ | ||
"replace": "apps/react-pascal/src/environments/environment.ts", | ||
"with": "apps/react-pascal/src/environments/environment.prod.ts" | ||
} | ||
], | ||
"optimization": true, | ||
"outputHashing": "all", | ||
"sourceMap": false, | ||
"namedChunks": false, | ||
"extractLicenses": true, | ||
"vendorChunk": false | ||
} | ||
} | ||
}, | ||
"serve": { | ||
"executor": "@nrwl/web:dev-server", | ||
"options": { | ||
"buildTarget": "react-pascal:build", | ||
"hmr": true | ||
}, | ||
"configurations": { | ||
"production": { | ||
"buildTarget": "react-pascal:build:production", | ||
"hmr": false | ||
} | ||
} | ||
}, | ||
"lint": { | ||
"executor": "@nrwl/linter:eslint", | ||
"outputs": ["{options.outputFile}"], | ||
"options": { | ||
"lintFilePatterns": ["apps/react-pascal/**/*.{ts,tsx,js,jsx}"] | ||
} | ||
}, | ||
"test": { | ||
"executor": "@nrwl/jest:jest", | ||
"outputs": ["coverage/apps/react-pascal"], | ||
"options": { | ||
"jestConfig": "apps/react-pascal/jest.config.js", | ||
"passWithNoTests": true | ||
} | ||
} | ||
}, | ||
"tags": [] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { render } from '@testing-library/react'; | ||
|
||
import App from './app'; | ||
|
||
describe('App', () => { | ||
it('should render successfully', () => { | ||
const { baseElement } = render(<App />); | ||
|
||
expect(baseElement).toBeTruthy(); | ||
}); | ||
|
||
it('should have a greeting as the title', () => { | ||
const { getByText } = render(<App />); | ||
|
||
expect(getByText(/Welcome react-pascal/gi)).toBeTruthy(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import NxWelcome from './nx-welcome'; | ||
|
||
export function App() { | ||
return ( | ||
<> | ||
<NxWelcome title="react-pascal" /> | ||
<div /> | ||
</> | ||
); | ||
} | ||
|
||
export default App; |
Oops, something went wrong.