Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ debugger
dist
report

webpack.config.js

app/**/*.map
app/**/*.js

Expand Down
4 changes: 2 additions & 2 deletions app/app.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

@import '~nativescript-theme-core/css/core.css';
@import '~nativescript-theme-core/css/forest.css';
@import '~@nativescript/theme/css/core.css';
@import '~@nativescript/theme/css/forest.css';

.far {
font-family: "Font Awesome 5 Free", "fa-regular-400";
Expand Down
1 change: 0 additions & 1 deletion app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { AppModule } from "./app.module";
import { ios } from "tns-core-modules/application";
import { isIOS } from "tns-core-modules/platform";
import { MyDelegate } from "./delegate/my-delegate";
import "nativescript-theme-core";

if (isIOS) {
ios.delegate = MyDelegate;
Expand Down
2 changes: 1 addition & 1 deletion app/ng-ui-widgets-category/action-bar/styling/article.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

To style the `ActionBar`, you can use only `background-color` and `color` properties. Alternatively, you can use `nativescript-theme-core` and use the default styles for each different theme. The `icon` property of `ActionItem` can use Icon Fonts with the `font://` prefix. By setting up this prefix, a new image will be generated, which will be set as an ActionItem's `icon` resource. While using this functionality, we need to specify the `font-size`, which will calculate the size of the generated image base on the device's dpi.
To style the `ActionBar`, you can use only `background-color` and `color` properties. Alternatively, you can use `@nativescript/theme` and use the default styles for each different theme. The `icon` property of `ActionItem` can use Icon Fonts with the `font://` prefix. By setting up this prefix, a new image will be generated, which will be set as an ActionItem's `icon` resource. While using this functionality, we need to specify the `font-size`, which will calculate the size of the generated image base on the device's dpi.

<snippet id='actionbar-icon-fonts-html'/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ The `ActivityIndicator` supports styling the `color` (default value is `blue`) a

<snippet id='activity-indicator-styling-html'/>

| **nativescript-theme-core** CSS class | Description |
| **@nativescript/theme** CSS class | Description |
|:---------------------------------------|:----------------|
| `activity-indicator` | Styles the `color` of the indicator in sync with the main theme color. |
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Button text="Button"></Button>
<!-- Using local CSS class -->
<Button text=".my-button" class="my-button"></Button>
<!-- Using nativescript-theme-core CSS classes -->
<!-- Using @nativescript/theme CSS classes -->
<Button text="Button.-primary" class="-primary"></Button>
<Button class="-primary">
<FormattedString>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<GridLayout rows="*" sdkExampleTitle sdkToggleNavButton>
<!-- >> listview-styling-html -->
<!--
The nativescript-theme-core provides ListView CSS classes (`list-group` & `list-group-item`) for setting recommended paddings & margins for ListView items.
The @nativescript/theme provides ListView CSS classes (`list-group` & `list-group-item`) for setting recommended paddings & margins for ListView items.
These class names adds a bit of spacing and the theme’s color scheme.
-->
<ListView [items]="items" class="list-group"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Note; backgroundColor will work only on iOS; onAndroid the background will be the color with applied opacity
-->
<Progress value="50" maxValue="100" backgroundColor="red" color="green"></Progress>
<!-- Using the nativescript-theme-core CSS class to change the Progress style -->
<!-- Using the @nativescript/theme CSS class to change the Progress style -->
<Progress value="25" maxValue="100" class="progress"></Progress>
<!-- << progress-style-html -->
</StackLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/ng-ui-widgets-category/switch/styling/article.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ The styling properties for the `Swtich` control are as follows:

<snippet id='switch-styling-html'/>

> Note: When using `nativescript-theme-core` the default style will be set according to the used theme (no need to set additional CSS classes).
> Note: When using `@nativescript/theme` the default style will be set according to the used theme (no need to set additional CSS classes).
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ import { Link } from "./../../link";

let menuLinks = [
new Link("Usage", "/web-view/usage"),
new Link("Tips & Tricks", "/web-view/tips-and-tricks"),
new Link("WebView with HTML File", "/web-view/html-file"),
new Link("Tips & Tricks", "/web-view/tips-and-tricks")
];

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { NativeScriptCommonModule } from "nativescript-angular/common";
import { WebViewExamplesComponent } from "./web-view-examples.component";
import { UsageComponent } from "./usage/usage.component";
import { TipsAndTricksComponent } from "./tips-and-tricks/tips-and-tricks.component";
import { WebViewHtmlComponent } from "./web-view-html/web-view-html.component";
import { TitleAndNavButtonModule } from "../../directives/title-and-nav-button.module";

export const routerConfig = [
Expand All @@ -22,11 +21,6 @@ export const routerConfig = [
path: "tips-and-tricks",
component: TipsAndTricksComponent,
data: { title: "Tips and Tricks" }
},
{
path: "html-file",
component: WebViewHtmlComponent,
data: { title: "Using HTML file" }
}
];

Expand All @@ -38,7 +32,7 @@ export const routerConfig = [
NativeScriptRouterModule,
NativeScriptRouterModule.forChild(routerConfig)
],
declarations: [WebViewExamplesComponent, UsageComponent, TipsAndTricksComponent, WebViewHtmlComponent]
declarations: [WebViewExamplesComponent, UsageComponent, TipsAndTricksComponent]
})

