Skip to content

Commit

Permalink
Merge pull request #34 from Rebolon/feature/change-project-for-lib-an…
Browse files Browse the repository at this point in the history
…d-app-build

Feature/change project for lib and app build
  • Loading branch information
Rebolon authored Sep 29, 2022
2 parents 850179e + a9aea97 commit 0538b55
Show file tree
Hide file tree
Showing 116 changed files with 21,305 additions and 9,734 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
26 changes: 11 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,46 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
#/dist # need it to use it inside Github Pages
# Compiled output
#/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
# Node
/node_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
npm-debug.log
yarn-error.log

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

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

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

# System Files
# System files
.DS_Store
Thumbs.db
4 changes: 4 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
"recommendations": ["angular.ng-template"]
}
20 changes: 20 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "ng serve",
"type": "pwa-chrome",
"request": "launch",
"preLaunchTask": "npm: start",
"url": "http://localhost:4200/"
},
{
"name": "ng test",
"type": "chrome",
"request": "launch",
"preLaunchTask": "npm: test",
"url": "http://localhost:9876/debug.html"
}
]
}
42 changes: 42 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "start",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
},
{
"type": "npm",
"script": "test",
"isBackground": true,
"problemMatcher": {
"owner": "typescript",
"pattern": "$tsc",
"background": {
"activeOnStart": true,
"beginsPattern": {
"regexp": "(.*?)"
},
"endsPattern": {
"regexp": "bundle generation complete"
}
}
}
}
]
}
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
# NgAddressDataGouv

The aim of this project is to provide a web custom elements with an autocomplete input that consume the API of https://geo.api.gouv.fr
With this component you can fill an french address that will be validated against official geo.api.gouv.fr.
The aim of this project is to provide a web custom elements with an autocomplete input that consumes the API of https://adresse.data.gouv.fr/api-doc

You may also import the AppModule to use the component inside your angular project.
With this component you can fill an french address that will be validated against official https://adresse.data.gouv.fr/api-doc

You may also import the library to use the component inside your angular project.

## Usage

### All application

You only need to require the javascript files in your html template like this:

```
<script src="node_modules/ng-address-data-gouv/dist/dx/output-es2015.js" type="module"></script>
<script src="node_modules/ng-address-data-gouv/dist/dx/output-es5.js" nomodule></script>
<script src="node_modules/ng-address-data-gouv/dist/app/output.js" type="module"></script>
```

And then you can use the custom elements everyywhere like this:
And then you can use the custom elements everywhere like this:

```
<app-search-address></app-search-address>
<ng-address-data-gouv-search></ng-address-data-gouv-search>
```

### Parameters
Expand All @@ -27,16 +29,16 @@ And then you can use the custom elements everyywhere like this:
* placeholder: of the input, default is empty
* label: of the input, default is empty
* id: of the input if you need one, default is like this 'ri-address-search-component-' + (new Date()).getTime();
* uri: of the API in case you host your own server (cloned from https://github.com/etalab), default is the official uri https://api-adresse.data.gouv.fr
* uri: of the API in case you host your own server (cloned from https://github.com/etalab), default is the official uri https://adresse.data.gouv.fr/api-doc

### Output

* addressFound: the full address retreived from API with coordinates
* addressFound: the full address retrieved from API with coordinates

### Sample

```
<app-search-address (addressFound)="console.log($event)" width="500"></app-search-address>
<ng-address-data-gouv-search(addressFound)="console.log($event)" label="Just fill the input with a french postal address: " width="500"></app-search-address>
```

### Extra infos
Expand Down
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

Loading

0 comments on commit 0538b55

Please sign in to comment.