mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -1,18 +1,8 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ES2017",
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"experimentalDecorators": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"noEmitHelpers": true,
|
||||
"noEmitOnError": true,
|
||||
"skipLibCheck": true,
|
||||
"lib": ["es2018", "dom"],
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["src/*"]
|
||||
}
|
||||
},
|
||||
"exclude": ["node_modules", "platforms"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,13 +31,6 @@ function ensureImageSource() {
|
||||
}
|
||||
}
|
||||
|
||||
let platform: typeof platformModule;
|
||||
function ensurePlatform() {
|
||||
if (!platform) {
|
||||
platform = require('../../platform');
|
||||
}
|
||||
}
|
||||
|
||||
let fs: typeof fsModule;
|
||||
function ensureFileSystem() {
|
||||
if (!fs) {
|
||||
@@ -205,8 +198,6 @@ function buildJavaOptions(options: httpModule.HttpRequestOptions) {
|
||||
javaOptions.headers = arrayList;
|
||||
}
|
||||
|
||||
ensurePlatform();
|
||||
|
||||
// pass the maximum available image size to the request options in case we need a bitmap conversion
|
||||
javaOptions.screenWidth = Screen.mainScreen.widthPixels;
|
||||
javaOptions.screenHeight = Screen.mainScreen.heightPixels;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
"rootDir": "./",
|
||||
"types": ["node"],
|
||||
"plugins": [
|
||||
{ "transform": "../webpack/transformers/ns-transform-native-classes.ts", "type": "raw" }
|
||||
{ "transform": "../../../packages/webpack/transformers/ns-transform-native-classes.ts", "type": "raw" }
|
||||
]
|
||||
},
|
||||
"exclude": ["**/*.spec.ts", "dist", "__tests__"],
|
||||
|
||||
@@ -6,6 +6,7 @@ const nativescriptTarget = require('@nativescript/webpack/nativescript-target');
|
||||
const {
|
||||
nsSupportHmrNg
|
||||
} = require('@nativescript/webpack/transformers/ns-support-hmr-ng');
|
||||
const nsTransformNativeClasses = require("@nativescript/webpack/transformers/ns-transform-native-classes").default;
|
||||
const {
|
||||
getMainModulePath
|
||||
} = require('@nativescript/webpack/utils/ast-utils');
|
||||
|
||||
@@ -51,6 +51,7 @@ const webpackConfigAngular = proxyquire('./webpack.angular', {
|
||||
return FakeHmrTransformerFlag;
|
||||
},
|
||||
},
|
||||
'@nativescript/webpack/transformers/ns-transform-native-classes': emptyObject,
|
||||
'@nativescript/webpack/utils/ast-utils': {
|
||||
getMainModulePath: () => {
|
||||
return 'fakePath';
|
||||
@@ -78,6 +79,7 @@ const webpackConfigAngular = proxyquire('./webpack.angular', {
|
||||
const webpackConfigTypeScript = proxyquire('./webpack.typescript', {
|
||||
'@nativescript/webpack': nativeScriptDevWebpack,
|
||||
'@nativescript/webpack/nativescript-target': emptyObject,
|
||||
'@nativescript/webpack/transformers/ns-transform-native-classes': emptyObject,
|
||||
'@nativescript/webpack/utils/tsconfig-utils': {
|
||||
getNoEmitOnErrorFromTSConfig: () => {
|
||||
return false;
|
||||
@@ -98,6 +100,7 @@ const webpackConfigJavaScript = proxyquire('./webpack.javascript', {
|
||||
const webpackConfigVue = proxyquire('./webpack.vue', {
|
||||
'@nativescript/webpack': nativeScriptDevWebpack,
|
||||
'@nativescript/webpack/nativescript-target': emptyObject,
|
||||
'@nativescript/webpack/transformers/ns-transform-native-classes': emptyObject,
|
||||
'vue-loader/lib/plugin': EmptyClass,
|
||||
'nativescript-vue-template-compiler': emptyObject,
|
||||
'terser-webpack-plugin': TerserJsStub,
|
||||
|
||||
@@ -5,6 +5,7 @@ const webpack = require("webpack");
|
||||
const nsWebpack = require("@nativescript/webpack");
|
||||
const nativescriptTarget = require("@nativescript/webpack/nativescript-target");
|
||||
const { getNoEmitOnErrorFromTSConfig } = require("@nativescript/webpack/utils/tsconfig-utils");
|
||||
const nsTransformNativeClasses = require("@nativescript/webpack/transformers/ns-transform-native-classes").default;
|
||||
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
|
||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
|
||||
@@ -246,7 +247,10 @@ module.exports = env => {
|
||||
compilerOptions: {
|
||||
sourceMap: isAnySourceMapEnabled,
|
||||
declaration: false
|
||||
}
|
||||
},
|
||||
getCustomTransformers: (program) => ({
|
||||
before: [nsTransformNativeClasses]
|
||||
})
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@@ -11,6 +11,7 @@ const NsVueTemplateCompiler = require("nativescript-vue-template-compiler");
|
||||
|
||||
const nsWebpack = require("@nativescript/webpack");
|
||||
const nativescriptTarget = require("@nativescript/webpack/nativescript-target");
|
||||
const nsTransformNativeClasses = require("@nativescript/webpack/transformers/ns-transform-native-classes").default;
|
||||
const { NativeScriptWorkerPlugin } = require("nativescript-worker-loader/NativeScriptWorkerPlugin");
|
||||
const hashSalt = Date.now().toString();
|
||||
|
||||
@@ -264,7 +265,10 @@ module.exports = env => {
|
||||
allowTsInNodeModules: true,
|
||||
compilerOptions: {
|
||||
declaration: false
|
||||
}
|
||||
},
|
||||
getCustomTransformers: (program) => ({
|
||||
before: [nsTransformNativeClasses]
|
||||
})
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user