diff --git a/demo/TypeScriptApp/package.json b/demo/TypeScriptApp/package.json index 99e8f4bd..e8e12a12 100644 --- a/demo/TypeScriptApp/package.json +++ b/demo/TypeScriptApp/package.json @@ -18,6 +18,9 @@ }, "devDependencies": { "awesome-typescript-loader": "~3.1.3", + "@types/chai": "^4.0.2", + "@types/mocha": "^2.2.41", + "@types/node": "^7.0.5", "babel-traverse": "6.26.0", "babel-types": "6.26.0", "babylon": "6.18.0", @@ -25,6 +28,9 @@ "css-loader": "~0.28.7", "extract-text-webpack-plugin": "~3.0.0", "lazy": "1.0.11", + "mocha": "~3.5.0", + "mocha-junit-reporter": "^1.13.0", + "mocha-multi": "^0.11.0", "nativescript-dev-appium": "next", "nativescript-dev-sass": "^1.3.5", "nativescript-dev-typescript": "next", @@ -35,9 +41,9 @@ "resolve-url-loader": "~2.1.0", "sass-loader": "^6.0.6", "typescript": "~2.6.2", - "webpack": "~3.8.1", - "webpack-bundle-analyzer": "^2.8.2", - "webpack-sources": "~1.0.1" + "webpack": "~3.10.0", + "webpack-bundle-analyzer": "^2.9.1", + "webpack-sources": "^1.1.0" }, "scripts": { "ns-bundle": "ns-bundle", diff --git a/index.js b/index.js index 119c629d..635752e3 100644 --- a/index.js +++ b/index.js @@ -12,8 +12,6 @@ if (isAngular({ projectDir: PROJECT_DIR })) { Object.assign(exports, require('./plugins/angular')); } -exports.uglifyMangleExcludes = require("./mangle-excludes"); - exports.getEntryModule = function () { const maybePackageJsonEntry = getPackageJsonEntry(); if (!maybePackageJsonEntry) { diff --git a/mangle-excludes.js b/mangle-excludes.js deleted file mode 100644 index 1e4c051f..00000000 --- a/mangle-excludes.js +++ /dev/null @@ -1,141 +0,0 @@ -module.exports = [ - // Control names - "AbsoluteLayout", - "ActionBar", - "ActivityIndicator", - "Button", - "DatePicker", - "DockLayout", - "EditableTextBase", - "FlexboxLayout", - "GridLayout", - "Image", - "Label", - "Layout", - "LayoutBase", - "ListPicker", - "ListView", - "Page", - "Progress", - "SearchBar", - "SegmentedBar", - "Slider", - "StackLayout", - "Switch", - "TabView", - "TextBase", - "TextField", - "TextView", - "TimePicker", - "View", - "WrapLayout", - - // Android native class extenders - "BroadcastReceiver", - "CustomTypefaceSpan", - "DialogFragmentClassInner", - "FragmentClass", - "ListViewAdapter", - "LruBitmapCache", - "NativeScriptActivity", - "OurTabHost", - "PageChangedListener", - "PagerAdapterClassInner", - "PinchGestureListener", - "SegmentedBarColorDrawable", - "SwipeGestureListener", - "TapAndDoubleTapGestureListener", - "WebViewClientClassInner", - - // tns 3.0 - "DisableUserInteractionListener", - "EditorActionListener", - "FocusChangeListener", - "TextWatcher", - "ValueChangeListenerImpl", - - "AnimationListnerImpl", - "AnimationListenerImpl", - "TransitionListenerImpl", - "CheckedChangeListenerImpl", - "ClickListenerImpl", - "CompatCloseListenerImpl", - "CloseListenerImpl", - "DateChangedListenerImpl", - "DialogFragmentImpl", - "EditTextListenersImpl", - "FormatterImpl", - "ImageLoadedListenerImpl", - "ItemClickListenerImpl", - "MenuItemClickListenerImpl", - "NSCacheDelegateImpl", - "NativeViewGroupImpl", - "PageChangedListenerImpl", - "PagerAdapterImpl", - "PinchGestureListenerImpl", - "CompatQueryTextListenerImpl", - "QueryTextListenerImpl", - "SeekBarChangeListenerImpl", - "SwipeGestureListenerImpl", - "TabChangeListenerImpl", - "TabContentFactoryImpl", - "TabHostImpl", - "TapAndDoubleTapGestureListenerImpl", - "TextTransformationImpl", - "TimeChangedListenerImpl", - "TouchListenerImpl", - "WebViewClientImpl", - - // iOS native class extenders - "AnimatedTransitioning", - "AnimationDelegateImpl", - "DataSource", - "FrameHandlerImpl", - "ListPickerDataSource", - "ListPickerDelegateImpl", - "ListViewCell", - "LocationListenerImpl", - "NSURLSessionTaskDelegateImpl", - "NotificationObserver", - "ObserverClass", - "Responder", - "SelectionHandlerImpl", - "SliderChangeHandlerImpl", - "SwitchChangeHandlerImpl", - "TapBarItemHandlerImpl", - "TapHandlerImpl", - "TimerTargetImpl", - "TouchGestureRecognizer", - "TransitionDelegate", - "UIActionSheetDelegateImpl", - "UIAlertViewDelegateImpl", - "UIDatePickerChangeHandlerImpl", - "UIDocumentInteractionControllerDelegateImpl", - "UIGestureRecognizerDelegateImpl", - "UIGestureRecognizerImpl", - "UIImagePickerControllerDelegateImpl", - "UINavigationControllerAnimatedDelegate", - "UINavigationControllerDelegateImpl", - "UINavigationControllerImpl", - "UIScrollViewDelegateImpl", - "UISearchBarDelegateImpl", - "UITabBarControllerDelegateImpl", - "UITabBarControllerImpl", - "UITableViewDelegateImpl", - "UITableViewRowHeightDelegateImpl", - "UITextFieldDelegateImpl", - "UITextFieldImpl", - "UITextViewDelegateImpl", - "UITimePickerChangeHandlerImpl", - "UIViewControllerImpl", - "UIWebViewDelegateImpl", - "Window", - - // Sidedrawer transitions - // Should be removed after {N} 4.0 is released - // See: https://github.com/telerik/nativescript-ui-feedback/issues/477#issuecomment-360772046 - "PushTransition", - "FadeTransition", - "SlideInOnTopTransition", -]; - diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js index 11bb5c8b..d70854b3 100644 --- a/templates/webpack.angular.js +++ b/templates/webpack.angular.js @@ -161,7 +161,6 @@ module.exports = env => { const compress = platform !== "android"; config.plugins.push(new UglifyJsPlugin({ uglifyOptions: { - mangle: { reserved: nsWebpack.uglifyMangleExcludes }, compress, } })); diff --git a/templates/webpack.javascript.js b/templates/webpack.javascript.js index 6307e4f3..9a54b4e9 100644 --- a/templates/webpack.javascript.js +++ b/templates/webpack.javascript.js @@ -139,7 +139,6 @@ module.exports = env => { const compress = platform !== "android"; config.plugins.push(new UglifyJsPlugin({ uglifyOptions: { - mangle: { reserved: nsWebpack.uglifyMangleExcludes }, compress, } })); diff --git a/templates/webpack.typescript.js b/templates/webpack.typescript.js index d1538ea3..99c1f2b6 100644 --- a/templates/webpack.typescript.js +++ b/templates/webpack.typescript.js @@ -141,7 +141,6 @@ module.exports = env => { const compress = platform !== "android"; config.plugins.push(new UglifyJsPlugin({ uglifyOptions: { - mangle: { reserved: nsWebpack.uglifyMangleExcludes }, compress, } }));