mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge branch 'master' of github.com:NativeScript/NativeScript
# Conflicts: # apps/ui/tsconfig.json # packages/webpack5/src/helpers/index.ts
This commit is contained in:
2
apps/ui/.gitignore
vendored
2
apps/ui/.gitignore
vendored
@@ -1 +1 @@
|
||||
!webpack.custom.config.js
|
||||
!webpack.config.js
|
||||
@@ -1,7 +1,7 @@
|
||||
***e2e tests execution***
|
||||
|
||||
1. Local setup
|
||||
- install appium and all requirments related to `nativescript-dev-appium` plugin usage
|
||||
- install appium and all requirements related to `nativescript-dev-appium` plugin usage
|
||||
- download images:
|
||||
|
||||
```npm run load-images Emulator-Api23-Default "iPhone X 12"```
|
||||
@@ -36,7 +36,7 @@
|
||||
- Run:
|
||||
|
||||
`npm run e2e-debug [android|ios]`
|
||||
run in separate console and don't kill it. This command will start appium server and driver and use the installed app on the device but it will not execute tests.
|
||||
run in separate console and don't kill it. This command will start appium server and driver and use the installed app on the device, but it will not execute tests.
|
||||
- Go to vs code debugging and use a config like:
|
||||
|
||||
```
|
||||
|
||||
@@ -2,10 +2,12 @@ import { NativeScriptConfig } from '@nativescript/core';
|
||||
|
||||
export default {
|
||||
id: 'org.nativescript.uitestsapp',
|
||||
appPath: 'src',
|
||||
appResourcesPath: '../../tools/assets/App_Resources',
|
||||
webpackConfigPath: 'webpack.custom.config.js',
|
||||
android: {
|
||||
v8Flags: '--expose_gc',
|
||||
markingMode: 'none',
|
||||
},
|
||||
cli: {
|
||||
packageManager: 'npm',
|
||||
},
|
||||
} as NativeScriptConfig;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"main": "main.js",
|
||||
"main": "src/main.ts",
|
||||
"description": "NativeScript Application",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
|
||||
42
apps/ui/project.json
Normal file
42
apps/ui/project.json
Normal file
@@ -0,0 +1,42 @@
|
||||
{
|
||||
"root": "apps/ui/",
|
||||
"sourceRoot": "apps/ui/src",
|
||||
"projectType": "application",
|
||||
"prefix": "nativescript",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"options": {
|
||||
"noHmr": true,
|
||||
"production": true,
|
||||
"uglify": true,
|
||||
"release": true,
|
||||
"forDevice": true
|
||||
}
|
||||
},
|
||||
"ios": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"options": {
|
||||
"platform": "ios"
|
||||
}
|
||||
},
|
||||
"android": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"options": {
|
||||
"platform": "android"
|
||||
}
|
||||
},
|
||||
"clean": {
|
||||
"executor": "@nativescript/nx:build",
|
||||
"options": {
|
||||
"clean": true
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@nrwl/linter:eslint",
|
||||
"options": {
|
||||
"lintFilePatterns": ["apps/ui/**/*.ts", "apps/ui/src/**/*.html"]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
#page {
|
||||
@import url("../css/import.css");
|
||||
|
||||
#page {
|
||||
background-color: lightcoral;
|
||||
}
|
||||
|
||||
@import url("../css/import.css");
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"diagnostics": false,
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"include": ["src/**/*", "references.d.ts"],
|
||||
"exclude": ["node_modules", "tmp", "platforms", "__tests__", "e2"]
|
||||
"extends": "../../tsconfig.base.json",
|
||||
"compilerOptions": {
|
||||
"diagnostics": false,
|
||||
"paths": {
|
||||
"~/*": ["src/*"],
|
||||
"tns-core-modules/*": ["@nativescript/core/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["e2e"]
|
||||
}
|
||||
|
||||
20
apps/ui/webpack.config.js
Normal file
20
apps/ui/webpack.config.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const webpack = require("@nativescript/webpack");
|
||||
const { ContextExclusionPlugin } = require('webpack')
|
||||
|
||||
module.exports = (env) => {
|
||||
webpack.init(env);
|
||||
|
||||
webpack.chainWebpack(config => {
|
||||
config.plugin('DefinePlugin').tap(args => {
|
||||
Object.assign(args[0], {
|
||||
__CI__: !!process.env.CI,
|
||||
})
|
||||
|
||||
return args
|
||||
})
|
||||
})
|
||||
|
||||
return webpack.resolveConfig();
|
||||
};
|
||||
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
const webpack = require('webpack');
|
||||
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
||||
|
||||
const webpackConfig = require('./webpack.config');
|
||||
|
||||
module.exports = (env) => {
|
||||
env = env || {};
|
||||
const baseConfig = webpackConfig(env);
|
||||
|
||||
baseConfig.plugins.push(new webpack.DefinePlugin({
|
||||
__CI__: !!process.env.CI,
|
||||
__UI_USE_XML_PARSER__: true,
|
||||
__UI_USE_EXTERNAL_RENDERER__: false,
|
||||
__CSS_PARSER__: JSON.stringify('css-tree')
|
||||
}))
|
||||
|
||||
return baseConfig;
|
||||
};
|
||||
Reference in New Issue
Block a user