squint-cljs / vite-plugin-squint

A plugin to compile .cljs source code with squint using vite
1 stars 3 forks source link

return an array of packages for api flexibility #6

Closed brandonstubbs closed 5 months ago

brandonstubbs commented 5 months ago

I made the following changes:

remove yarn in favour of npm

The problem with having the file:.. link in the demo/package.json. yarn under the hood copies the files into the node_modules and new changes are not reflected. npm creates a symlink. This is so we can still use the file:.. link. Another way to do this is to split this repo to use the "monorepo workspace" style that these tools offer.

Plugin returns an array of plugins

I think this is a cleaner API, as we could have multiple plugins that a user could opt in based on the options that they give us. This would pave way for anything we may need to add such as HMR in a vanilla cljs project.

Standardised demo package scripts

When you create a new project using npm create vite@latest they give you the following scripts:

  "scripts": {
    "dev": "vite",
    "build": "vite build",
    "preview": "vite preview"
  },

I followed their approach for our demos.

brandonstubbs commented 5 months ago

cc @martinklepsch

martinklepsch commented 5 months ago

This looks great!

borkdude commented 5 months ago

Sorry, I merged the other one first ...

brandonstubbs commented 5 months ago

All good, closing this one