@newlogic-digital/core 1.0.0-beta.3 → 1.0.0
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 +10 -7
- package/index.js +8 -0
- package/package.json +8 -5
package/README.md
CHANGED
@@ -10,16 +10,18 @@
|
|
10
10
|
|
11
11
|
# ⚙️ Newlogic Core
|
12
12
|
|
13
|
-
|
13
|
+
Starter for creating web applications. Powered by Vite and Vituum.
|
14
14
|
|
15
|
+
- ⚡️ Powered by Vite
|
15
16
|
- 💡 Modern principles
|
16
17
|
- 🚀️ Fast development
|
17
18
|
- 🛠️ Integrated tools
|
18
19
|
- 📦 Modular structure
|
19
20
|
- ✉️ Email templates
|
20
|
-
- ⚡ Vite as webserver
|
21
21
|
|
22
|
-
Newlogic Core is an integration for [Vituum](https://vituum.dev), and contains set of tools that can be used to create modern web applications.
|
22
|
+
Newlogic Core is an integration for [Vituum](https://vituum.dev), and contains set of tools that can be used to create modern web applications.
|
23
|
+
|
24
|
+
We use it as our main front-end tool at [Newlogic Digital](https://www.newlogic.cz/) to create wonders.
|
23
25
|
|
24
26
|
## 🛠️ Integrated tools
|
25
27
|
* **[Vite](https://vitejs.dev)** next-generation frontend tooling
|
@@ -36,15 +38,15 @@ PHP programmers often **don't want to configure anything**, basic idea is to add
|
|
36
38
|
|
37
39
|
It doesn't matter if you use Nette, Symfony or Laravel - the structure can be freely adjusted as needed - `resources` and` public`, `src` and` dist` or `app/assets` and` www`
|
38
40
|
|
39
|
-
It's up to you - all paths are freely configurable
|
41
|
+
It's up to you - all paths are freely configurable via `vite.config.js` config
|
40
42
|
|
41
43
|
### 📦 Modularity
|
42
44
|
|
43
45
|
Newlogic Core uses [Vituum](https://vituum.dev) and [Vite](https://vitejs.dev) for frontend tooling.
|
44
46
|
|
45
|
-
Source files are divided by modules inside `src` directory - styles, scripts, templates, emails, assets. It is optional which modules you want to use for the project, simple delete the directory. You really only use what you want to use.
|
47
|
+
Source files are divided by modules inside `src` directory - styles, scripts, templates, data, emails, assets. It is optional which modules you want to use for the project, simple delete the directory. You really only use what you want to use.
|
46
48
|
|
47
|
-
## 🪄
|
49
|
+
## 🪄 Get started
|
48
50
|
|
49
51
|
```sh
|
50
52
|
npm i @newlogic-digital/core --save-dev
|
@@ -53,10 +55,11 @@ npm i @newlogic-digital/core --save-dev
|
|
53
55
|
### Requirements
|
54
56
|
|
55
57
|
- [Node.js LTS (16.x)](https://nodejs.org/en/download/)
|
58
|
+
- [Vituum](https://vituum.dev/)
|
56
59
|
|
57
60
|
### Config
|
58
61
|
|
59
|
-
Each Newlogic Core project
|
62
|
+
Each **Newlogic Core** project needs to have config via `vite.config.js`
|
60
63
|
|
61
64
|
```js
|
62
65
|
import { defineConfig } from 'vituum'
|
package/index.js
CHANGED
@@ -255,6 +255,14 @@ const integration = (userConfig = {}) => {
|
|
255
255
|
},
|
256
256
|
templates: {
|
257
257
|
format: 'twig'
|
258
|
+
},
|
259
|
+
imports: {
|
260
|
+
paths: ['./src/styles/**', './src/scripts/**', '!./src/styles/Utils/**']
|
261
|
+
},
|
262
|
+
vite: {
|
263
|
+
server: {
|
264
|
+
origin: fs.existsSync(resolve(process.cwd(), 'app/settings.php')) ? (fs.readFileSync(resolve(process.cwd(), 'app/settings.php')).toString().match(/VITE_URL = '(.+)';/) || [null, null])[1] : null
|
265
|
+
}
|
258
266
|
}
|
259
267
|
}
|
260
268
|
}
|
package/package.json
CHANGED
@@ -1,21 +1,24 @@
|
|
1
1
|
{
|
2
2
|
"name": "@newlogic-digital/core",
|
3
3
|
"type": "module",
|
4
|
-
"version": "1.0.0
|
4
|
+
"version": "1.0.0",
|
5
5
|
"main": "index.js",
|
6
6
|
"author": "New Logic Studio s.r.o.",
|
7
7
|
"description": "Set of tools that can be used to create modern web applications",
|
8
8
|
"license": "MIT",
|
9
|
+
"scripts": {
|
10
|
+
"npm-publish": "npm publish --tag next"
|
11
|
+
},
|
9
12
|
"dependencies": {
|
10
13
|
"@vituum/tailwind": "^0.1.2",
|
11
14
|
"@vituum/posthtml": "^0.1.0",
|
12
15
|
"@vituum/juice": "^0.1.3",
|
13
|
-
"@vituum/twig": "^0.1.
|
14
|
-
"@vituum/latte": "^0.1.
|
15
|
-
"prismjs": "~1.
|
16
|
+
"@vituum/twig": "^0.1.1",
|
17
|
+
"@vituum/latte": "^0.1.1",
|
18
|
+
"prismjs": "~1.29.0",
|
16
19
|
"html-minifier-terser": "^7.0.0",
|
17
20
|
"lodash": "^4.17.21",
|
18
|
-
"vituum": "^0.0.
|
21
|
+
"vituum": "^0.0.27"
|
19
22
|
},
|
20
23
|
"files": [
|
21
24
|
"index.js"
|