Skip to content

Commit

Permalink
feat: add nx build system
Browse files Browse the repository at this point in the history
  • Loading branch information
edenstrom committed Oct 5, 2021
1 parent 89081bc commit d90cfd2
Show file tree
Hide file tree
Showing 68 changed files with 14,258 additions and 3,720 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see http://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
35 changes: 35 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nrwl/nx/typescript"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"rules": {}
}
]
}
106 changes: 105 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,108 @@
node_modules
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc

# dependencies
/node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

# React Native

## Xcode

**/ios/**/build/
**/ios/**/*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

## Android

**/android/**/build/
**/android/**/.gradle
**/android/**/local.properties
**/android/**/*.iml

## BUCK

buck-out/
\.buckd/
*.keystore
!debug.keystore

## fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
#
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots

## Bundle artifact
*.jsbundle

## CocoaPods
**/ios/Pods/
/

## Nested node_modules

node_modules/

apps/skolplattformen-sthlm-e2e/artifacts
## Nested node_modules

node_modules/
## Nested node_modules

node_modules/

.vscode
output.json
.DS_Store
Expand Down
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Add files here to ignore them from prettier formatting

/dist
/coverage
7 changes: 7 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"singleQuote": true,
"semi": false,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": false
}
3 changes: 3 additions & 0 deletions apps/skolplattformen-sthlm/.babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"presets": ["module:metro-react-native-babel-preset"]
}
26 changes: 20 additions & 6 deletions apps/skolplattformen-sthlm/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,22 @@
{
"root": true,
"extends": ["@react-native-community", "prettier", "plugin:react-native-a11y/ios"],
"plugins": ["prettier"],
"env": {
"jest": true
}
"extends": ["plugin:@nrwl/nx/react", "../../.eslintrc.json"],
"ignorePatterns": ["!**/*", "public", ".cache", "node_modules"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {
"@typescript-eslint/ban-ts-comment": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"rules": {
"@typescript-eslint/no-var-requires": "off"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected List<ReactPackage> getPackages() {

@Override
protected String getJSMainModuleName() {
return "index";
return "apps/skolplattformen-sthlm/index";
}
};

Expand Down
4 changes: 3 additions & 1 deletion apps/skolplattformen-sthlm/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/**
* @format
*/
import 'react-native-gesture-handler'
import { AppRegistry } from 'react-native'
import 'react-native-gesture-handler'
import App from './App'
import { name as appName } from './app.json'

console.log(AppRegistry)

AppRegistry.registerComponent(appName, () => App)
Loading

0 comments on commit d90cfd2

Please sign in to comment.