Skip to content

Commit 72d0bf3

Browse files
authored
docs: Improved installation instructions
docs: Improved installation instructions
2 parents 31fb197 + ba977be commit 72d0bf3

File tree

1 file changed

+30
-9
lines changed

1 file changed

+30
-9
lines changed

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,23 +41,44 @@ php spark vite:init
4141

4242
our body `spark` will handle the rest for you 🙃
4343

44-
💥 **That's it**
45-
you can now run `npm install`, `npm run dev` and enjoy
44+
## Getting Started:
45+
- Install your node dependencies: `npm install`
46+
- Start vite server: `npm run dev`
47+
- Start CI server: `php spark serve` or access it through your virtual host.
48+
- That's all =)
49+
50+
> **NOTE:**
51+
>
52+
> `npm run dev` is not where you should work, it main purpose is to serve assets, such as scripts or stylesheets.
53+
> once you build your files, it becomes useless
54+
> but as long as it running, the package will use it instead of the bundled files.
55+
> So make sure to **access your project** from ci server or a vitual host.
56+
57+
## Build your files:
58+
59+
to bundle your files, run:
60+
```
61+
npm run build
62+
```
63+
this command will generate the bundled assets in your public directory.
64+
but as we said before, as long as vite server is running, the package will use it instead of bundled files, so make sure to stop it when you're done developing.
4665

47-
## Uninitialize
48-
You can run the following command to uninitialize it:
66+
## Uninitialize:
67+
68+
`composer remove mihatori/codeignitervite` command will remove the package, but the generated files will remain there (package.json, vite.config.js ...etc).
69+
so to avoid that, make sure to run the following command first:
4970

5071
```
5172
php spark vite:remove
5273
```
53-
then you can run `composer remove mihatori/codeignitervite` to remove it completely.
54-
55-
### additional:
56-
You will find some new variables in your `.env` file, you can change them as you like.
74+
This command will do the following:
75+
- delete `package.json`, `packages.lock.json` and `vite.config.js`.
76+
- delete `resources` folder.
77+
- And finaly restore your `.env` file.
5778

5879
## Contributing
5980
All contributions are welcome, it doesn't matter whether you can code, write documentation, or help find bugs.
60-
feel free to use issues tracker or pull requests
81+
feel free to use issues or pull requests.
6182

6283
## What next?
6384
More informations will be available as soon as possible ❤️.

0 commit comments

Comments
 (0)