@navita/jest 0.0.6 β†’ 0.0.8

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.
Files changed (2) hide show
  1. package/README.md +157 -0
  2. package/package.json +16 -4
package/README.md ADDED
@@ -0,0 +1,157 @@
1
+ ![Navita Logo](https://navita.style/navita.svg)
2
+
3
+ Navita is a powerful CSS-in-JS library
4
+ that brings type-safe compile-time Atomic CSS-in-JS with zero runtime to your projects.
5
+
6
+ It allows you to easily style your components and apply themes without the need for any additional runtime dependencies.
7
+
8
+ With Navita, you can write clean and maintainable CSS in JavaScript, without sacrificing runtime performance.
9
+
10
+
11
+ πŸ”₯   All styles generated at build time β€” just like Sass, Less, etc.
12
+
13
+ ✨   Minimal abstraction over standard CSS.
14
+
15
+ πŸ¦„   Works with any JS-based front-end framework β€” or even without one.
16
+
17
+ 🎨   High-level theme system with support for simultaneous themes.
18
+
19
+ πŸ’ͺ   Type-safe styles via [CSSType](https://github.com/frenic/csstype).
20
+
21
+ 🌳   Co-locate your styles with your components β€” if you want to.
22
+
23
+ πŸ›    Integrations with popular bundlers such as Webpack, Vite, and Next.js.
24
+
25
+ ---
26
+ 🌐 [Check out the documentation site for setup guides, examples and API docs.](https://navita.style)
27
+
28
+ ---
29
+
30
+ ## Installation
31
+
32
+ To start using Navita in your project, simply follow these steps:
33
+
34
+ ### Install Navita using npm:
35
+
36
+ ```bash
37
+ npm install @navita/css --save
38
+ ```
39
+
40
+ You'll also need to install the Navita integration for your preferred bundler.
41
+ Navita currently supports Webpack, Vite, and Next.js.
42
+
43
+ ### Choose the integration for your preferred bundler:
44
+ #### If you are using Webpack, install the Webpack integration:
45
+
46
+ ```bash
47
+ npm install @navita/webpack-plugin mini-css-extract-plugin --save-dev
48
+ ```
49
+
50
+ Update your `webpack.config.js` file to include both MiniCssExtractPlugin and NavitaPlugin:
51
+
52
+ ```javascript
53
+ const { NavitaPlugin } = require('@navita/webpack-plugin');
54
+ const MiniCssExtractPlugin = require('mini-css-extract-plugin');
55
+
56
+ module.exports = {
57
+ // Other webpack options,
58
+ plugins: [
59
+ new MiniCssExtractPlugin(),
60
+ new NavitaPlugin(),
61
+ ],
62
+ };
63
+ ```
64
+
65
+ Read more about the Webpack integration in the [Webpack documentation](https://navita.style/integrations/webpack).
66
+
67
+ #### If you are using Vite, install the Vite integration:
68
+
69
+ ```bash
70
+ npm install @navita/vite-plugin --save-dev
71
+ ```
72
+
73
+ And add it to your `vite.config.js` file:
74
+
75
+ ```typescript
76
+ import { defineConfig } from 'vite';
77
+ import { navita } from '@navita/vite-plugin';
78
+
79
+ export default defineConfig({
80
+ plugins: [
81
+ // Other plugins
82
+ navita(/* Additional options */)
83
+ ],
84
+ });
85
+ ```
86
+
87
+ Read more about the Vite integration in the [Vite documentation](https://navita.style/integrations/vite).
88
+
89
+ ##### If you are using Next.js, install the Next.js integration:
90
+
91
+ πŸš€   React Server Components support!
92
+
93
+ ```bash
94
+ npm install @navita/next-plugin --save-dev
95
+ ```
96
+
97
+ And add it to your `next.config.js` file:
98
+
99
+ ```javascript
100
+ const { createNavitaStylePlugin } = require("@navita/next-plugin");
101
+
102
+ /** @type {import('next').NextConfig} */
103
+ const nextConfig = {};
104
+
105
+ module.exports = createNavitaStylePlugin({
106
+ // Additional options
107
+ })(nextConfig);
108
+ ```
109
+
110
+ Read more about the Next.js integration in the [Next.js documentation](https://navita.style/integrations/next).
111
+
112
+ ## Usage
113
+
114
+ The main entry point for Navita is the `style` function.
115
+ Make sure you read the reset of the documentation on
116
+ <https://navita.style> to learn more about the APIs.
117
+
118
+ ```typescript
119
+ import { style } from '@navita/css';
120
+
121
+ const container = style({
122
+ padding: '2rem',
123
+ background: 'hotpink',
124
+ color: 'white',
125
+ });
126
+
127
+ document.write(`
128
+ <div class="${container}">
129
+ Hello World!
130
+ </div>
131
+ `);
132
+ ```
133
+
134
+ That's it!
135
+
136
+ πŸ’‘ Only references to the classNames will be included in the bundle.
137
+
138
+ > Note: Navita doesn't require special file extensions for your styles.
139
+ You can co-locate your CSS styles with your components.
140
+
141
+ ## Documentation
142
+
143
+ For detailed documentation, examples, and usage guidelines,
144
+ please visit the official Navita website: <https://navita.style>
145
+
146
+ ## Contributing
147
+
148
+ We welcome contributions from the community to make Navita even better!
149
+
150
+ ## Thanks
151
+ * [Vanilla-Extract](https://vanilla-extract.style) and [Linaria](https://linaria.dev) for the inspiration and the great work on the CSS-in-JS ecosystem.
152
+ * [Fela](https://fela.js.org) for the fantastic work on Atomic css-in-js.
153
+ * [Eagerpatch](https://eagerpatch.com) for giving us the space to do interesting work.
154
+ ***
155
+
156
+ MIT Licensedβ€”A project by [Eagerpatch](https://eagerpatch.com).\
157
+ Made with ❀️ by [zn4rk](https://github.com/zn4rk) and contributors.
package/package.json CHANGED
@@ -1,7 +1,12 @@
1
1
  {
2
2
  "name": "@navita/jest",
3
- "version": "0.0.6",
4
- "license": "MIT",
3
+ "version": "0.0.8",
4
+ "description": "Jest tools for Navita",
5
+ "keywords": [
6
+ "jest",
7
+ "css-in-js",
8
+ "navita"
9
+ ],
5
10
  "private": false,
6
11
  "sideEffects": false,
7
12
  "exports": {
@@ -12,7 +17,14 @@
12
17
  }
13
18
  },
14
19
  "dependencies": {
15
- "@navita/adapter": "0.0.6",
16
- "@navita/engine": "0.0.6"
20
+ "@navita/adapter": "0.0.8",
21
+ "@navita/engine": "0.0.8"
22
+ },
23
+ "license": "MIT",
24
+ "author": "Eagerpatch",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/eagerpatch/navita.git",
28
+ "directory": "packages/jest"
17
29
  }
18
30
  }