Skip to content

Commit

Permalink
Extract and move lib files to the separate project. Add demo app.
Browse files Browse the repository at this point in the history
  • Loading branch information
kolkov committed Jul 13, 2019
1 parent 14882b3 commit a8974d5
Show file tree
Hide file tree
Showing 66 changed files with 12,608 additions and 322 deletions.
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
107 changes: 46 additions & 61 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,61 +1,46 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
35 changes: 35 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
language: node_js
node_js:
- "10"
dist: trusty
sudo: required
addons:
chrome: stable
branches:
only:
- master
cache:
directories:
- node_modules
before_install:
- npm update
install:
- npm install
before_script:
- npm install -g @angular/cli
- npm install -g codecov
script:
# - ng lint
- npm run test-ci
- codecov
- npm run build:lib
before_deploy:
- cd dist/kolkov/ngx-dadata
deploy:
provider: npm
email: [email protected]
skip_cleanup: true
api_key: $NPM_TOKEN
on:
tags: true
repo: kolkov/ngx-dadata
Empty file added CHANGELOG.md
Empty file.
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@

# Report an Issue

Help us make `ngx-dadata` better! If you think you might have found a bug, or some other weirdness, start by making sure
it hasn't already been reported. You can [search through existing @kolkov/ngx-dadata issues](https://github.com/kolkov/ngx-dadata/issues)
to see if someone's reported one similar to yours.

If not, then [create a plunkr](http://bit.ly/UIR-Plunk) that demonstrates the problem (try to use as little code
as possible: the more minimalist, the faster we can debug it).

Next, [create a new issue](https://github.com/kolkov/ngx-dadata/issues/new) that briefly explains the problem,
and provides a bit of background as to the circumstances that triggered it. Don't forget to include the link to
that plunkr you created!

**Note**: If you're unsure how a feature is used, or are encountering some unexpected behavior that you aren't sure
is a bug, it's best to talk it out on
[StackOverflow](http://stackoverflow.com/questions/ask?tags=angular,@kolkov/ngx-dadata) before reporting it. This
keeps development streamlined, and helps us focus on building great software.


Issues only! |
-------------|
Please keep in mind that the issue tracker is for *issues*. Please do *not* post an issue if you need help or support. Instead, use StackOverflow. |

# Contribute

**(1)** See the **[Developing](#developing)** section below, to get the development version of `ngx-dadata` up and running on your local machine.

**(2)** Check out the [roadmap](https://github.com/kolkov/ngx-dadata/milestones) to see where the project is headed, and if your feature idea fits with where we're headed.

**(3)** If you're not sure, [open an RFC](https://github.com/kolkov/ngx-dadata/issues/new?title=RFC:%20My%20idea) to get some feedback on your idea.

**(4)** Finally, commit some code and open a pull request. Code & commits should abide by the following rules:

- *Always* have test coverage for new features (or regression tests for bug fixes), and *never* break existing tests
- Commits should represent one logical change each; if a feature goes through multiple iterations, squash your commits down to one
- Make sure to follow the [Angular commit message format](https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#commit-message-format) so your change will appear in the changelog of the next release.
- Changes should always respect the coding style of the project


# Developing

`ngx-dadata` uses <code>Angular cli</code>, <code>npm</code> and <code>webpack</code>.

## Fetch the source code

The code for `ngx-dadata` is :

* [AngularEditor](https://github.com/kolkov/ngx-dadata) (`@kolkov/ngx-dadata` on npm)

Clone repository.

```
mkdir dadata
cd dadata
git clone https://github.com/kolkov/ngx-dadata.git
```

## Install dependencies

Use `npm` to install the development dependencies for the repository.

```
cd dadata
npm install
```

After executing these steps, your local copy of `@kolkov/ngx-dadata-app` will be built using your local copy of `@kolkov/ngx-dadata`
instead of the prebuilt version specified in `package.json`.

## Develop

* `npm run build:lib: Continuously builds the `@kolkov/ngx-dadata` code when sources change.
* `npm run start`: Continuously builds and runs Demo app when source or tests change.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[![npm version](https://badge.fury.io/js/%40kolkov%2Fngx-dadata.svg)](https://badge.fury.io/js/%40kolkov%2Fngx-dadata)
[![Build Status](https://travis-ci.org/kolkov/ngx-dadata.svg?branch=master)](https://travis-ci.org/kolkov/ngx-dadata)
[![Coverage Status](https://coveralls.io/repos/github/kolkov/ngx-dadata/badge.svg?branch=master)](https://coveralls.io/github/kolkov/ngx-dadata?branch=master)
[![codecov](https://codecov.io/gh/kolkov/ngx-dadata/branch/master/graph/badge.svg)](https://codecov.io/gh/kolkov/ngx-dadata)

# ngx-dadata
Angular 6+ [DaData][dadata] suggestion (подсказки) implementation

Expand Down Expand Up @@ -45,18 +50,54 @@ or
where

```typescript
import { DaDataConfig } from '@kolkov/ngx-dadata';
import { DadataConfig } from '@kolkov/ngx-dadata';

...

config: DaDataConfig = {
config: DadataConfig = {
apiKey: 'your_api_key',
type: DaDataType.address
};
```

For `ngModel` to work, you must import `FormsModule` from `@angular/forms`, or for `formControlName`, you must import `ReactiveFormsModule` from `@angular/forms`

## What's included

Within the download you'll find the following directories and files. You'll see something like this:

```
dadata/
└── projects/
├── ngx-dadata/
└── ngx-dadata-app/
```
`ngx-dadata/` - library

`ngx-dadata-app/` - demo application

## Documentation

The documentation for the `ngx-dadata` is hosted at our website [ngx-dadata](https://ngx-dadata.kolkov.ru/)

## Contributing

Please read through our [contributing guidelines](https://github.com/kolkov/ngx-dadata/blob/master/CONTRIBUTING.md). Included are directions for opening issues, coding standards, and notes on development.

Editor preferences are available in the [editor config](https://github.com/kolkov/ngx-dadata/blob/master/.editorconfig) for easy use in common text editors. Read more and download plugins at <http://editorconfig.org>.

## Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, `ngx-dadata` is maintained under [the Semantic Versioning guidelines](http://semver.org/).

See [the Releases section of our project](https://github.com/kolkov/ngx-dadata/releases) for changelogs for each release version.

## Creators

**Andrey Kolkov**

* <https://github.com/kolkov>

[npm]: https://www.npmjs.com/
[dadata]: https://dadata.ru/api/suggest/
[demo]: https://ngx-dadata.stackblitz.io/
Expand Down
Loading

0 comments on commit a8974d5

Please sign in to comment.