Skip to content

Commit 2392096

Browse files
committed
[Release] v1.0.0
1 parent 2e759b8 commit 2392096

15 files changed

+289
-5
lines changed

.eslintrc.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"env":
3+
{
4+
"browser": true,
5+
"es6": true,
6+
"node": true
7+
},
8+
"extends": "eslint:recommended",
9+
"parserOptions":
10+
{
11+
"sourceType": "module",
12+
"ecmaVersion": 2017
13+
},
14+
"plugins": [
15+
"snakecasejs"
16+
],
17+
"rules":
18+
{
19+
"indent": [
20+
"error",
21+
4,
22+
{
23+
"SwitchCase": 1
24+
}
25+
],
26+
"linebreak-style": [
27+
"error",
28+
"unix"
29+
],
30+
"quotes": [
31+
"error",
32+
"double"
33+
],
34+
"semi": [
35+
"error",
36+
"always"
37+
],
38+
"no-console": [
39+
"warn"
40+
],
41+
"no-constant-condition": [
42+
"warn"
43+
],
44+
"snakecasejs/snakecasejs": "warn"
45+
}
46+
}

.foreverignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
node_modules/**/*.js
2+
log/*
3+
logs/*
4+
*.log

.jshintrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"esversion": 6
3+
}

AUTHORS.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Patryk Rzucidlo (@ptkdev) [email protected]
2+
[![https://ptkdev.it](https://ptkdev.it/img/ptkdev_patryk_rzucidlo_avatar_150.png)](https://ptkdev.it)
3+
4+
`Lead Developer - June 12, 2018`
5+
* Portfolio: [https://ptkdev.it](https://ptkdev.it/)
6+
* Blog: [https://blog.ptkdev.it](https://blog.ptkdev.it)
7+
* Twitter: [https://twitter.com/ptkdev](https://twitter.com/ptkdev)
8+
* GitHub: [https://github.com/ptkdev](https://github.com/ptkdev)

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# v1.0.0 (June 12, 2018)
2+
3+
* First Release.
4+
* New: logo from [freepik](https://it.freepik.com/) (premium account)

INSTALL.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#### Setup
2+
1. Add dependencies on `package.json`
3+
```
4+
"dependencies": {
5+
"json-token-replace": "^1.0.0",
6+
}
7+
```
8+
9+
2. In your code:
10+
```
11+
const Jtr = require("json-token-replace");
12+
const jtr = new Jtr();
13+
14+
let json_output = jtr.replace("./json_with_tokens.json", "./json.json");
15+
```

ISSUE_TEMPLATE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
### Versions
2+
3+
Replace the values below with your own:
4+
5+
- **Version:** v1.0.0
6+
- **Node Version:** v8.9 (Plugin require >= 7.6)
7+
- **Operating System:** Ubuntu 14.04
8+
- **Browser:** Google Chrome 64
9+
10+
11+
### Expected Behavior
12+
13+
Please describe the program's expected behavior.
14+
15+
```
16+
17+
```
18+
19+
### Actual Behavior
20+
21+
Please describe the program's actual behavior. Please include any stack traces
22+
or log output in the back ticks below.
23+
24+
```
25+
26+
```
27+
28+
### Steps to Reproduce
29+
30+
Please include the steps the reproduce the issue, numbered below. Include as
31+
much detail as possible.
32+
33+
1. ...
34+
2. ...
35+
3. ...
36+
37+
### Screenshots (Optional)
38+
39+
If the error is graphical in nature it is helpful to provide a screenshot.

LICENSE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively
631631
state the exclusion of warranty; and each file should have at least
632632
the "copyright" line and a pointer to where the full notice is found.
633633

634-
<one line to give the program's name and a brief idea of what it does.>
635-
Copyright (C) <year> <name of author>
634+
{one line to give the program's name and a brief idea of what it does.}
635+
Copyright (C) 2017 PTKDev
636636

637637
This program is free software: you can redistribute it and/or modify
638638
it under the terms of the GNU General Public License as published by
@@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail.
652652
If the program does terminal interaction, make it output a short
653653
notice like this when it starts in an interactive mode:
654654

655-
<program> Copyright (C) <year> <name of author>
655+
{project} Copyright (C) 2017 Patryk Rzucidlo
656656
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657657
This is free software, and you are welcome to redistribute it
658658
under certain conditions; type `show c' for details.

README.md

100644100755
Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,52 @@
1-
# json-token-replace
2-
Replace token string {{hello}} in json with value from another json where key is token {"hello":"bye"}
1+
<p align="center"><a href="https://www.npmjs.com/package/json-token-replace" alt="Logo"><img src="https://ptkdev.it/img/github/json-token-replace.png"></a></p>
2+
3+
<p align="center"><h1 align="center">json-token-replace</h1></p>
4+
5+
<p align="center"><a href="#" alt="License"><img src="https://img.shields.io/badge/license-GLPv3-brightgreen.svg"></a>
6+
<a href="https://github.com/ptkdev/json-token-replace/releases" alt="Version"><img src="https://img.shields.io/badge/version-v1.0.0-lightgrey.svg"></a>
7+
<a href="https://slack.ptkdev.io" alt="Slack Chat"><img src="https://img.shields.io/badge/chat%20on-slack-orange.svg"></a>
8+
<a href="http://blog.ptkdev.io" alt="Blog"><img src="https://img.shields.io/badge/blog-medium-2AE176.svg"></a>
9+
<a href="https://twitter.com/ptkdevio" alt="Twitter"><img src="https://img.shields.io/badge/twitter-ptkdevio-2AA3EF.svg"></a>
10+
<a href="mailto:[email protected]" alt="Support: [email protected]"><img src="https://img.shields.io/badge/[email protected]"></a></p>
11+
<p align="center"><a href="http://patreon.ptkdev.io" alt="Patreon Backer"><img src="https://img.shields.io/badge/donate-patreon-F87668.svg"></a> <a href="http://paypal.ptkdev.io" alt="Paypale Donate"><img src="https://img.shields.io/badge/donate-paypal-46AFE0.svg"></a></p>
12+
13+
## What does it do
14+
Replace the token string {{hello}} in json with value from another json where key is token {"hello":"bye"}
15+
16+
#### Example:
17+
Json with tokens:
18+
`{ "john":"Alex" }`
19+
20+
Json:
21+
`{ "text": "hello {{john}}"}`
22+
23+
Output:
24+
`{ "text": "hello Alex"}`
25+
26+
## Features
27+
* [] Easy to use
28+
29+
## Fast setup
30+
1. Add dependencies on `package.json`
31+
```
32+
"dependencies": {
33+
"json-token-replace": "^1.0.0",
34+
}
35+
```
36+
2. In your code:
37+
```
38+
const Jtr = require("json-token-replace");
39+
const jtr = new Jtr();
40+
41+
let json_output = jtr.replace("./json_with_tokens.json", "./json.json");
42+
```
43+
3. If work add star :star: at this project :heart:
44+
4. If you want help me: <b><a href="http://paypal.ptkdev.io">donate on paypal</a></b> or become a <b><a href="http://patreon.ptkdev.io">backer on patreon</a></b>.
45+
46+
For advanced configuration see [INSTALL.md](https://github.com/ptkdev/json-token-replace/blob/master/INSTALL.md).
47+
48+
<h1>License</h1>
49+
50+
GNU GENERAL PUBLIC LICENSE
51+
52+
Copyright (c) 2018 Patryk Rzucidło (PTKDev)

TODO.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Roadmap
2+
Nothing

0 commit comments

Comments
 (0)