makepack 1.0.8 → 1.0.9
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
CHANGED
|
@@ -3,21 +3,21 @@ import makeProjectInformation from "./makeProjectInformation.js"
|
|
|
3
3
|
import makeFiles from "./makeFiles.js"
|
|
4
4
|
|
|
5
5
|
const create = async () => {
|
|
6
|
-
let
|
|
6
|
+
let info = await makeProjectInformation()
|
|
7
7
|
let loader = logLoader("Creating project...")
|
|
8
|
-
await makeFiles(
|
|
8
|
+
await makeFiles(info)
|
|
9
9
|
loader.stop("")
|
|
10
10
|
|
|
11
11
|
loader = logLoader("Installing dependencies...")
|
|
12
12
|
execSync("npm install", {
|
|
13
|
-
cwd:
|
|
13
|
+
cwd: info.cwd,
|
|
14
14
|
})
|
|
15
15
|
|
|
16
16
|
loader.stop("Project setup complete!")
|
|
17
|
-
if (
|
|
17
|
+
if (info.isCurrentDir) {
|
|
18
18
|
console.log(`Run the development server: \nnpm start\nEnjoy your new project! 😊`);
|
|
19
19
|
} else {
|
|
20
|
-
console.log(`To start working with your project:\n1. Navigate to your project directory:\ncd ${
|
|
20
|
+
console.log(`To start working with your project:\n1. Navigate to your project directory:\ncd ${info.dirname}\n2. Run the development server:\nnpm start\nEnjoy your new project! 😊`);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
|
|
@@ -17,7 +17,7 @@ const makeProjectInformation = async () => {
|
|
|
17
17
|
}
|
|
18
18
|
])
|
|
19
19
|
|
|
20
|
-
if (projectDir.
|
|
20
|
+
if (projectDir.dirname !== cwdFolder) {
|
|
21
21
|
fs.removeSync(projectDir.cwd)
|
|
22
22
|
fs.mkdirSync(projectDir.cwd)
|
|
23
23
|
}
|
|
@@ -46,7 +46,7 @@ const makeProjectInformation = async () => {
|
|
|
46
46
|
port: 3000,
|
|
47
47
|
outdir: "pack",
|
|
48
48
|
cwd: 'C:\xampp\htdocs\makepack\asd',
|
|
49
|
-
|
|
49
|
+
dirname: 'asd',
|
|
50
50
|
isCurrentDir: false,
|
|
51
51
|
template: 'typescript',
|
|
52
52
|
rootdir: 'src',
|