@bigbinary/neeto-redirect-urls-frontend 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +105 -0
- package/app/javascript/src/translations/en.json +54 -0
- package/app/javascript/src/translations/index.js +3 -0
- package/dist/RedirectUrls.js +790 -0
- package/dist/RedirectUrls.js.map +1 -0
- package/dist/cjs/RedirectUrls.js +832 -0
- package/dist/cjs/RedirectUrls.js.map +1 -0
- package/dist/cjs/index.js +40 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +1 -0
- package/package.json +209 -0
- package/types.d.ts +3 -0
package/README.md
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# neeto-redirect-urls-nano-nano
|
|
2
|
+
|
|
3
|
+
The `neeto-redirect-urls-nano-nano` acts as the source of truth for the new nano's structure,
|
|
4
|
+
configs, data etc.
|
|
5
|
+
|
|
6
|
+
## Contents
|
|
7
|
+
|
|
8
|
+
1. [Development with Host Application](#development-with-host-application)
|
|
9
|
+
- [Engine](#engine)
|
|
10
|
+
- [Installation](#installation)
|
|
11
|
+
- [Usage](#usage)
|
|
12
|
+
- [Frontend package](#frontend-package)
|
|
13
|
+
- [Installation](#installation-1)
|
|
14
|
+
- [Instructions for development](#instructions-for-development)
|
|
15
|
+
- [Usage](#usage-1)
|
|
16
|
+
2. [Instructions for Publishing](#instructions-for-publishing)
|
|
17
|
+
|
|
18
|
+
## Development with Host Application
|
|
19
|
+
|
|
20
|
+
### Engine
|
|
21
|
+
|
|
22
|
+
#### Installation
|
|
23
|
+
|
|
24
|
+
1. Add this line to your application's Gemfile:
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
source "NEETO_GEM_SERVER_URL" do
|
|
28
|
+
# ..existing gems
|
|
29
|
+
|
|
30
|
+
gem 'neeto-redirect-urls-engine'
|
|
31
|
+
end
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. And then execute:
|
|
35
|
+
|
|
36
|
+
```shell
|
|
37
|
+
bundle install
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
3. Add this line to your application's `config/routes.rb` file
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
mount NeetoRedirectUrlsEngine::Engine => "/neeto_redirect_urls_engine"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. Add required migrations in the `db/migrate` folder. Run the following
|
|
47
|
+
commands to copy the migrations from the engine to the host application.
|
|
48
|
+
|
|
49
|
+
```shell
|
|
50
|
+
bundle exec rails neeto_redirect_urls_engine:install:migrations
|
|
51
|
+
bundle exec rails db:migrate
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
#### Usage
|
|
55
|
+
|
|
56
|
+
1. Replace NeetoRedirectUrlsNanoNano with your project name
|
|
57
|
+
|
|
58
|
+
Create a `script.rb` file in the project root and paste the script from the
|
|
59
|
+
following file.
|
|
60
|
+
|
|
61
|
+
[Replace project name script](./docs/engine/replace-project-name-script.md)
|
|
62
|
+
|
|
63
|
+
2. Run the file using the following command:
|
|
64
|
+
|
|
65
|
+
```shell
|
|
66
|
+
ruby script.rb
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Notes ⚠️
|
|
70
|
+
|
|
71
|
+
- Don't commit this file.
|
|
72
|
+
- Project name should be given in PascalCase.
|
|
73
|
+
|
|
74
|
+
### Frontend package
|
|
75
|
+
|
|
76
|
+
#### Installation
|
|
77
|
+
|
|
78
|
+
1. Add the `neeto-redirect-urls-frontend` package to the `package.json`
|
|
79
|
+
|
|
80
|
+
```shell
|
|
81
|
+
yarn add @bigbinary/neeto-redirect-urls-frontend
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Instructions for development
|
|
85
|
+
Check the [Frontend package development guide](https://neeto-engineering.neetokb.com/p/a-d34cb4b0) for step-by-step instructions to develop the frontend package.
|
|
86
|
+
|
|
87
|
+
#### Usage
|
|
88
|
+
|
|
89
|
+
1. Import `WelcomeScreen` component from "@bigbinary/neeto-redirect-urls-frontend"
|
|
90
|
+
|
|
91
|
+
```javascript
|
|
92
|
+
import React from "react";
|
|
93
|
+
|
|
94
|
+
import { WelcomeScreen } from "@bigbinary/neeto-redirect-urls-frontend";
|
|
95
|
+
|
|
96
|
+
const App = () => <WelcomeScreen />;
|
|
97
|
+
|
|
98
|
+
export default App;
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Instructions for Publishing
|
|
102
|
+
|
|
103
|
+
Consult the
|
|
104
|
+
[building and releasing packages](https://neeto-engineering.neetokb.com/articles/building-and-releasing-packages)
|
|
105
|
+
guide for details on how to publish.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neetoRedirectUrls": {
|
|
3
|
+
"titles": {
|
|
4
|
+
"dashboard": "Dashboard"
|
|
5
|
+
},
|
|
6
|
+
"common": {
|
|
7
|
+
"delete": "Delete",
|
|
8
|
+
"edit": "Edit",
|
|
9
|
+
"placeholder": {
|
|
10
|
+
"relativeUrl": "/articles/welcome",
|
|
11
|
+
"url": "https://example.com"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
"settings": {
|
|
15
|
+
"title": "Settings",
|
|
16
|
+
"redirecturl": {
|
|
17
|
+
"title": "Redirect URLs",
|
|
18
|
+
"description": "View and manage redirect URLs"
|
|
19
|
+
},
|
|
20
|
+
"general": {
|
|
21
|
+
"title": "General"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"emptyState": {
|
|
25
|
+
"redirectURLs": {
|
|
26
|
+
"title": "There are no redirect URLs to show.",
|
|
27
|
+
"description": "Here is how you can create <helpLink>redirect URLs</helpLink>."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"alerts": {
|
|
31
|
+
"delete": {
|
|
32
|
+
"title": "Delete redirect URL?",
|
|
33
|
+
"confirm": "You are permanently deleting the redirection from <strong>{{ from_path }}</strong> to <strong>{{ to_path }}</strong>. This can't be undone."
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"redirect": {
|
|
37
|
+
"source": "Source",
|
|
38
|
+
"destination": "Destination",
|
|
39
|
+
"add": "Add new redirect URL",
|
|
40
|
+
"edit": "Edit redirect URL",
|
|
41
|
+
"search": "Search Redirect URL",
|
|
42
|
+
"domainLevelRedirect": {
|
|
43
|
+
"label": "Add domain level redirection",
|
|
44
|
+
"description": "This feature allows you to redirect all your course URLs from neetoCourse to a new domain. <Link>View help article</Link> for more information."
|
|
45
|
+
},
|
|
46
|
+
"validations": {
|
|
47
|
+
"source": "Source path must be valid",
|
|
48
|
+
"destination": "Destination url must be valid",
|
|
49
|
+
"required": "{{entity}} is required",
|
|
50
|
+
"duplicateDomain": "Cannot use same domain for redirection"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|