mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore(e2e): update config files (#7677)
* chore(e2e): update config files * chore: update .gitignore file * chore: update references.d.ts file * chore: remove npm scripts * chore: update travis config
This commit is contained in:
35
e2e/animation/.gitignore
vendored
35
e2e/animation/.gitignore
vendored
@@ -1,35 +0,0 @@
|
||||
mochawesome-report
|
||||
|
||||
# NativeScript
|
||||
hooks/
|
||||
node_modules/
|
||||
platforms/
|
||||
|
||||
# NativeScript Template
|
||||
*.js.map
|
||||
*.js
|
||||
!webpack.config.js
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.idea
|
||||
.cloud
|
||||
.project
|
||||
tmp/
|
||||
typings/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
@@ -1,14 +0,0 @@
|
||||
Execute Tests
|
||||
=============
|
||||
|
||||
Android:
|
||||
|
||||
```
|
||||
npm run e2e -- --runType android23 # --devMode
|
||||
```
|
||||
|
||||
iOS:
|
||||
|
||||
```
|
||||
npm run e2e -- --runType sim.iPhoneX.iOS112 # --devMode
|
||||
```
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"useLegacyWorkflow": false
|
||||
}
|
||||
@@ -14,11 +14,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"nativescript-theme-core": "~1.0.6",
|
||||
"tns-core-modules": "next"
|
||||
"tns-core-modules": "file:../../tns-core-modules"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "~4.1.7",
|
||||
"@types/mocha": "~5.2.5",
|
||||
"@types/node": "~10.12.18",
|
||||
"babel-traverse": "6.26.0",
|
||||
"babel-types": "6.26.0",
|
||||
"babylon": "6.18.0",
|
||||
|
||||
@@ -6,24 +6,24 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"./node_modules/tns-core-modules/*",
|
||||
"./node_modules/*"
|
||||
],
|
||||
"~/*": [
|
||||
"app/*"
|
||||
],
|
||||
"*": [
|
||||
"./node_modules/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"e2e",
|
||||
"node_modules",
|
||||
"platforms",
|
||||
"e2e"
|
||||
"platforms"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,303 +0,0 @@
|
||||
const { join, relative, resolve, sep } = require("path");
|
||||
|
||||
const webpack = require("webpack");
|
||||
const nsWebpack = require("nativescript-dev-webpack");
|
||||
const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
|
||||
const CleanWebpackPlugin = require("clean-webpack-plugin");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
|
||||
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const hashSalt = Date.now().toString();
|
||||
|
||||
module.exports = env => {
|
||||
// Add your custom Activities, Services and other Android app components here.
|
||||
const appComponents = [
|
||||
"tns-core-modules/ui/frame",
|
||||
"tns-core-modules/ui/frame/activity",
|
||||
];
|
||||
|
||||
const platform = env && (env.android && "android" || env.ios && "ios");
|
||||
if (!platform) {
|
||||
throw new Error("You need to provide a target platform!");
|
||||
}
|
||||
|
||||
const platforms = ["ios", "android"];
|
||||
const projectRoot = __dirname;
|
||||
|
||||
// Default destination inside platforms/<platform>/...
|
||||
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
|
||||
const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS";
|
||||
|
||||
const {
|
||||
// The 'appPath' and 'appResourcesPath' values are fetched from
|
||||
// the nsconfig.json configuration file
|
||||
// when bundling with `tns run android|ios --bundle`.
|
||||
appPath = "app",
|
||||
appResourcesPath = "app/App_Resources",
|
||||
|
||||
// You can provide the following flags when running 'tns run android|ios'
|
||||
snapshot, // --env.snapshot
|
||||
uglify, // --env.uglify
|
||||
report, // --env.report
|
||||
sourceMap, // --env.sourceMap
|
||||
hiddenSourceMap, // --env.hiddenSourceMap
|
||||
hmr, // --env.hmr,
|
||||
unitTesting, // --env.unitTesting
|
||||
} = env;
|
||||
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
|
||||
const externals = nsWebpack.getConvertedExternals(env.externals);
|
||||
|
||||
const appFullPath = resolve(projectRoot, appPath);
|
||||
const appResourcesFullPath = resolve(projectRoot, appResourcesPath);
|
||||
|
||||
const entryModule = nsWebpack.getEntryModule(appFullPath, platform);
|
||||
const entryPath = `.${sep}${entryModule}.ts`;
|
||||
const entries = { bundle: entryPath };
|
||||
|
||||
const tsConfigPath = resolve(projectRoot, "tsconfig.tns.json");
|
||||
|
||||
if (platform === "ios") {
|
||||
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules.js";
|
||||
};
|
||||
|
||||
let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist);
|
||||
|
||||
const config = {
|
||||
mode: uglify ? "production" : "development",
|
||||
context: appFullPath,
|
||||
externals,
|
||||
watchOptions: {
|
||||
ignored: [
|
||||
appResourcesFullPath,
|
||||
// Don't watch hidden files
|
||||
"**/.*",
|
||||
]
|
||||
},
|
||||
target: nativescriptTarget,
|
||||
entry: entries,
|
||||
output: {
|
||||
pathinfo: false,
|
||||
path: dist,
|
||||
sourceMapFilename,
|
||||
libraryTarget: "commonjs2",
|
||||
filename: "[name].js",
|
||||
globalObject: "global",
|
||||
hashSalt
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".js", ".scss", ".css"],
|
||||
// Resolve {N} system modules from tns-core-modules
|
||||
modules: [
|
||||
resolve(__dirname, "node_modules/tns-core-modules"),
|
||||
resolve(__dirname, "node_modules"),
|
||||
"node_modules/tns-core-modules",
|
||||
"node_modules",
|
||||
],
|
||||
alias: {
|
||||
'~': appFullPath
|
||||
},
|
||||
// resolve symlinks to symlinked modules
|
||||
symlinks: true
|
||||
},
|
||||
resolveLoader: {
|
||||
// don't resolve symlinks to symlinked loaders
|
||||
symlinks: false
|
||||
},
|
||||
node: {
|
||||
// Disable node shims that conflict with NativeScript
|
||||
"http": false,
|
||||
"timers": false,
|
||||
"setImmediate": false,
|
||||
"fs": "empty",
|
||||
"__dirname": false,
|
||||
},
|
||||
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
|
||||
optimization: {
|
||||
runtimeChunk: "single",
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
name: "vendor",
|
||||
chunks: "all",
|
||||
test: (module, chunks) => {
|
||||
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
|
||||
return /[\\/]node_modules[\\/]/.test(moduleName) ||
|
||||
appComponents.some(comp => comp === moduleName);
|
||||
|
||||
},
|
||||
enforce: true,
|
||||
},
|
||||
}
|
||||
},
|
||||
minimize: !!uglify,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
cache: true,
|
||||
sourceMap: isAnySourceMapEnabled,
|
||||
terserOptions: {
|
||||
output: {
|
||||
comments: false,
|
||||
semicolons: !isAnySourceMapEnabled
|
||||
},
|
||||
compress: {
|
||||
// The Android SBG has problems parsing the output
|
||||
// when these options are enabled
|
||||
'collapse_vars': platform !== "android",
|
||||
sequences: platform !== "android",
|
||||
}
|
||||
}
|
||||
})
|
||||
],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: nsWebpack.getEntryPathRegExp(appFullPath, entryPath),
|
||||
use: [
|
||||
// Require all Android app components
|
||||
platform === "android" && {
|
||||
loader: "nativescript-dev-webpack/android-app-components-loader",
|
||||
options: { modules: appComponents }
|
||||
},
|
||||
|
||||
{
|
||||
loader: "nativescript-dev-webpack/bundle-config-loader",
|
||||
options: {
|
||||
loadCss: !snapshot, // load the application css if in debug mode
|
||||
unitTesting,
|
||||
appFullPath,
|
||||
projectRoot,
|
||||
registerModules: /(root|page\d*|Page\d*)\.(xml|css|js|ts|scss)$/ // NB: MODIFIED
|
||||
}
|
||||
},
|
||||
].filter(loader => !!loader)
|
||||
},
|
||||
|
||||
{
|
||||
test: /-page\.ts$/,
|
||||
use: "nativescript-dev-webpack/script-hot-loader"
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(css|scss)$/,
|
||||
use: "nativescript-dev-webpack/style-hot-loader"
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(html|xml)$/,
|
||||
use: "nativescript-dev-webpack/markup-hot-loader"
|
||||
},
|
||||
|
||||
{ test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader" },
|
||||
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: { loader: "css-loader", options: { url: false } }
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
{ loader: "css-loader", options: { url: false } },
|
||||
"sass-loader"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: {
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
configFile: tsConfigPath,
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
|
||||
transpileOnly: true,
|
||||
allowTsInNodeModules: true,
|
||||
compilerOptions: {
|
||||
sourceMap: isAnySourceMapEnabled,
|
||||
declaration: false
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
// Define useful constants like TNS_WEBPACK
|
||||
new webpack.DefinePlugin({
|
||||
"global.TNS_WEBPACK": "true",
|
||||
"process": undefined,
|
||||
}),
|
||||
// Remove all files from the out dir.
|
||||
new CleanWebpackPlugin([`${dist}/**/*`]),
|
||||
// Copy assets to out dir. Add your own globs as needed.
|
||||
new CopyWebpackPlugin([
|
||||
{ from: { glob: "fonts/**" } },
|
||||
{ from: { glob: "**/*.jpg" } },
|
||||
{ from: { glob: "**/*.png" } },
|
||||
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
|
||||
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
|
||||
// For instructions on how to set up workers with webpack
|
||||
// check out https://github.com/nativescript/worker-loader
|
||||
new NativeScriptWorkerPlugin(),
|
||||
new nsWebpack.PlatformFSPlugin({
|
||||
platform,
|
||||
platforms,
|
||||
}),
|
||||
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
|
||||
new nsWebpack.WatchStateLoggerPlugin(),
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
tsconfig: tsConfigPath,
|
||||
async: false,
|
||||
useTypescriptIncrementalApi: true,
|
||||
memoryLimit: 4096
|
||||
})
|
||||
],
|
||||
};
|
||||
|
||||
// Copy the native app resources to the out dir
|
||||
// only if doing a full build (tns run/build) and not previewing (tns preview)
|
||||
if (!externals || externals.length === 0) {
|
||||
config.plugins.push(new CopyWebpackPlugin([
|
||||
{
|
||||
from: `${appResourcesFullPath}/${appResourcesPlatformDir}`,
|
||||
to: `${dist}/App_Resources/${appResourcesPlatformDir}`,
|
||||
context: projectRoot
|
||||
},
|
||||
]));
|
||||
}
|
||||
|
||||
if (report) {
|
||||
// Generate report files for bundles content
|
||||
config.plugins.push(new BundleAnalyzerPlugin({
|
||||
analyzerMode: "static",
|
||||
openAnalyzer: false,
|
||||
generateStatsFile: true,
|
||||
reportFilename: resolve(projectRoot, "report", `report.html`),
|
||||
statsFilename: resolve(projectRoot, "report", `stats.json`),
|
||||
}));
|
||||
}
|
||||
|
||||
if (snapshot) {
|
||||
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
|
||||
chunk: "vendor",
|
||||
requireModules: [
|
||||
"tns-core-modules/bundle-entry-points",
|
||||
],
|
||||
projectRoot,
|
||||
webpackConfig: config,
|
||||
}));
|
||||
}
|
||||
|
||||
if (hmr) {
|
||||
config.plugins.push(new webpack.HotModuleReplacementPlugin());
|
||||
}
|
||||
|
||||
|
||||
return config;
|
||||
};
|
||||
33
e2e/cuteness.io/.gitignore
vendored
33
e2e/cuteness.io/.gitignore
vendored
@@ -1,33 +0,0 @@
|
||||
# NativeScript
|
||||
hooks/
|
||||
node_modules/
|
||||
platforms/
|
||||
|
||||
# NativeScript Template
|
||||
*.js.map
|
||||
*.js
|
||||
!webpack.config.js
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.idea
|
||||
.cloud
|
||||
.project
|
||||
tmp/
|
||||
typings/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
@@ -1,201 +0,0 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2015-2019 Progress Software Corporation
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"useLegacyWorkflow": false
|
||||
}
|
||||
@@ -13,12 +13,11 @@
|
||||
"license": "SEE LICENSE IN <your-license-filename>",
|
||||
"repository": "<fill-your-repository-here>",
|
||||
"dependencies": {
|
||||
"tns-core-modules": "next"
|
||||
"tns-core-modules": "file:../../tns-core-modules"
|
||||
},
|
||||
"devDependencies": {
|
||||
"nativescript-dev-webpack": "next",
|
||||
"tns-platform-declarations": "next",
|
||||
"typescript": "~3.4.1"
|
||||
"typescript": "3.4.5"
|
||||
},
|
||||
"gitHead": "8c1a4866a66daab09bf5ef8e5a96472687192373",
|
||||
"readme": "NativeScript Application"
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
@@ -14,6 +15,9 @@
|
||||
"paths": {
|
||||
"~/*": [
|
||||
"app/*"
|
||||
],
|
||||
"*": [
|
||||
"./node_modules/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -21,4 +25,4 @@
|
||||
"node_modules",
|
||||
"platforms"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,299 +0,0 @@
|
||||
const { join, relative, resolve, sep } = require("path");
|
||||
|
||||
const webpack = require("webpack");
|
||||
const nsWebpack = require("nativescript-dev-webpack");
|
||||
const nativescriptTarget = require("nativescript-dev-webpack/nativescript-target");
|
||||
const CleanWebpackPlugin = require("clean-webpack-plugin");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
|
||||
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
|
||||
const TerserPlugin = require("terser-webpack-plugin");
|
||||
const hashSalt = Date.now().toString();
|
||||
|
||||
module.exports = env => {
|
||||
// Add your custom Activities, Services and other Android app components here.
|
||||
const appComponents = [
|
||||
"tns-core-modules/ui/frame",
|
||||
"tns-core-modules/ui/frame/activity",
|
||||
];
|
||||
|
||||
const platform = env && (env.android && "android" || env.ios && "ios");
|
||||
if (!platform) {
|
||||
throw new Error("You need to provide a target platform!");
|
||||
}
|
||||
|
||||
const platforms = ["ios", "android"];
|
||||
const projectRoot = __dirname;
|
||||
|
||||
// Default destination inside platforms/<platform>/...
|
||||
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
|
||||
const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS";
|
||||
|
||||
const {
|
||||
// The 'appPath' and 'appResourcesPath' values are fetched from
|
||||
// the nsconfig.json configuration file
|
||||
// when bundling with `tns run android|ios --bundle`.
|
||||
appPath = "app",
|
||||
appResourcesPath = "app/App_Resources",
|
||||
|
||||
// You can provide the following flags when running 'tns run android|ios'
|
||||
snapshot, // --env.snapshot
|
||||
production, // --env.production
|
||||
uglify, // --env.uglify
|
||||
report, // --env.report
|
||||
sourceMap, // --env.sourceMap
|
||||
hiddenSourceMap, // --env.hiddenSourceMap
|
||||
hmr, // --env.hmr,
|
||||
unitTesting, // --env.unitTesting,
|
||||
verbose, // --env.verbose
|
||||
} = env;
|
||||
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
|
||||
const externals = nsWebpack.getConvertedExternals(env.externals);
|
||||
|
||||
const appFullPath = resolve(projectRoot, appPath);
|
||||
const appResourcesFullPath = resolve(projectRoot, appResourcesPath);
|
||||
|
||||
const entryModule = nsWebpack.getEntryModule(appFullPath, platform);
|
||||
const entryPath = `.${sep}${entryModule}.ts`;
|
||||
const entries = { bundle: entryPath };
|
||||
|
||||
const tsConfigPath = resolve(projectRoot, "tsconfig.tns.json");
|
||||
|
||||
const areCoreModulesExternal = Array.isArray(env.externals) && env.externals.some(e => e.indexOf("tns-core-modules") > -1);
|
||||
if (platform === "ios" && !areCoreModulesExternal) {
|
||||
entries["tns_modules/tns-core-modules/inspector_modules"] = "inspector_modules";
|
||||
};
|
||||
|
||||
let sourceMapFilename = nsWebpack.getSourceMapFilename(hiddenSourceMap, __dirname, dist);
|
||||
|
||||
const itemsToClean = [`${dist}/**/*`];
|
||||
if (platform === "android") {
|
||||
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "src", "main", "assets", "snapshots")}`);
|
||||
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
|
||||
}
|
||||
|
||||
const config = {
|
||||
mode: production ? "production" : "development",
|
||||
context: appFullPath,
|
||||
externals,
|
||||
watchOptions: {
|
||||
ignored: [
|
||||
appResourcesFullPath,
|
||||
// Don't watch hidden files
|
||||
"**/.*",
|
||||
]
|
||||
},
|
||||
target: nativescriptTarget,
|
||||
entry: entries,
|
||||
output: {
|
||||
pathinfo: false,
|
||||
path: dist,
|
||||
sourceMapFilename,
|
||||
libraryTarget: "commonjs2",
|
||||
filename: "[name].js",
|
||||
globalObject: "global",
|
||||
hashSalt
|
||||
},
|
||||
resolve: {
|
||||
extensions: [".ts", ".js", ".scss", ".css"],
|
||||
// Resolve {N} system modules from tns-core-modules
|
||||
modules: [
|
||||
resolve(__dirname, "node_modules/tns-core-modules"),
|
||||
resolve(__dirname, "node_modules"),
|
||||
"node_modules/tns-core-modules",
|
||||
"node_modules",
|
||||
],
|
||||
alias: {
|
||||
'~': appFullPath
|
||||
},
|
||||
// resolve symlinks to symlinked modules
|
||||
symlinks: true
|
||||
},
|
||||
resolveLoader: {
|
||||
// don't resolve symlinks to symlinked loaders
|
||||
symlinks: false
|
||||
},
|
||||
node: {
|
||||
// Disable node shims that conflict with NativeScript
|
||||
"http": false,
|
||||
"timers": false,
|
||||
"setImmediate": false,
|
||||
"fs": "empty",
|
||||
"__dirname": false,
|
||||
},
|
||||
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
|
||||
optimization: {
|
||||
runtimeChunk: "single",
|
||||
splitChunks: {
|
||||
cacheGroups: {
|
||||
vendor: {
|
||||
name: "vendor",
|
||||
chunks: "all",
|
||||
test: (module, chunks) => {
|
||||
const moduleName = module.nameForCondition ? module.nameForCondition() : '';
|
||||
return /[\\/]node_modules[\\/]/.test(moduleName) ||
|
||||
appComponents.some(comp => comp === moduleName);
|
||||
|
||||
},
|
||||
enforce: true,
|
||||
},
|
||||
}
|
||||
},
|
||||
minimize: !!uglify,
|
||||
minimizer: [
|
||||
new TerserPlugin({
|
||||
parallel: true,
|
||||
cache: true,
|
||||
sourceMap: isAnySourceMapEnabled,
|
||||
terserOptions: {
|
||||
output: {
|
||||
comments: false,
|
||||
semicolons: !isAnySourceMapEnabled
|
||||
},
|
||||
compress: {
|
||||
// The Android SBG has problems parsing the output
|
||||
// when these options are enabled
|
||||
'collapse_vars': platform !== "android",
|
||||
sequences: platform !== "android",
|
||||
}
|
||||
}
|
||||
})
|
||||
],
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: nsWebpack.getEntryPathRegExp(appFullPath, entryPath),
|
||||
use: [
|
||||
// Require all Android app components
|
||||
platform === "android" && {
|
||||
loader: "nativescript-dev-webpack/android-app-components-loader",
|
||||
options: { modules: appComponents }
|
||||
},
|
||||
|
||||
{
|
||||
loader: "nativescript-dev-webpack/bundle-config-loader",
|
||||
options: {
|
||||
loadCss: !snapshot, // load the application css if in debug mode
|
||||
unitTesting,
|
||||
appFullPath,
|
||||
projectRoot,
|
||||
}
|
||||
},
|
||||
].filter(loader => !!loader)
|
||||
},
|
||||
|
||||
{
|
||||
test: /-page\.ts$/,
|
||||
use: "nativescript-dev-webpack/script-hot-loader"
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(css|scss)$/,
|
||||
use: "nativescript-dev-webpack/style-hot-loader"
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(html|xml)$/,
|
||||
use: "nativescript-dev-webpack/markup-hot-loader"
|
||||
},
|
||||
|
||||
{ test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader" },
|
||||
|
||||
{
|
||||
test: /\.css$/,
|
||||
use: { loader: "css-loader", options: { url: false } }
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.scss$/,
|
||||
use: [
|
||||
{ loader: "css-loader", options: { url: false } },
|
||||
"sass-loader"
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.ts$/,
|
||||
use: {
|
||||
loader: "ts-loader",
|
||||
options: {
|
||||
configFile: tsConfigPath,
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
|
||||
transpileOnly: true,
|
||||
allowTsInNodeModules: true,
|
||||
compilerOptions: {
|
||||
sourceMap: isAnySourceMapEnabled,
|
||||
declaration: false
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
]
|
||||
},
|
||||
plugins: [
|
||||
// Define useful constants like TNS_WEBPACK
|
||||
new webpack.DefinePlugin({
|
||||
"global.TNS_WEBPACK": "true",
|
||||
"process": undefined,
|
||||
}),
|
||||
// Remove all files from the out dir.
|
||||
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),
|
||||
// Copy assets to out dir. Add your own globs as needed.
|
||||
new CopyWebpackPlugin([
|
||||
{ from: { glob: "fonts/**" } },
|
||||
{ from: { glob: "**/*.jpg" } },
|
||||
{ from: { glob: "**/*.png" } },
|
||||
], { ignore: [`${relative(appPath, appResourcesFullPath)}/**`] }),
|
||||
new nsWebpack.GenerateNativeScriptEntryPointsPlugin("bundle"),
|
||||
// For instructions on how to set up workers with webpack
|
||||
// check out https://github.com/nativescript/worker-loader
|
||||
new NativeScriptWorkerPlugin(),
|
||||
new nsWebpack.PlatformFSPlugin({
|
||||
platform,
|
||||
platforms,
|
||||
}),
|
||||
// Does IPC communication with the {N} CLI to notify events when running in watch mode.
|
||||
new nsWebpack.WatchStateLoggerPlugin(),
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#faster-builds
|
||||
// https://github.com/TypeStrong/ts-loader/blob/ea2fcf925ec158d0a536d1e766adfec6567f5fb4/README.md#hot-module-replacement
|
||||
new ForkTsCheckerWebpackPlugin({
|
||||
tsconfig: tsConfigPath,
|
||||
async: false,
|
||||
useTypescriptIncrementalApi: true,
|
||||
memoryLimit: 4096
|
||||
})
|
||||
],
|
||||
};
|
||||
|
||||
if (report) {
|
||||
// Generate report files for bundles content
|
||||
config.plugins.push(new BundleAnalyzerPlugin({
|
||||
analyzerMode: "static",
|
||||
openAnalyzer: false,
|
||||
generateStatsFile: true,
|
||||
reportFilename: resolve(projectRoot, "report", `report.html`),
|
||||
statsFilename: resolve(projectRoot, "report", `stats.json`),
|
||||
}));
|
||||
}
|
||||
|
||||
if (snapshot) {
|
||||
config.plugins.push(new nsWebpack.NativeScriptSnapshotPlugin({
|
||||
chunk: "vendor",
|
||||
requireModules: [
|
||||
"tns-core-modules/bundle-entry-points",
|
||||
],
|
||||
projectRoot,
|
||||
webpackConfig: config,
|
||||
}));
|
||||
}
|
||||
|
||||
if (hmr) {
|
||||
config.plugins.push(new webpack.HotModuleReplacementPlugin());
|
||||
}
|
||||
|
||||
|
||||
return config;
|
||||
};
|
||||
34
e2e/file-qualifiers/.gitignore
vendored
34
e2e/file-qualifiers/.gitignore
vendored
@@ -1,35 +1 @@
|
||||
mochawesome-report
|
||||
|
||||
# NativeScript
|
||||
hooks/
|
||||
node_modules/
|
||||
platforms/
|
||||
|
||||
# NativeScript Template
|
||||
*.js.map
|
||||
*.js
|
||||
!webpack.config.js
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.idea
|
||||
.cloud
|
||||
.project
|
||||
tmp/
|
||||
typings/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
Execute Tests
|
||||
=============
|
||||
|
||||
TODO
|
||||
@@ -1 +0,0 @@
|
||||
{}
|
||||
@@ -18,7 +18,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"nativescript-dev-webpack": "next",
|
||||
"tns-platform-declarations": "next",
|
||||
"typescript": "3.4.5"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,24 +6,23 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"./node_modules/tns-core-modules/*",
|
||||
"./node_modules/*"
|
||||
],
|
||||
"~/*": [
|
||||
"app/*"
|
||||
],
|
||||
"*": [
|
||||
"./node_modules/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"platforms",
|
||||
"e2e"
|
||||
"platforms"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,8 +31,7 @@ module.exports = env => {
|
||||
|
||||
const {
|
||||
// The 'appPath' and 'appResourcesPath' values are fetched from
|
||||
// the nsconfig.json configuration file
|
||||
// when bundling with `tns run android|ios --bundle`.
|
||||
// the nsconfig.json configuration file.
|
||||
appPath = "app",
|
||||
appResourcesPath = "app/App_Resources",
|
||||
|
||||
@@ -135,7 +134,6 @@ module.exports = env => {
|
||||
return /[\\/]node_modules[\\/]/.test(moduleName) ||
|
||||
/[\\/]tns-core-modules[\\/]/.test(moduleName) || // <-- Needed for snapshot builds with linked modules!
|
||||
appComponents.some(comp => comp === moduleName);
|
||||
|
||||
},
|
||||
enforce: true,
|
||||
},
|
||||
@@ -165,7 +163,7 @@ module.exports = env => {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: nsWebpack.getEntryPathRegExp(appFullPath, entryPath),
|
||||
include: join(appFullPath, entryPath),
|
||||
use: [
|
||||
// Require all Android app components
|
||||
platform === "android" && {
|
||||
@@ -185,7 +183,7 @@ module.exports = env => {
|
||||
},
|
||||
].filter(loader => !!loader)
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
test: /\.(ts|css|scss|html|xml)$/,
|
||||
use: "nativescript-dev-webpack/hmr/hot-loader"
|
||||
|
||||
2
e2e/modal-navigation/.gitignore
vendored
2
e2e/modal-navigation/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
.vscode/settings.json
|
||||
mochawesome-report
|
||||
@@ -1,18 +1,3 @@
|
||||
Execute Tests
|
||||
=============
|
||||
|
||||
Android:
|
||||
|
||||
```
|
||||
npm run e2e -- --runType android23 # --devMode
|
||||
```
|
||||
|
||||
iOS:
|
||||
|
||||
```
|
||||
npm run e2e -- --runType sim.iPhoneX.iOS112 # --devMode
|
||||
```
|
||||
|
||||
Scenarios
|
||||
=============
|
||||
|
||||
|
||||
@@ -27,12 +27,6 @@ export function onModalNoPage(args: EventData) {
|
||||
closeCallback: () => console.log("home-page modal frame closed"),
|
||||
fullscreen: false
|
||||
});
|
||||
|
||||
view.showModal("modal-no-page/modal-no-page", {
|
||||
context: "context",
|
||||
closeCallback: () => console.log("home-page modal frame closed"),
|
||||
fullscreen: false
|
||||
});
|
||||
}
|
||||
|
||||
export function onPopoverModal(args: EventData) {
|
||||
@@ -121,4 +115,4 @@ export function onTabRootViewReset() {
|
||||
|
||||
export function onLayoutRootViewReset() {
|
||||
application._resetRootView({ moduleName: "layout-root" });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"useLegacyWorkflow": false
|
||||
}
|
||||
@@ -14,17 +14,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"nativescript-theme-core": "~1.0.6",
|
||||
"tns-core-modules": "next"
|
||||
"tns-core-modules": "file:../../tns-core-modules"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "~4.1.7",
|
||||
"@types/mocha": "~5.2.5",
|
||||
"@types/node": "~10.12.18",
|
||||
"mocha": "~5.2.0",
|
||||
"mochawesome": "~3.1.2",
|
||||
"nativescript-dev-appium": "next",
|
||||
"nativescript-dev-webpack": "next",
|
||||
"rimraf": "^2.6.2",
|
||||
"tns-platform-declarations": "next",
|
||||
"tns-platform-declarations": "file:../../tns-platform-declarations",
|
||||
"typescript": "~3.4.1"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
3
e2e/modal-navigation/references.d.ts
vendored
3
e2e/modal-navigation/references.d.ts
vendored
@@ -1 +1,2 @@
|
||||
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
|
||||
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
|
||||
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
|
||||
|
||||
@@ -6,24 +6,24 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"./node_modules/tns-core-modules/*",
|
||||
"./node_modules/*"
|
||||
],
|
||||
"~/*": [
|
||||
"app/*"
|
||||
],
|
||||
"*": [
|
||||
"./node_modules/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"e2e",
|
||||
"node_modules",
|
||||
"platforms",
|
||||
"e2e"
|
||||
"platforms"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
2
e2e/nested-frame-navigation/.gitignore
vendored
2
e2e/nested-frame-navigation/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
.vscode/settings.json
|
||||
mochawesome-report
|
||||
@@ -1,14 +0,0 @@
|
||||
Execute Tests
|
||||
=============
|
||||
|
||||
Android:
|
||||
|
||||
```
|
||||
npm run e2e -- --runType android23 # --devMode
|
||||
```
|
||||
|
||||
iOS:
|
||||
|
||||
```
|
||||
npm run e2e -- --runType sim.iPhoneX.iOS112 # --devMode
|
||||
```
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"useLegacyWorkflow": false
|
||||
}
|
||||
@@ -14,11 +14,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"nativescript-theme-core": "~1.0.4",
|
||||
"tns-core-modules": "next"
|
||||
"tns-core-modules": "file:../../tns-core-modules"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/chai": "~4.1.7",
|
||||
"@types/mocha": "~5.2.5",
|
||||
"@types/node": "~10.12.18",
|
||||
"mocha": "~5.2.0",
|
||||
"mochawesome": "~3.1.2",
|
||||
"nativescript-dev-appium": "next",
|
||||
|
||||
@@ -6,24 +6,24 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"*": [
|
||||
"./node_modules/tns-core-modules/*",
|
||||
"./node_modules/*"
|
||||
],
|
||||
"~/*": [
|
||||
"app/*"
|
||||
],
|
||||
"*": [
|
||||
"./node_modules/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"exclude": [
|
||||
"e2e",
|
||||
"node_modules",
|
||||
"platforms",
|
||||
"e2e"
|
||||
"platforms"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
37
e2e/ui-tests-app/.gitignore
vendored
37
e2e/ui-tests-app/.gitignore
vendored
@@ -1,38 +1 @@
|
||||
# NativeScript
|
||||
hooks/
|
||||
node_modules/
|
||||
platforms/
|
||||
|
||||
# NativeScript Template
|
||||
*.js.map
|
||||
*.js
|
||||
!webpack.config.js
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
.idea
|
||||
.cloud
|
||||
.project
|
||||
tmp/
|
||||
typings/
|
||||
|
||||
# Visual Studio Code
|
||||
.vscode/*
|
||||
.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
|
||||
# tests
|
||||
mochawesome-report
|
||||
e2e/resources/images/uitestsapp/*
|
||||
testapp
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"useLegacyWorkflow": false
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
"mochawesome": "~3.1.2",
|
||||
"nativescript-dev-appium": "next",
|
||||
"nativescript-dev-webpack": "next",
|
||||
"tns-platform-declarations": "next",
|
||||
"tns-platform-declarations": "file:../../tns-platform-declarations",
|
||||
"typescript": "~3.4.1"
|
||||
},
|
||||
"gitHead": "8ab7726d1ee9991706069c1359c552e67ee0d1a4",
|
||||
|
||||
2
e2e/ui-tests-app/references.d.ts
vendored
2
e2e/ui-tests-app/references.d.ts
vendored
@@ -1,2 +1,2 @@
|
||||
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
|
||||
/// <reference path="./node_modules/tns-platform-declarations/ios.d.ts" />
|
||||
/// <reference path="./node_modules/tns-platform-declarations/android.d.ts" />
|
||||
@@ -6,6 +6,7 @@
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": [
|
||||
"es6",
|
||||
"dom"
|
||||
@@ -14,17 +15,15 @@
|
||||
"paths": {
|
||||
"~/*": [
|
||||
"app/*"
|
||||
],
|
||||
"*": [
|
||||
"./node_modules/*"
|
||||
]
|
||||
}
|
||||
},
|
||||
"include": [
|
||||
"../tns-core-modules",
|
||||
"**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"../tns-core-modules/node_modules",
|
||||
"e2e",
|
||||
"node_modules",
|
||||
"platforms",
|
||||
"e2e"
|
||||
"platforms"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,12 +28,10 @@ module.exports = env => {
|
||||
|
||||
// Default destination inside platforms/<platform>/...
|
||||
const dist = resolve(projectRoot, nsWebpack.getAppPath(platform, projectRoot));
|
||||
const appResourcesPlatformDir = platform === "android" ? "Android" : "iOS";
|
||||
|
||||
const {
|
||||
// The 'appPath' and 'appResourcesPath' values are fetched from
|
||||
// the nsconfig.json configuration file
|
||||
// when bundling with `tns run android|ios --bundle`.
|
||||
// the nsconfig.json configuration file.
|
||||
appPath = "app",
|
||||
appResourcesPath = "app/App_Resources",
|
||||
|
||||
@@ -73,6 +71,7 @@ module.exports = env => {
|
||||
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
|
||||
}
|
||||
|
||||
nsWebpack.processAppComponents(appComponents, platform);
|
||||
const config = {
|
||||
mode: production ? "production" : "development",
|
||||
context: appFullPath,
|
||||
@@ -164,7 +163,7 @@ module.exports = env => {
|
||||
module: {
|
||||
rules: [
|
||||
{
|
||||
test: nsWebpack.getEntryPathRegExp(appFullPath, entryPath),
|
||||
include: join(appFullPath, entryPath),
|
||||
use: [
|
||||
// Require all Android app components
|
||||
platform === "android" && {
|
||||
@@ -179,24 +178,15 @@ module.exports = env => {
|
||||
unitTesting,
|
||||
appFullPath,
|
||||
projectRoot,
|
||||
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform)
|
||||
}
|
||||
},
|
||||
].filter(loader => !!loader)
|
||||
},
|
||||
|
||||
{
|
||||
test: /-page\.ts$/,
|
||||
use: "nativescript-dev-webpack/script-hot-loader"
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(css|scss)$/,
|
||||
use: "nativescript-dev-webpack/style-hot-loader"
|
||||
},
|
||||
|
||||
{
|
||||
test: /\.(html|xml)$/,
|
||||
use: "nativescript-dev-webpack/markup-hot-loader"
|
||||
test: /\.(ts|css|scss|html|xml)$/,
|
||||
use: "nativescript-dev-webpack/hmr/hot-loader"
|
||||
},
|
||||
|
||||
{ test: /\.(html|xml)$/, use: "nativescript-dev-webpack/xml-namespace-loader" },
|
||||
|
||||
Reference in New Issue
Block a user