Skip to content

Commit 2876f7d

Browse files
author
Oğuzhan Aslan
committed
pull origin/master
2 parents 8350797 + cadadbf commit 2876f7d

File tree

10 files changed

+216
-150
lines changed

10 files changed

+216
-150
lines changed

CHANGELOG.md

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,59 @@
11
# Changelog
22

3-
## [1.0.10](https://github.com/hepsiburada/VoltranJS/compare/1.0.9...1.0.10)
3+
## [v1.0.18](https://github.com/hepsiburada/VoltranJS/compare/v1.0.17...v1.0.18)
4+
5+
### Merged
6+
7+
- fixed regenerator-runtime [`#26`](https://github.com/hepsiburada/VoltranJS/pull/26)
8+
9+
### Commits
10+
11+
- chore: update changelog [`3a6f319`](https://github.com/hepsiburada/VoltranJS/commit/3a6f3196100385e25b8d08085b4f5e034564db56)
12+
13+
## [v1.0.17](https://github.com/hepsiburada/VoltranJS/compare/v1.0.11...v1.0.17) - 2021-09-06
14+
15+
### Merged
16+
17+
- pass headers in fragments [`#27`](https://github.com/hepsiburada/VoltranJS/pull/27)
18+
- set-cookie header imported to cookies [`#25`](https://github.com/hepsiburada/VoltranJS/pull/25)
19+
- Undefined SassResources bug [`#23`](https://github.com/hepsiburada/VoltranJS/pull/23)
20+
- sass-resources-loader implementation. [`#22`](https://github.com/hepsiburada/VoltranJS/pull/22)
21+
- VoltranJS serverConfig file fixed. [`#21`](https://github.com/hepsiburada/VoltranJS/pull/21)
22+
23+
### Commits
24+
25+
- sass-resource-loader implementation is done. Updated read me according to new config. [`cc97ef5`](https://github.com/hepsiburada/VoltranJS/commit/cc97ef506b03be4db82c0044b12301a22eb97085)
26+
- voltranConfig.sassResources undefined bug fixed. [`acb50ef`](https://github.com/hepsiburada/VoltranJS/commit/acb50efb72227a759663eef15be48afc4b26e132)
27+
- chore: update changelog [`f3501ad`](https://github.com/hepsiburada/VoltranJS/commit/f3501ad944fe8f186acdce498e82ec131e09ff51)
28+
- chore: update changelog [`05955c3`](https://github.com/hepsiburada/VoltranJS/commit/05955c343471d27e797c472c09811410d56fdb7d)
29+
- chore: update changelog [`94a3f7a`](https://github.com/hepsiburada/VoltranJS/commit/94a3f7a0e76363fd6fc7fb22bd80dd5f34b228d9)
30+
- chore: update changelog [`19134e7`](https://github.com/hepsiburada/VoltranJS/commit/19134e71989fe79328c8157b7ceb46bbc9afb7ef)
31+
- Update changelog [`717c909`](https://github.com/hepsiburada/VoltranJS/commit/717c9090983e84d29346a43ccdaf4d3fdc6c858d)
32+
- Version upgrade [`b4aad6f`](https://github.com/hepsiburada/VoltranJS/commit/b4aad6f1cbc30c22c547529e9f86bd267f0559b1)
33+
34+
## [v1.0.11](https://github.com/hepsiburada/VoltranJS/compare/1.0.10...v1.0.11) - 2021-06-08
35+
36+
### Merged
37+
38+
- feature: added without state parameter [`#20`](https://github.com/hepsiburada/VoltranJS/pull/20)
39+
- feat: jest library setup [`#19`](https://github.com/hepsiburada/VoltranJS/pull/19)
40+
41+
### Commits
42+
43+
- Create CODE_OF_CONDUCT.md [`6da53eb`](https://github.com/hepsiburada/VoltranJS/commit/6da53ebcf849a8460619e77173cda485b6267c89)
44+
- Update issue templates [`6d1d122`](https://github.com/hepsiburada/VoltranJS/commit/6d1d122c790a1a1fe5f66f6c1f2c337ced793e16)
45+
46+
## [1.0.10](https://github.com/hepsiburada/VoltranJS/compare/1.0.9...1.0.10) - 2021-05-27
447

548
### Merged
649

750
- feat: add changelog generator service [`#18`](https://github.com/hepsiburada/VoltranJS/pull/18)
851
- use @babel/polyfill/noConflict instead @babel/polyfill [`#16`](https://github.com/hepsiburada/VoltranJS/pull/16)
952

53+
### Commits
54+
55+
- chore: add changelog [`b8662b0`](https://github.com/hepsiburada/VoltranJS/commit/b8662b05673537883ba45576cf1e2d357bb0e5e0)
56+
1057
## [1.0.9](https://github.com/hepsiburada/VoltranJS/compare/1.0.8...1.0.9) - 2021-04-29
1158

1259
## [1.0.8](https://github.com/hepsiburada/VoltranJS/compare/1.0.7...1.0.8) - 2021-04-29

README.md

Lines changed: 64 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@
2626
<a href="#contributing">Contributing</a>
2727
</p>
2828

29-
3029
### Key Features
3130

3231
You can use Voltran if you need a micro frontend framework that provides following features:
3332

34-
- Lightweight and fast API
35-
- Serves single and multiple components
36-
- Preview (to visualize components)
37-
- SEO friendly (if needed)
38-
- CSS & SCSS support
39-
- Supports only React (for now)
33+
- Lightweight and fast API
34+
- Serves single and multiple components
35+
- Preview (to visualize components)
36+
- SEO friendly (if needed)
37+
- CSS & SCSS support
38+
- Supports only React (for now)
4039

4140
## Installation
4241

@@ -45,11 +44,13 @@ Voltran requires [Node.js](https://nodejs.org/) v10.15.0+ to run.
4544
Install the Voltran.
4645

4746
#### Yarn
47+
4848
```sh
4949
$ yarn add voltranjs
5050
```
5151

5252
#### Npm
53+
5354
```sh
5455
$ npm install voltranjs
5556
```
@@ -62,67 +63,52 @@ First of all, you should import `@voltran/core`.
6263

6364
After that we can write the component's code.
6465

65-
6666
**HelloWorld.js**
6767

68-
6968
```jsx
70-
7169
const voltran = require('@voltran/core');
7270

7371
import React from 'react';
7472

7573
const ROUTE_PATHS = {
76-
HELLOWORLDPAGE: '/HelloWorld',
74+
HELLOWORLDPAGE: '/HelloWorld'
7775
};
7876

79-
const HelloWorld = ({initialState}) => {
80-
81-
return (
82-
<>
83-
Hello World!
84-
</>
85-
);
77+
const HelloWorld = ({ initialState }) => {
78+
return <>Hello World!</>;
8679
};
8780

8881
const component = voltran.default.withBaseComponent(HelloWorld, ROUTE_PATHS.HELLOWORLDPAGE);
8982

9083
export default component;
91-
9284
```
9385

9486
If you want to fetch data from server side, you should add `getInitialState`.
9587

96-
9788
**./conf/local.config.js**
9889

99-
10090
```js
101-
10291
const port = 3578;
10392

10493
module.exports = {
10594
port: port,
10695
baseUrl: `http://localhost:${port}`,
10796
mediaUrl: '',
10897
services: {
109-
'voltranapi': {
110-
'clientUrl': 'http://voltran-api.qa.hepsiburada.com',
111-
'serverUrl': 'http://voltran-api.qa.hepsiburada.com'
98+
voltranapi: {
99+
clientUrl: 'http://voltran-api.qa.hepsiburada.com',
100+
serverUrl: 'http://voltran-api.qa.hepsiburada.com'
112101
}
113102
},
114103
timeouts: {
115104
clientApiManager: 20 * 1000,
116105
serverApiManager: 20 * 1000
117106
}
118107
};
119-
120108
```
121109

122-
123110
**HelloWorld.js**
124111

125-
126112
```jsx
127113

128114
const voltran = require('@voltran/core');
@@ -157,7 +143,6 @@ export default component;
157143

158144
```
159145

160-
161146
**Output For Preview**
162147

163148
```
@@ -179,32 +164,32 @@ Hello World. My Name is Volkan!
179164
}
180165
```
181166

182-
183167
## Configs
184168

185169
Voltran requires following configurations:
186170

187-
| **Config** | **Type** |
188-
| ------ | ------ |
189-
| [appConfigFile](#appConfigFile) | Object |
190-
| [dev](#dev) | Boolean |
191-
| [distFolder](#distFolder) | String |
192-
| [publicDistFolder](#publicDistFolder) | String |
193-
| [inputFolder](#inputFolder) | String * `required` |
194-
| [monitoring](#monitoring) | Object |
195-
| [port](#port) | Number - String |
196-
| [prefix](#prefix) | String * `required` |
197-
| [ssr](#ssr) | String |
198-
| [styles](#styles) | Array |
199-
| [output](#output) | Object |
200-
| [staticProps](#staticProps) | Array |
201-
| [routing](#routing) | Object |
202-
| [webpackConfiguration](#webpackConfiguration) | Object |
203-
171+
| **Config** | **Type** |
172+
| --------------------------------------------- | -------------------- |
173+
| [appConfigFile](#appConfigFile) | Object |
174+
| [dev](#dev) | Boolean |
175+
| [distFolder](#distFolder) | String |
176+
| [publicDistFolder](#publicDistFolder) | String |
177+
| [inputFolder](#inputFolder) | String \* `required` |
178+
| [monitoring](#monitoring) | Object |
179+
| [port](#port) | Number - String |
180+
| [prefix](#prefix) | String \* `required` |
181+
| [ssr](#ssr) | String |
182+
| [styles](#styles) | Array |
183+
| [output](#output) | Object |
184+
| [staticProps](#staticProps) | Array |
185+
| [routing](#routing) | Object |
186+
| [webpackConfiguration](#webpackConfiguration) | Object |
187+
| [sassResources](#sassResources) | Array |
204188

205189
#### appConfigFile
206190

207191
It should contain environment specific configurations (test, production ...).
192+
208193
```
209194
appConfigFile: {
210195
entry: path.resolve(__dirname, './yourConfigFolder/'),
@@ -214,35 +199,43 @@ appConfigFile: {
214199
}
215200
}
216201
```
202+
217203
#### dev
204+
218205
Development mode. Set to `true` if you need to debug.
219206

220207
`Default`: `false`
221208

222209
#### distFolder
210+
223211
The path to the folder where bundled scripts will be placed after the build.
224212

225213
`Default`: `./dist`
226214

227215
#### publicDistFolder
216+
228217
The path to the folder where asset files will be placed after the build.
229218

230219
`Default`: `./dist/assets`
231220

232221
#### inputFolder
222+
233223
The path to the folder that contains script files. It's required.
234224

235225
Passes this config to Babel Loader where it reads all js files under this folder.
236226

237227
'Voltran' converts your files to the appropriate format and optimizes them.
238228

239229
#### monitoring
230+
240231
For now, only prometheus is supported.
232+
241233
```
242234
monitoring: {
243235
prometheus: false
244236
}
245237
```
238+
246239
> or you can set your custom js file.
247240
248241
```
@@ -252,23 +245,29 @@ monitoring: {
252245
```
253246

254247
#### port
248+
255249
`Default`: `3578`
250+
256251
> If you want to change the port
257252
> you may need to change the port in appConfigFiles
258253
259254
#### prefix
255+
260256
`It is required.`
261257

262258
There may be different components owned by different teams using voltrans on the same page. Voltran needs to use a prefix in order to avoid conflicts issues.
263259
This prefix is prepended to initial states and CSS class names.
260+
264261
> We recommend that each team use their own acronyms/prefixes.
265262
266263
#### ssr
264+
267265
`Default`: `true`
268266
Voltran supports server side rendering.
269267
Applications that need 'SEO' features needs to set this parameter to `true`.
270268

271269
#### styles
270+
272271
This field's value should be an array of strings. Array values should be the paths to the global CSS files.
273272

274273
```
@@ -279,6 +278,7 @@ styles: [
279278
```
280279

281280
### output
281+
282282
```
283283
output: {
284284
client: {
@@ -295,6 +295,7 @@ output: {
295295
```
296296

297297
#### staticProps
298+
298299
You can pass static props to all components at the same time.
299300

300301
```
@@ -304,6 +305,7 @@ staticProps: [
304305
```
305306

306307
#### routing
308+
307309
Voltran need two files to set routing.
308310

309311
```
@@ -314,26 +316,32 @@ routing: {
314316
```
315317

316318
Example files can be found here:
317-
- [components.js](https://github.com/hepsiburada/VoltranJS-Starter-Kit/blob/master/src/appRoute/components.js)
318-
- [dictionary.js](https://github.com/hepsiburada/VoltranJS-Starter-Kit/blob/master/src/appRoute/dictionary.js)
319+
320+
- [components.js](https://github.com/hepsiburada/VoltranJS-Starter-Kit/blob/master/src/appRoute/components.js)
321+
- [dictionary.js](https://github.com/hepsiburada/VoltranJS-Starter-Kit/blob/master/src/appRoute/dictionary.js)
319322

320323
#### webpackConfiguration
321324

322325
You can add your webpack configuration. They will be merged with the voltran configs.
323326

324327
You can access the starter kit we created from the [link](https://github.com/hepsiburada/VoltranJS-Starter-Kit).
325328

329+
#### sassResources
330+
331+
You can add sass resources to this field as string array. sass-resource-loader gonna inject those files in every sass files so you won't need to import them.
332+
333+
You can check [sass-resource-loader](https://github.com/shakacode/sass-resources-loader) for usage.
334+
326335
## Tech
327336

328337
Voltran uses a number of open source projects to work properly:
329338

330-
* [ReactJS] - A JavaScript library for building user interfaces!
331-
* [Webpack] - Module bundler
332-
* [babel] - The compiler for next generation JavaScript.
333-
* [node.js] - evented I/O for the backend
334-
* [hiddie] - fast node.js network app framework (friendly fork of [middie](https://github.com/fastify/middie))
335-
* [Yarn] - the streaming build system
336-
339+
- [ReactJS] - A JavaScript library for building user interfaces!
340+
- [Webpack] - Module bundler
341+
- [babel] - The compiler for next generation JavaScript.
342+
- [node.js] - evented I/O for the backend
343+
- [hiddie] - fast node.js network app framework (friendly fork of [middie](https://github.com/fastify/middie))
344+
- [Yarn] - the streaming build system
337345

338346
## Contributing
339347

@@ -343,8 +351,6 @@ Voltran uses a number of open source projects to work properly:
343351
4. Push to the branch: `git push origin my-new-feature`
344352
5. Submit a pull request :D
345353

346-
347354
<p align="center">
348355
<a href="https://medium.com/hepsiburadatech"><img src="./src/assets/hepsitech.png" alt="hepsitech"></a>
349356
</p>
350-

0 commit comments

Comments
 (0)