makepack 1.2.4 → 1.2.6
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/package.json +6 -1
- package/src/actions/create/makeFiles.js +1 -0
- package/asd/package-lock.json +0 -2797
- package/asd/package.json +0 -21
- package/asd/readme.md +0 -132
- package/asd/serve.jsx +0 -29
- package/asd/src/index.ts +0 -5
- package/asd/tsconfig.json +0 -28
- package/serve.tsx +0 -25
package/asd/package.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "asd",
|
|
3
|
-
"version": "1.0.0",
|
|
4
|
-
"description": "",
|
|
5
|
-
"main": "./index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"start": "makepack serve",
|
|
8
|
-
"pack": "makepack pack",
|
|
9
|
-
"publish:pack": "makepack pack -p"
|
|
10
|
-
},
|
|
11
|
-
"dependencies": {},
|
|
12
|
-
"devDependencies": {
|
|
13
|
-
"makepack": "latest",
|
|
14
|
-
"react": "^19.0.0",
|
|
15
|
-
"react-dom": "^19.0.0",
|
|
16
|
-
"typescript": "^4.4.2",
|
|
17
|
-
"@types/react": "^19.0.2",
|
|
18
|
-
"@types/react-dom": "^19.0.2"
|
|
19
|
-
},
|
|
20
|
-
"keywords": []
|
|
21
|
-
}
|
package/asd/readme.md
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# MakePack CLI Documentation
|
|
2
|
-
|
|
3
|
-
## Overview
|
|
4
|
-
|
|
5
|
-
**MakePack** is a command-line interface (CLI) tool that helps you to quickly set up, build, and manage JavaScript, TypeScript, React, and React-TypeScript libraries for use in npm projects. With just a few simple commands, you can generate your own libraries, start a development server, or build and publish your project to the npm repository.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
To install **MakePack** globally, run the following command:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install -g makepack
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
This will allow you to use the `makepack` command anywhere in your terminal.
|
|
16
|
-
|
|
17
|
-
## Commands
|
|
18
|
-
|
|
19
|
-
### `create`
|
|
20
|
-
|
|
21
|
-
The `create` command is used to create a new library project. It initializes the project structure, configures essential files, and sets up the environment for you to start working on your library.
|
|
22
|
-
|
|
23
|
-
#### Usage
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
makepack create
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
#### Description
|
|
30
|
-
|
|
31
|
-
- Creates a new library project by setting up the necessary configurations and boilerplate files.
|
|
32
|
-
|
|
33
|
-
This command will guide you through the initial setup for your library.
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
### `serve`
|
|
38
|
-
|
|
39
|
-
The `serve` command starts a development server for your library, providing you with a live-reload environment where you can test and iterate on your library in real-time.
|
|
40
|
-
|
|
41
|
-
#### Usage
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
makepack serve [options]
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### Options
|
|
48
|
-
|
|
49
|
-
- `-p, --port <number>`
|
|
50
|
-
_Port number_ (optional) (default is `5000`).
|
|
51
|
-
|
|
52
|
-
- `-e, --root <file>`
|
|
53
|
-
_Root file_ (optional) (default is `serve.jsx` or `serve.tsx`). The entry point for your application. Specify the main JavaScript/TypeScript file to start the server.
|
|
54
|
-
|
|
55
|
-
#### Description
|
|
56
|
-
|
|
57
|
-
- Starts a local development server for testing and debugging your library.
|
|
58
|
-
|
|
59
|
-
Example:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
makepack serve --port 4000 --root src/index.ts
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
---
|
|
66
|
-
|
|
67
|
-
### `pack`
|
|
68
|
-
|
|
69
|
-
The `pack` command is used to build your library and optionally publish it to the npm repository. This command compiles your code into a distributable format and prepares it for sharing with others.
|
|
70
|
-
|
|
71
|
-
#### Usage
|
|
72
|
-
|
|
73
|
-
```bash
|
|
74
|
-
makepack pack [options]
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
#### Options
|
|
78
|
-
|
|
79
|
-
- `-e, --entry <file>`
|
|
80
|
-
_Entry file or directory_ (default is `src/**/*.{tsx,ts,js,jsx}`).
|
|
81
|
-
Specify the entry file or use a glob pattern to select the files to include in your library.
|
|
82
|
-
|
|
83
|
-
- `-p, --publish`
|
|
84
|
-
_Publish the project to the npm repository_ (default is `false`).
|
|
85
|
-
Add this flag if you want to publish the library to npm after building it.
|
|
86
|
-
|
|
87
|
-
#### Description
|
|
88
|
-
|
|
89
|
-
- Builds the project by compiling and bundling your library.
|
|
90
|
-
- Optionally publishes the library to the npm repository.
|
|
91
|
-
|
|
92
|
-
Example:
|
|
93
|
-
|
|
94
|
-
```bash
|
|
95
|
-
makepack pack --entry src/index.ts --publish
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
This will compile the project from `src/index.ts` and then publish the library to npm.
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## Example Workflow
|
|
103
|
-
|
|
104
|
-
1. Create a new project:
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
makepack create
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
2. Start the server for development:
|
|
111
|
-
|
|
112
|
-
```bash
|
|
113
|
-
makepack serve --port 4000 --root index.tsx
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
3. Once you're ready to build and publish your library:
|
|
117
|
-
|
|
118
|
-
```bash
|
|
119
|
-
makepack pack --entry src/**/*.{tsx,ts,js,jsx} --publish
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
This will build your library and publish it to npm.
|
|
123
|
-
|
|
124
|
-
## GitHub Repository
|
|
125
|
-
|
|
126
|
-
For more details, open issues, or contribute to the project, visit the [MakePack GitHub Repository](https://github.com/devnax/makepack).
|
|
127
|
-
|
|
128
|
-
---
|
|
129
|
-
|
|
130
|
-
## License
|
|
131
|
-
|
|
132
|
-
This project is licensed under the MIT License. See the LICENSE file for more information.
|
package/asd/serve.jsx
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import add from './src'
|
|
4
|
-
|
|
5
|
-
const App = () => {
|
|
6
|
-
return (
|
|
7
|
-
<div style={{fontFamily: 'monospace,math, sans-serif', textAlign: 'center', marginTop: '50px' }}>
|
|
8
|
-
<h1>Welcome to makepack CLI!</h1>
|
|
9
|
-
<p>Edit <code>index.tsx</code> and save to reload.</p>
|
|
10
|
-
<a
|
|
11
|
-
href="https://reactjs.org"
|
|
12
|
-
target="_blank"
|
|
13
|
-
rel="noopener noreferrer"
|
|
14
|
-
style={{ color: '#61dafb', textDecoration: 'none' }}
|
|
15
|
-
>
|
|
16
|
-
Learn React
|
|
17
|
-
</a>
|
|
18
|
-
<div style={{marginTop: "50px"}}>
|
|
19
|
-
<code>{add(5,5)}</code>
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
const rootEle = document.getElementById('root')
|
|
25
|
-
if (rootEle) {
|
|
26
|
-
const root = createRoot(rootEle);
|
|
27
|
-
root.render(<App />);
|
|
28
|
-
}
|
|
29
|
-
|
package/asd/src/index.ts
DELETED
package/asd/tsconfig.json
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "es5",
|
|
4
|
-
"lib": [
|
|
5
|
-
"dom",
|
|
6
|
-
"dom.iterable",
|
|
7
|
-
"esnext"
|
|
8
|
-
],
|
|
9
|
-
"allowJs": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"esModuleInterop": true,
|
|
12
|
-
"allowSyntheticDefaultImports": true,
|
|
13
|
-
"strict": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"module": "esnext",
|
|
16
|
-
"moduleResolution": "node",
|
|
17
|
-
"resolveJsonModule": true,
|
|
18
|
-
"isolatedModules": true,
|
|
19
|
-
"noEmit": true,
|
|
20
|
-
"jsx": "react"
|
|
21
|
-
},
|
|
22
|
-
"include": [
|
|
23
|
-
"src"
|
|
24
|
-
],
|
|
25
|
-
"exclude": [
|
|
26
|
-
"node_modules"
|
|
27
|
-
]
|
|
28
|
-
}
|
package/serve.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createRoot } from 'react-dom/client';
|
|
3
|
-
|
|
4
|
-
const App = () => {
|
|
5
|
-
return (
|
|
6
|
-
<div style={{ fontFamily: 'monospace,math, sans-serif', textAlign: 'center', marginTop: '50px' }}>
|
|
7
|
-
<h1>Welcome to makepack CLI!</h1>
|
|
8
|
-
<p>Edit <code></code> and save to reload.</p>
|
|
9
|
-
as
|
|
10
|
-
<a
|
|
11
|
-
href="https://reactjs.org"
|
|
12
|
-
target="_blank"
|
|
13
|
-
rel="noopener noreferrer"
|
|
14
|
-
style={{ color: '#61dafb', textDecoration: 'none' }}
|
|
15
|
-
>
|
|
16
|
-
Learn
|
|
17
|
-
</a>
|
|
18
|
-
</div>
|
|
19
|
-
);
|
|
20
|
-
}
|
|
21
|
-
const rootEle = document.getElementById('root')
|
|
22
|
-
if (rootEle) {
|
|
23
|
-
const root = createRoot(rootEle);
|
|
24
|
-
root.render(<App />);
|
|
25
|
-
}
|