๐Ÿš€ Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more โ†’
Sign In

forji

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

forji - npm Package Compare versions

Comparing version
1.0.0
to
1.0.1
+1
-1
dist/index.d.ts

@@ -8,4 +8,4 @@ import { ProjectBuilder } from './ProjectBuilder';

export declare function getPath(name: string): string | undefined;
export declare function projectBuild(structure: ProjectStructure, rootPath?: string, variables?: TemplateVariables): Promise<ProjectBuilder>;
export declare function Build(structure: ProjectStructure, rootPath?: string, variables?: TemplateVariables): Promise<ProjectBuilder>;
export declare function findFile(fileName: string, directory?: string): Promise<string | undefined>;
export declare function getFileByPath(filePath: string): string | undefined;

@@ -144,3 +144,3 @@ // src/index.ts

}
async function projectBuild(structure, rootPath = process.cwd(), variables = {}) {
async function Build(structure, rootPath = process.cwd(), variables = {}) {
const builder = ProjectBuilder.getInstance();

@@ -192,3 +192,2 @@ await builder.build(structure, rootPath, variables);

export {
projectBuild,
normalizeFileName,

@@ -200,3 +199,4 @@ getPath,

findFile,
fileExists
fileExists,
Build
};
{
"name": "forji",
"version": "1.0.0",
"version": "1.0.1",
"description": "Library for building project structures with dynamic folder/file names",

@@ -5,0 +5,0 @@ "type": "module",

+20
-18

@@ -28,7 +28,9 @@ # ๐Ÿ—๏ธ Project Builder

```bash
npm install project-builder
npm install forji
# or
yarn add project-builder
yarn add forji
# or
pnpm add project-builder
pnpm add forji
# or
bun add forji
```

@@ -39,3 +41,3 @@

```typescript
import { projectBuild } from 'project-builder';
import { Build } from 'forji';

@@ -62,3 +64,3 @@ async function main() {

// Build the project with template variables
await projectBuild(structure, './my-project', {
await Build(structure, './my-project', {
projectName: 'awesome-app'

@@ -77,3 +79,3 @@ });

#### `projectBuild(structure, rootPath, variables)`
#### `Build(structure, rootPath, variables)`

@@ -83,5 +85,5 @@ ๐Ÿ› ๏ธ Creates a project structure based on a configuration object.

```typescript
import { projectBuild } from 'project-builder';
import { Build } from 'project-builder';
const result = await projectBuild(
const result = await Build(
{

@@ -162,3 +164,3 @@ 'src': { /* folders and files */ },

Variables are defined in the third parameter of `projectBuild()` and then referenced in your structure definition:
Variables are defined in the third parameter of `Build()` and then referenced in your structure definition:

@@ -172,3 +174,3 @@ ```typescript

await projectBuild(structure, './output', {
await Build(structure, './output', {
componentName: 'Header'

@@ -187,3 +189,3 @@ });

// Example
await projectBuild(structure, './output', {
await Build(structure, './output', {
appName: 'MyAwesomeApp', // string

@@ -209,3 +211,3 @@ version: 1.0, // number

await projectBuild(structure, './output', {
await Build(structure, './output', {
srcFolder: 'src',

@@ -239,3 +241,3 @@ componentFolder: 'components',

await projectBuild(structure, './output', {
await Build(structure, './output', {
projectName: 'api-service',

@@ -286,3 +288,3 @@ version: '0.1.0',

await projectBuild(structure, './my-app', {
await Build(structure, './my-app', {
appName: 'MyService',

@@ -315,3 +317,3 @@ environment: 'development',

await projectBuild(structure, './api', {
await Build(structure, './api', {
entityName: 'User',

@@ -359,3 +361,3 @@ customFields: `

await projectBuild(structure, './api');
await Build(structure, './api');
```

@@ -382,6 +384,6 @@

```typescript
import { projectBuild, getFilesByExtension } from 'project-builder';
import { Build, getFilesByExtension } from 'project-builder';
// Build project
const builder = await projectBuild(structure, './output');
const builder = await Build(structure, './output');

@@ -388,0 +390,0 @@ // Get all TypeScript files