Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf: minify and bundle dist result #22

Merged
merged 4 commits into from
May 2, 2021
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
19 changes: 10 additions & 9 deletions .versionrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"packageFiles": [
{
"filename": "./src/package.json",
"type": "json"
}
"./src/package.json"
],
"bumpFiles": [
{
"filename": "./src/package.json",
"type": "json"
}
]
"./src/package.json"
],
"types": [
{ "type": "feat", "section": "New features" },
{ "type": "fix", "section": "Bug fixes" },
{ "type": "perf", "section": "Performance improvement" }
],
"gitTagFallback": false,
"dryRun": true
}
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@
"name": "nativescript-getters-root",
"version": "0.0.0",
"scripts": {
"dev": "npm run clean:dist && tsc --watch --project src/",
"build": "npm run clean:dist && tsc --project src/",
"lint": "eslint --ext=.ts src/",
"dev": "npm run clean:dist && cd src/ && npm run dev",
"build": "npm run clean:dist && cd src/ && npm run build",
"clean": "npm run clean:dist && ns clean",
"clean:dist": "rm -rfv src/dist/*",
"debug:ios": "ns debug ios",
"debug:android": "ns debug android",
"lint": "eslint --ext=.ts src/",
"release": "standard-version",
"release:patch": "standard-version --release-as patch",
"release:minor": "standard-version --release-as minor",
"release:major": "standard-version --release-as major",
"commit": "git-cz"
},
"devDependencies": {
"@nativescript/eslint-plugin": "0.0.4",
"@typescript-eslint/parser": "4.22.0",
"commitizen": "4.2.3",
"cz-conventional-changelog": "3.3.0",
"eslint": "7.25.0",
"nativescript": "8.0.1",
"standard-version": "9.2.0",
"typescript": "4.2.4"
"standard-version": "9.2.0"
}
}
1 change: 1 addition & 0 deletions src/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
!*.d.ts
!*.d.ts.map
package-lock.json
rollup.config.js
tsconfig.json
1 change: 1 addition & 0 deletions src/functions/classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getChildViews, showError } from '../helpers'
import type { View } from '@nativescript/core'
import type { IsChecked } from '../models/is-checked'

/** @internal */
export function getViewsByClasses (...classNames: string[]): View[] {
const parentView: View = this
const isChecked: IsChecked = function (classNames: string[]) {
Expand Down
1 change: 1 addition & 0 deletions src/functions/identifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getChildViews, showError } from '../helpers'
import type { View } from '@nativescript/core'
import type { IsChecked } from '../models/is-checked'

/** @internal */
export function getViewsByIdentifiers (...idNames: string[]): View[] {
const parentView: View = this
const isChecked: IsChecked = function (idNames: string[]) {
Expand Down
1 change: 1 addition & 0 deletions src/functions/properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getChildViews, showError } from '../helpers'
import type { View } from '@nativescript/core'
import type { IsChecked } from '../models/is-checked'

/** @internal */
export function getViewsByProperties (...propNames: string[]): View[] {
const parentView: View = this
const isChecked: IsChecked = function (propNames: string[]) {
Expand Down
1 change: 1 addition & 0 deletions src/functions/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getChildViews, showError } from '../helpers'
import type { View, Style } from '@nativescript/core'
import type { ValPair, IsChecked } from '../models'

/** @internal */
export function getViewsByStyles (...styles: ValPair[]): View[] {
const parentView: View = this
const isChecked: IsChecked = function (styles: ValPair[]) {
Expand Down
1 change: 1 addition & 0 deletions src/functions/tags.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getChildViews, showError } from '../helpers'
import type { View } from '@nativescript/core'
import type { IsChecked } from '../models/is-checked'

/** @internal */
export function getViewsByTags (...tagNames: string[]): View[] {
const parentView: View = this
const isChecked: IsChecked = function (tagNames: string[]) {
Expand Down
1 change: 1 addition & 0 deletions src/functions/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const types = {
]
}

/** @internal */
export function getViewsByTypes (...typeNames: string[]): View[] {
const parentView: View = this
const isChecked: IsChecked = function (typeNames: string[]) {
Expand Down
1 change: 1 addition & 0 deletions src/functions/val-pairs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { getChildViews, showError } from '../helpers'
import type { View } from '@nativescript/core'
import type { ValPair, IsChecked } from '../models'

/** @internal */
export function getViewsByValPairs (...valPairs: ValPair[]): View[] {
const parentView: View = this
const isChecked: IsChecked = function (valPairs: ValPair[]) {
Expand Down
1 change: 1 addition & 0 deletions src/helpers/get-child-views.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { ValPair, IsChecked } from '../models'
/**
* Retrieve child views that meet criteria
* @private
* @internal
* @see https://v7.docs.nativescript.org/api-reference/classes/view.html
* @see https://dev.to/hebashakeel/difference-between-call-apply-and-bind-4p98
* @param {string[]|ValPair[]} values
Expand Down
1 change: 1 addition & 0 deletions src/helpers/show-error.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/**
* Show a formatted error in the console
* @private
* @internal
* @param {Error} error
* @param {string} methodName
* @returns {void} Show console error
Expand Down
1 change: 1 addition & 0 deletions src/models/is-checked.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import type { ValPair } from './val-pair'

/** @internal */
export type IsChecked = (values: string[] | ValPair[]) => boolean
Loading