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:
Vasil Chimev
2019-08-18 23:16:35 +03:00
committed by Svetoslav
parent a614fc94d0
commit 70f8d70f07
44 changed files with 80 additions and 1184 deletions

32
tests/.gitignore vendored
View File

@@ -1,33 +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

View File

@@ -1,3 +0,0 @@
{
"useLegacyWorkflow": false
}

View File

@@ -1,2 +1,2 @@
/// <reference path="../tns-platform-declarations/android.d.ts" />
/// <reference path="../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" />

View File

@@ -5,7 +5,8 @@
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noEmitHelpers": true,
"noEmitOnError": false,
"noEmitOnError": true,
"skipLibCheck": true,
"lib": [
"es6",
"dom"
@@ -14,15 +15,13 @@
"paths": {
"~/*": [
"app/*"
],
"*": [
"./node_modules/*"
]
}
},
"include": [
"../tns-core-modules",
"**/*"
],
"exclude": [
"../tns-core-modules/node_modules",
"node_modules",
"platforms"
]

View File

@@ -6,7 +6,6 @@ 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 ExtraWatchWebpackPlugin = require('extra-watch-webpack-plugin');
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
const TerserPlugin = require("terser-webpack-plugin");
@@ -29,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",
@@ -74,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,
@@ -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" && {
@@ -180,6 +178,7 @@ module.exports = env => {
unitTesting,
appFullPath,
projectRoot,
ignoredFiles: nsWebpack.getUserDefinedEntries(entries, platform),
registerModules: /(root|page\d*|Page\d*|Templates|template|ActionBar_\w*|module|one|two|Control|control|Controls|template|element|fragment)\.(xml|css|js|ts|scss)$/ // NB: MODIFIED
}
},
@@ -187,18 +186,8 @@ module.exports = env => {
},
{
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" },
@@ -239,7 +228,7 @@ module.exports = env => {
// Define useful constants like TNS_WEBPACK
new webpack.DefinePlugin({
"global.TNS_WEBPACK": "true",
"process": undefined,
"process": "global.process",
}),
// Remove all files from the out dir.
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),
@@ -269,9 +258,6 @@ module.exports = env => {
async: false,
useTypescriptIncrementalApi: true,
memoryLimit: 4096
}),
new ExtraWatchWebpackPlugin({
files: [`node_modules/**/*.${platform}.ts`]
})
],
};