-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
110 additions
and
81 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,50 +1,52 @@ | ||
{ | ||
"name": "onlook", | ||
"description": "The Onlook Command Line Interface", | ||
"version": "0.0.8", | ||
"main": "dist/index.js", | ||
"bin": { | ||
"onlook": "dist/index.cjs" | ||
}, | ||
"directories": { | ||
"test": "tests" | ||
}, | ||
"scripts": { | ||
"esbuild": "esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs", | ||
"dev": "npm run esbuild -- --watch", | ||
"build": "tsc --noEmit --skipLibCheck src/index.ts && esbuild src/index.ts --bundle --platform=node --format=cjs --outfile=dist/index.cjs --define:PACKAGE_VERSION=\\\"$npm_package_version\\\"", | ||
"build:notype": "npm run esbuild", | ||
"test": "bun test" | ||
}, | ||
"keywords": [ | ||
"npx", | ||
"onlook", | ||
"setup", | ||
"plugins" | ||
], | ||
"author": { | ||
"name": "Onlook", | ||
"email": "[email protected]" | ||
}, | ||
"license": "Apache-2.0", | ||
"homepage": "https://onlook.dev", | ||
"devDependencies": { | ||
"@types/babel__generator": "^7.6.8", | ||
"@types/babel__traverse": "^7.20.6", | ||
"@types/bun": "latest", | ||
"@types/degit": "^2.8.6", | ||
"esbuild": "^0.23.1", | ||
"tslib": "^2.6.3", | ||
"typescript": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"@babel/generator": "^7.14.5", | ||
"@babel/parser": "^7.14.3", | ||
"@babel/traverse": "^7.14.5", | ||
"@babel/types": "^7.14.5", | ||
"commander": "^12.1.0", | ||
"degit": "^2.8.4", | ||
"glob": "^11.0.0", | ||
"ora": "^8.1.0" | ||
} | ||
"name": "onlook", | ||
"description": "The Onlook Command Line Interface", | ||
"version": "0.0.8", | ||
"main": "dist/api/index.mjs", | ||
"module": "dist/api/index.mjs", | ||
"bin": { | ||
"onlook": "dist/cli/index.cjs" | ||
}, | ||
"directories": { | ||
"test": "tests" | ||
}, | ||
"scripts": { | ||
"dev": "npm run esbuild -- --watch", | ||
"esbuild": "esbuild src/cli/index.ts --bundle --platform=node --format=cjs --outfile=dist/cli/index.cjs", | ||
"build": "tsc --noEmit --skipLibCheck src/cli/index.ts && esbuild src/cli/index.ts --bundle --platform=node --format=cjs --outfile=dist/cli/index.cjs --define:PACKAGE_VERSION=\\\"$npm_package_version\\\"", | ||
"build:notype": "npm run esbuild", | ||
"build:api": "tsc --noEmit --skipLibCheck src/api/index.ts && esbuild src/api/index.ts --bundle --platform=node --format=esm --outfile=dist/api/index.mjs", | ||
"test": "bun test" | ||
}, | ||
"keywords": [ | ||
"npx", | ||
"onlook", | ||
"setup", | ||
"plugins" | ||
], | ||
"author": { | ||
"name": "Onlook", | ||
"email": "[email protected]" | ||
}, | ||
"license": "Apache-2.0", | ||
"homepage": "https://onlook.dev", | ||
"devDependencies": { | ||
"@types/babel__generator": "^7.6.8", | ||
"@types/babel__traverse": "^7.20.6", | ||
"@types/bun": "latest", | ||
"@types/degit": "^2.8.6", | ||
"esbuild": "^0.23.1", | ||
"tslib": "^2.6.3", | ||
"typescript": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"@babel/generator": "^7.14.5", | ||
"@babel/parser": "^7.14.3", | ||
"@babel/traverse": "^7.14.5", | ||
"@babel/types": "^7.14.5", | ||
"commander": "^12.1.0", | ||
"degit": "^2.8.4", | ||
"glob": "^11.0.0", | ||
"ora": "^8.1.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import type { ApiResponse } from "../models"; | ||
|
||
export function isOnlookEnabled(folder: string): Promise<ApiResponse<boolean>> { | ||
return Promise.resolve({ | ||
status: 'success', | ||
data: true | ||
}); | ||
} | ||
|
||
export function createProject(folder: string, name: string): Promise<ApiResponse> { | ||
return Promise.resolve({ | ||
status: 'success' | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export type ApiResponse<T = void> = SuccessResponse<T> | ErrorResponse; | ||
|
||
export type SuccessResponse<T = void> = { | ||
status: 'success'; | ||
data?: T; | ||
}; | ||
|
||
export type ErrorResponse = { | ||
status: 'error'; | ||
error: { | ||
message: string; | ||
code: string; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
{ | ||
"include": [ | ||
"src", | ||
"tests" | ||
], | ||
"compilerOptions": { | ||
// Enable latest features | ||
"lib": [ | ||
"ESNext", | ||
"DOM" | ||
"include": [ | ||
"src", | ||
"tests" | ||
], | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleDetection": "force", | ||
"jsx": "react-jsx", | ||
"allowJs": true, | ||
// Bundler mode | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
"verbatimModuleSyntax": true, | ||
"noEmit": true, | ||
// Best practices | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"noFallthroughCasesInSwitch": true, | ||
// Some stricter flags (disabled by default) | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"noPropertyAccessFromIndexSignature": false, | ||
} | ||
"compilerOptions": { | ||
// Enable latest features | ||
"lib": [ | ||
"ESNext", | ||
"DOM" | ||
], | ||
"target": "ESNext", | ||
"module": "ESNext", | ||
"moduleDetection": "force", | ||
"jsx": "react-jsx", | ||
"allowJs": true, | ||
// Bundler mode | ||
"moduleResolution": "bundler", | ||
"allowImportingTsExtensions": true, | ||
"verbatimModuleSyntax": true, | ||
"noEmit": true, | ||
// Best practices | ||
"strict": true, | ||
"skipLibCheck": true, | ||
"noFallthroughCasesInSwitch": true, | ||
// Some stricter flags (disabled by default) | ||
"noUnusedLocals": false, | ||
"noUnusedParameters": false, | ||
"noPropertyAccessFromIndexSignature": false, | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
import path from "path"; | ||
|
||
const nextConfig = { | ||
reactStrictMode: true, | ||
experimental: { | ||
swcPlugins: [["@onlook/nextjs", { root: path.resolve(".") }]], | ||
}, | ||
} | ||
}; | ||
export default nextConfig; |