export class WebViewExamplesModule { }
Expand Down

This file was deleted.

34 changes: 0 additions & 34 deletions app/ng-ui-widgets-category/web-view/web-view-html/test.html

This file was deleted.

This file was deleted.

This file was deleted.

17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"nativescript": {
"id": "org.nativescript.nativescriptsdkexamplesng",
"tns-android": {
"version": "6.1.0"
"version": "6.2.0-2019-10-16-170919-03"
},
"tns-ios": {
"version": "6.1.0"
Expand All @@ -36,25 +36,25 @@
"@angular/platform-browser": "~8.2.0",
"@angular/platform-browser-dynamic": "~8.2.0",
"@angular/router": "~8.2.0",
"nativescript-angular": "~8.2.0",
"@nativescript/theme": "^2.1.2",
"nativescript-angular": "8.3.0-next-2019-10-17-143908-01",
"nativescript-camera": "^4.5.0",
"nativescript-geolocation": "^5.1.0",
"nativescript-intl": "~3.0.0",
"nativescript-theme-core": "^2.0.9",
"reflect-metadata": "~0.1.12",
"rxjs": "^6.4.0",
"tns-core-modules": "6.1.0",
"tns-core-modules": "6.3.0-next-2019-10-17-174536-07",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "8.2.0",
"@ngtools/webpack": "8.2.0",
"@angular/compiler-cli": "~8.2.0",
"@ngtools/webpack": "~8.2.0",
"codelyzer": "^3.0.1",
"fs-extra": "^0.30.0",
"glob": "^7.1.3",
"lazy": "1.0.11",
"markdown-snippet-injector": "^0.2.2",
"nativescript-dev-webpack": "~1.2.0",
"nativescript-dev-webpack": "1.4.0-next-2019-10-17-185549-03",
"opener": "^1.4.1",
"rimraf": "^2.5.3",
"tar.gz": "^1.0.5",
Expand All @@ -75,6 +75,7 @@
"update-webpack": "./node_modules/.bin/update-ns-webpack --deps --configs",
"update-angular": "./node_modules/.bin/update-app-ng-deps",
"update-app-ng-deps": "update-app-ng-deps",
"ns-verify-bundle": "ns-verify-bundle"
"ns-verify-bundle": "ns-verify-bundle",
"update-ns-webpack": "update-ns-webpack"
}
}
12 changes: 11 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const { nsReplaceBootstrap } = require("nativescript-dev-webpack/transformers/ns
const { nsReplaceLazyLoader } = require("nativescript-dev-webpack/transformers/ns-replace-lazy-loader");
const { nsSupportHmrNg } = require("nativescript-dev-webpack/transformers/ns-support-hmr-ng");
const { getMainModulePath } = require("nativescript-dev-webpack/utils/ast-utils");
const { getNoEmitOnErrorFromTSConfig } = require("nativescript-dev-webpack/utils/tsconfig-utils");
const CleanWebpackPlugin = require("clean-webpack-plugin");
const CopyWebpackPlugin = require("copy-webpack-plugin");
const { BundleAnalyzerPlugin } = require("webpack-bundle-analyzer");
Expand Down Expand Up @@ -50,8 +51,12 @@ module.exports = env => {
hmr, // --env.hmr,
unitTesting, // --env.unitTesting
verbose, // --env.verbose
snapshotInDocker, // --env.snapshotInDocker
skipSnapshotTools, // --env.skipSnapshotTools
compileSnapshot // --env.compileSnapshot
} = env;

const useLibs = compileSnapshot;
const isAnySourceMapEnabled = !!sourceMap || !!hiddenSourceMap;
const externals = nsWebpack.getConvertedExternals(env.externals);
const appFullPath = resolve(projectRoot, appPath);
Expand Down Expand Up @@ -107,6 +112,8 @@ module.exports = env => {
itemsToClean.push(`${join(projectRoot, "platforms", "android", "app", "build", "configurations", "nativescript-android-snapshot")}`);
}

const noEmitOnErrorFromTSConfig = getNoEmitOnErrorFromTSConfig(join(projectRoot, tsConfigName));

nsWebpack.processAppComponents(appComponents, platform);
const config = {
mode: production ? "production" : "development",
Expand Down Expand Up @@ -158,6 +165,7 @@ module.exports = env => {
devtool: hiddenSourceMap ? "hidden-source-map" : (sourceMap ? "inline-source-map" : "none"),
optimization: {
runtimeChunk: "single",
noEmitOnErrors: noEmitOnErrorFromTSConfig,
splitChunks: {
cacheGroups: {
vendor: {
Expand Down Expand Up @@ -268,7 +276,6 @@ module.exports = env => {
new CleanWebpackPlugin(itemsToClean, { verbose: !!verbose }),
// Copy assets to out dir. Add your own globs as needed.
new CopyWebpackPlugin([
{ from: { glob: "ng-ui-widgets-category/web-view/web-view-html/*.html"} },
{ from: { glob: "fonts/**" } },
{ from: { glob: "**/*.jpg" } },
{ from: { glob: "**/*.png" } },
Expand Down Expand Up @@ -309,6 +316,9 @@ module.exports = env => {
],
projectRoot,
webpackConfig: config,
snapshotInDocker,
skipSnapshotTools,
useLibs
}));
}

Expand Down
10 changes: 0 additions & 10 deletions webpack.config.md

This file was deleted.