OS.js icon indicating copy to clipboard operation
OS.js copied to clipboard

Use "npm init" for creating new dist ?

Open andersevenrud opened this issue 6 years ago • 20 comments

Maybe use npm init OS.js to create a new distro instead of git ?!

https://docs.npmjs.com/cli/init

andersevenrud avatar Jan 01 '19 20:01 andersevenrud

What about a shell script the CLI runs that compiles into a distro?

17lwinn avatar Feb 21 '20 14:02 17lwinn

Into what kind of a distro exactly ?

andersevenrud avatar Feb 21 '20 15:02 andersevenrud

NPM package, whole operating system, compressed folder etc

17lwinn avatar Feb 21 '20 15:02 17lwinn

I'm not sure I fully understand what you mean there.

The way I read your comment it sounds like what this issue suggests, i.e. create a npm package for it (which is compressed on npmjs).

andersevenrud avatar Feb 21 '20 15:02 andersevenrud

I mean you could use shell scripts to bundle a package which is acceptable for npmjs

Like the shell script you made to compile the source in RX/UI3

17lwinn avatar Feb 21 '20 15:02 17lwinn

Shell scripts won't work on all systems, only Unix-like systems (macOS and Linux) and I think Anders wants this to work on Windows.

RossComputerGuy avatar Feb 21 '20 15:02 RossComputerGuy

I see your point but perhaps the script could be written in typescript?

17lwinn avatar Feb 21 '20 15:02 17lwinn

Like the shell script you made to compile the source in RX/UI3

The scripts in that project was bespoke and would not really work on anything else that that specific platform.

I mean you could use shell scripts to bundle a package which is acceptable for npmjs

This is what npm run build does, which already works on all platforms.

andersevenrud avatar Feb 21 '20 15:02 andersevenrud

Another thing I should mention is that the "OS.js distro" (this repo) is not really meant to be published to npm. However, this issue will publish a package that will be used as a template (and not with npm install).

andersevenrud avatar Feb 21 '20 15:02 andersevenrud

I now get your point, how about in the next update you release a utility that allows switching between templates?

17lwinn avatar Feb 21 '20 15:02 17lwinn

Like a switch OS look option? So it refers to the installation in a seperate folder?

17lwinn avatar Feb 21 '20 15:02 17lwinn

So it refers to the installation in a seperate folder?

Doesn't this kinda defeat the purpose of switching if it lives in another folder ?

Or am I misunderstanding this ?

andersevenrud avatar Feb 21 '20 15:02 andersevenrud

I mean switching OS's like switching users.

Install somewhere else and configure OSJS to run or write to that folder

17lwinn avatar Feb 21 '20 16:02 17lwinn

Like a developer utility

17lwinn avatar Feb 21 '20 16:02 17lwinn

Install somewhere else and configure OSJS to run or write to that folder

Sorry, but I don't understand what you mean by this.

andersevenrud avatar Feb 21 '20 16:02 andersevenrud

Think of it like a VFS, you configure OSJS to read and write to this one folder. My idea is to do the same but we link it as a template

17lwinn avatar Feb 21 '20 16:02 17lwinn

And the templates are stored in a folder

17lwinn avatar Feb 21 '20 16:02 17lwinn

I see. That might be useful in some cases.

I actually do something like this on my workstation (because I have a ton of different installations). I have my src/client/index.js and src/server/index.js symlinked to the current distro I'm working with.

andersevenrud avatar Feb 21 '20 16:02 andersevenrud

Exactly! Good idea

17lwinn avatar Feb 21 '20 16:02 17lwinn

If you want a working OSJS example, theres one here on glitch.com- https://pws-server.glitch.me/

17lwinn avatar Feb 21 '20 16:02 17lwinn