create-rawstyle 0.1.0 → 0.1.2

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/dist/index.js CHANGED
@@ -1 +1 @@
1
- import{cancel as e,intro as t,isCancel as n,select as r,spinner as i,text as a}from"@clack/prompts";import{downloadTemplate as o}from"giget";const s=t=>{n(t)&&(e(`Operation cancelled`),process.exit(0))};(async()=>{console.log(),t(`Create a Rawstyle project`);let e=await r({message:`Pick a platform:`,options:[{label:`Next.js`,value:`next`},{label:`Vite`,value:`vite`}]});s(e);let n=await a({message:`Project name:`,defaultValue:`rawstyle-${e}`,placeholder:`rawstyle-${e}`});s(n);let c=i();c.start(`Scaffolding project...`),await o(`gh:kh4f/rawstyle/examples/${e}`,{dir:n}),c.stop(`Done!`)})();export{};
1
+ import{cancel as e,intro as t,isCancel as n,outro as r,select as i,spinner as a,text as o}from"@clack/prompts";import{downloadTemplate as s}from"giget";import{readFileSync as c,writeFileSync as l}from"node:fs";const u=t=>{n(t)&&(e(`Operation cancelled`),process.exit(0))},d=async e=>{let t=c(`${e}/package.json`,`utf8`),n=[...t.matchAll(/"(.*)": "link:.*/g)],r=t;for(let[e,t]of n){let n=await f(t);r=r.replace(e,`"${t}": "^${n}",`)}l(`${e}/package.json`,r,`utf8`)},f=async e=>(await(await fetch(`https://registry.npmjs.org/${e}`)).json())[`dist-tags`].latest;(async()=>{console.log(),t(`Create a Rawstyle project`);let e=await i({message:`Pick a platform:`,options:[{label:`Next.js`,value:`next`},{label:`Vite`,value:`vite`}]});u(e);let n=await o({message:`Project name:`,defaultValue:`rawstyle-${e}`,placeholder:`rawstyle-${e}`});u(n);let c=a();c.start(`Scaffolding project...`),await s(`gh:rawstylecss/rawstyle/examples/${e}`,{dir:n}),await d(n),c.stop(`Project scaffolded successfully!`),r(`Done`)})();export{};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rawstyle",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "🪶 Ultra‑light Compile‑time CSS‑in‑JS",
5
5
  "author": "kh4f <kh4f.dev@gmail.com>",
6
6
  "license": "MIT",
@@ -15,6 +15,9 @@
15
15
  "relion": {
16
16
  "tagPrefix": "create-rawstyle@"
17
17
  },
18
+ "files": [
19
+ "dist"
20
+ ],
18
21
  "main": "dist/index.js",
19
22
  "type": "module",
20
23
  "dependencies": {
@@ -25,8 +28,7 @@
25
28
  "build": "tsdown",
26
29
  "build:watch": "tsdown --watch",
27
30
  "build:prod": "tsdown --prod",
28
- "release:context": "relion -f",
29
- "release": "relion -bct",
30
- "lint": "eslint"
31
+ "lint": "eslint",
32
+ "release": "relion"
31
33
  }
32
34
  }
package/CHANGELOG.md DELETED
@@ -1,9 +0,0 @@
1
- # Changelog
2
-
3
-
4
- ## &ensp; [` 📦 create-rawstyle0.1.0 `](https://github.com/rawstylecss/rawstyle/commits/create-rawstyle0.1.0)
5
-
6
- ### &emsp; 🎁 Features
7
- - **Interactive project scaffolding**: implemented a CLI for creating Rawstyle projects with platform selection prompt. [🡥](https://github.com/rawstylecss/rawstyle/commit/696aa30)
8
-
9
- ##### &emsp;&emsp; [_Full Changelog_](https://github.com/rawstylecss/rawstyle/commits/create-rawstyle0.1.0) &ensp;•&ensp; _Jan 24, 2026_
Binary file
package/src/index.ts DELETED
@@ -1,26 +0,0 @@
1
- import { intro, select, spinner, text } from '@clack/prompts'
2
- import { downloadTemplate } from 'giget'
3
- import { handleCancel } from '@/utils'
4
-
5
- void (async () => {
6
- console.log()
7
- intro('Create a Rawstyle project')
8
-
9
- const platform = await select({ message: 'Pick a platform:', options: [
10
- { label: 'Next.js', value: 'next' },
11
- { label: 'Vite', value: 'vite' },
12
- ] })
13
- handleCancel(platform)
14
-
15
- const projectName = await text({
16
- message: 'Project name:',
17
- defaultValue: `rawstyle-${platform}`,
18
- placeholder: `rawstyle-${platform}`,
19
- })
20
- handleCancel(projectName)
21
-
22
- const s = spinner()
23
- s.start('Scaffolding project...')
24
- await downloadTemplate(`gh:kh4f/rawstyle/examples/${platform}`, { dir: projectName })
25
- s.stop('Done!')
26
- })()
package/src/utils.ts DELETED
@@ -1,7 +0,0 @@
1
- import { cancel, isCancel } from '@clack/prompts'
2
-
3
- export const handleCancel: <T>(value: T | symbol) => asserts value is T = value => {
4
- if (!isCancel(value)) return
5
- cancel('Operation cancelled')
6
- process.exit(0)
7
- }
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "compilerOptions": {
4
- "paths": { "@/*": [ "./src/*" ] }
5
- }
6
- }