create-rawstyle 0.0.0 → 0.1.0
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/CHANGELOG.md +9 -0
- package/create-rawstyle-v0.1.0.zip +0 -0
- package/dist/index.js +1 -1
- package/package.json +20 -5
- package/src/index.ts +26 -0
- package/src/utils.ts +7 -0
- package/tsconfig.json +6 -0
- package/README.md +0 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
##   [` 📦 create-rawstyle0.1.0 `](https://github.com/rawstylecss/rawstyle/commits/create-rawstyle0.1.0)
|
|
5
|
+
|
|
6
|
+
###   🎁 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
|
+
#####    [_Full Changelog_](https://github.com/rawstylecss/rawstyle/commits/create-rawstyle0.1.0)  •  _Jan 24, 2026_
|
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
console.log(
|
|
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{};
|
package/package.json
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-rawstyle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "🪶 Ultra‑light Compile‑time CSS‑in‑JS",
|
|
5
5
|
"author": "kh4f <kh4f.dev@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"repository": "https://github.com/
|
|
8
|
-
"bugs": "https://github.com/
|
|
9
|
-
"homepage": "https://github.com/
|
|
7
|
+
"repository": "https://github.com/rawstylecss/rawstyle",
|
|
8
|
+
"bugs": "https://github.com/rawstylecss/rawstyle/issues",
|
|
9
|
+
"homepage": "https://github.com/rawstylecss/rawstyle#readme",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"rawstyle",
|
|
12
12
|
"create-rawstyle",
|
|
13
13
|
"css-in-js"
|
|
14
14
|
],
|
|
15
|
+
"relion": {
|
|
16
|
+
"tagPrefix": "create-rawstyle@"
|
|
17
|
+
},
|
|
15
18
|
"main": "dist/index.js",
|
|
16
|
-
"type": "module"
|
|
19
|
+
"type": "module",
|
|
20
|
+
"dependencies": {
|
|
21
|
+
"@clack/prompts": "^0.11.0",
|
|
22
|
+
"giget": "^3.1.1"
|
|
23
|
+
},
|
|
24
|
+
"scripts": {
|
|
25
|
+
"build": "tsdown",
|
|
26
|
+
"build:watch": "tsdown --watch",
|
|
27
|
+
"build:prod": "tsdown --prod",
|
|
28
|
+
"release:context": "relion -f",
|
|
29
|
+
"release": "relion -bct",
|
|
30
|
+
"lint": "eslint"
|
|
31
|
+
}
|
|
17
32
|
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
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
ADDED
package/tsconfig.json
ADDED
package/README.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
# Rawstyle
|