vaderjs 2.1.7 → 2.1.9

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vaderjs",
3
- "version": "2.1.7",
3
+ "version": "2.1.9",
4
4
  "description": "A simple and powerful JavaScript library for building modern web applications.",
5
5
  "bin": {
6
6
  "vaderjs": "./main.js"
@@ -13,25 +13,15 @@ function checkIfTailwindInstalled() {
13
13
 
14
14
  function initTailwind() {
15
15
  const tailwindConfig = path.resolve(process.cwd(), 'tailwind.config.js')
16
- const postcssConfig = path.resolve(process.cwd(), 'postcss.config.js')
17
- if (!fs.existsSync(tailwindConfig)) {
18
- fs.writeFileSync(postcssConfig, `module.exports = {
19
- plugins: {
20
- tailwindcss: {},
21
- autoprefixer: {},
22
- }
23
- }`)
24
-
25
- fs.writeFileSync(tailwindConfig, `/** @type {import('tailwindcss').Config} */
26
- module.exports = {
27
- content: ['./src/**/*.{html,js,jsx,ts,tsx}', './app/**/*.{html,js,jsx,ts,tsx}'],
28
- theme: {
29
- extend: {},
30
- },
31
- plugins: [],
32
- }`)
16
+ const postcssConfig = path.resolve(process.cwd(), 'postcss.config.mjs')
17
+ const tailwindCssFile = path.join(process.cwd(), '/public/styles.css')
18
+ if(!fs.existsSync(tailwindCssFile)){
19
+ fs.writeFileSync(tailwindCssFile, `@import "tailwindcss"`)
20
+ }
21
+ if (!fs.existsSync(postcssConfig)) {
22
+ fs.writeFileSync(postcssConfig, `export default { plugins: { "@tailwindcss/postcss": {}, }}`)
33
23
 
34
- }
24
+ }
35
25
 
36
26
  }
37
27