Skip to content

Commit 8168132

Browse files
Merge pull request #1 from typescript-package/develop
Preparation to v1.0.0
2 parents 6f8c76c + 09f20f4 commit 8168132

13 files changed

+265
-2
lines changed

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
2+
3+
# Compiled output
4+
/dist
5+
/tmp
6+
/out-tsc
7+
/bazel-out
8+
9+
# Node
10+
/node_modules
11+
npm-debug.log
12+
yarn-error.log
13+
14+
# IDEs and editors
15+
.idea/
16+
.project
17+
.classpath
18+
.c9/
19+
*.launch
20+
.settings/
21+
*.sublime-workspace
22+
23+
# Visual Studio Code
24+
.vscode/*
25+
!.vscode/settings.json
26+
!.vscode/tasks.json
27+
!.vscode/launch.json
28+
!.vscode/extensions.json
29+
.history/*
30+
31+
# Miscellaneous
32+
/.angular/cache
33+
.sass-cache/
34+
/connect.lock
35+
/coverage
36+
/libpeerconnection.log
37+
testem.log
38+
/typings
39+
40+
# System files
41+
.DS_Store
42+
Thumbs.db
43+
*.ignore
44+
temp

README.md

Lines changed: 97 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,97 @@
1-
# core
2-
Main package.
1+
<!-- <a href="https://www.typescriptlang.org/">
2+
<img src="https://creazilla-store.fra1.digitaloceanspaces.com/icons/3257106/file-type-typescript-official-icon-md.png" width="20%" />
3+
</a> -->
4+
5+
## typescript-package/core
6+
7+
Core package.
8+
9+
<!-- npm badge -->
10+
[![npm version][typescript-package-npm-badge-svg]][typescript-package-npm-badge]
11+
[![GitHub issues][typescript-package-badge-issues]][typescript-package-issues]
12+
[![GitHub license][typescript-package-badge-license]][typescript-package-license]
13+
14+
<br>
15+
16+
## Table of contents
17+
18+
* [Installation](#installation)
19+
* [Api](#api)
20+
* [Git](#git)
21+
* [Commit](#commit)
22+
* [Versioning](#versioning)
23+
* [License](#license)
24+
25+
## Installation
26+
27+
```bash
28+
npm install @typescript-package/core
29+
```
30+
31+
## Api
32+
33+
```typescript
34+
import {
35+
resultCallback,
36+
typeOf
37+
} from '@typescript-package/core';
38+
```
39+
40+
## GIT
41+
42+
### Commit
43+
44+
* [AngularJS Git Commit Message Conventions][git-commit-angular]
45+
* [Karma Git Commit Msg][git-commit-karma]
46+
* [Conventional Commits][git-commit-conventional]
47+
48+
### Versioning
49+
50+
[Semantic Versioning 2.0.0][git-semver]
51+
52+
**Given a version number MAJOR.MINOR.PATCH, increment the:**
53+
54+
* MAJOR version when you make incompatible API changes,
55+
* MINOR version when you add functionality in a backwards-compatible manner, and
56+
* PATCH version when you make backwards-compatible bug fixes.
57+
58+
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
59+
60+
**FAQ**
61+
How should I deal with revisions in the 0.y.z initial development phase?
62+
63+
> The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.
64+
65+
How do I know when to release 1.0.0?
66+
67+
> If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backwards compatibility, you should probably already be 1.0.0.
68+
69+
## License
70+
71+
MIT © angular-package ([license][typescript-package-license])
72+
73+
<!-- This package: typescript-package -->
74+
<!-- GitHub: badges -->
75+
[typescript-package-badge-issues]: https://img.shields.io/github/issues/typescript-package/core
76+
[typescript-package-badge-forks]: https://img.shields.io/github/forks/typescript-package/core
77+
[typescript-package-badge-stars]: https://img.shields.io/github/stars/typescript-package/core
78+
[typescript-package-badge-license]: https://img.shields.io/github/license/typescript-package/core
79+
<!-- GitHub: badges links -->
80+
[typescript-package-issues]: https://github.com/typescript-package/core/issues
81+
[typescript-package-forks]: https://github.com/typescript-package/core/network
82+
[typescript-package-license]: https://github.com/typescript-package/core/blob/master/LICENSE
83+
[typescript-package-stars]: https://github.com/typescript-package/core/stargazers
84+
<!-- This package -->
85+
86+
<!-- Package: typescript-package -->
87+
<!-- npm -->
88+
[typescript-package-npm-badge-svg]: https://badge.fury.io/js/%40typescript-package%2Fcore.svg
89+
[typescript-package-npm-badge]: https://badge.fury.io/js/%40typescript-package%2Fcore
90+
91+
<!-- GIT -->
92+
[git-semver]: http://semver.org/
93+
94+
<!-- GIT: commit -->
95+
[git-commit-angular]: https://gist.github.com/stephenparish/9941e89d80e2bc58a153
96+
[git-commit-karma]: http://karma-runner.github.io/0.10/dev/git-commit-msg.html
97+
[git-commit-conventional]: https://www.conventionalcommits.org/en/v1.0.0/

ng-package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3+
"dest": "../../dist/core",
4+
"lib": {
5+
"entryFile": "src/public-api.ts"
6+
},
7+
"keepLifecycleScripts": true
8+
}

package-lock.json

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"name": "@testing-package/core",
3+
"version": "1.0.0",
4+
"author": "wwwdev.io <[email protected]>",
5+
"description": "Core package.",
6+
"license": "MIT",
7+
"publishConfig": {
8+
"access": "public",
9+
"registry": "https://registry.npmjs.org"
10+
},
11+
"peerDependencies": {},
12+
"scripts": {
13+
"prepublishOnly": "npm run pkg && npm run clean",
14+
"pkg": "npm pkg delete dependencies",
15+
"clean": "npm pkg delete scripts"
16+
},
17+
"repository": {
18+
"type": "git",
19+
"url": "git+https://github.com/typescript-package/core.git"
20+
},
21+
"bugs": {
22+
"url": "https://github.com/typescript-package/core/issues"
23+
},
24+
"keywords": [
25+
"@typescript-package",
26+
"@typescript-package/core"
27+
],
28+
"funding": [
29+
{
30+
"type": "individual",
31+
"url": "https://checkout.revolut.com/pay/048b10a3-0e10-42c8-a917-e3e9cb4c8e29"
32+
}
33+
],
34+
"sideEffects": false
35+
}

src/lib/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
// Function.
2+
export { resultCallback } from './result-callback.func';
3+
export { typeOf } from './type-of.func';

src/lib/result-callback.func.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* @description Default function to handle `callback` of functions.
3+
* @param {boolean} result - A value of `boolean` type of the result of the check.
4+
* @returns {boolean} The returned value is a `boolean` of the result of the check.
5+
*/
6+
export const resultCallback = (result: boolean): boolean => result;

src/lib/type-of.func.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/**
2+
* @description Gets the specific object class type of any value.
3+
* @param {*} value Any value to check its object class type.
4+
* @returns {string} The return value is a `string` of the object class name.
5+
* @author https://javascript.plainenglish.io/the-best-way-to-type-check-in-vanilla-js-55197b4f45ec
6+
*/
7+
export const typeOf = (value: any): string =>
8+
Object.prototype.toString.call(value).slice(8, -1).toLowerCase();

src/public-api.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/*
2+
* Public API Surface of core
3+
*/
4+
export * from './lib';

ts-package-barcode-logo-512.png

13.7 KB
Loading

0 commit comments

Comments
 (0)