File tree Expand file tree Collapse file tree 7 files changed +33
-7
lines changed Expand file tree Collapse file tree 7 files changed +33
-7
lines changed Original file line number Diff line number Diff line change 1
1
.yarn
2
2
node_modules
3
+ coverage
4
+ dist
5
+ .env
3
6
.DS_Store
4
7
.idea
5
8
.vscode
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ sCp.stop("Copied files");
78
78
79
79
const sMustache = p . spinner ( ) ;
80
80
81
- sMustache . start ( "Filling templates " ) ;
81
+ sMustache . start ( "Tweaking things " ) ;
82
82
83
83
const data = { name, org, year : new Date ( ) . getFullYear ( ) } ;
84
84
@@ -109,7 +109,11 @@ fs.writeFileSync(
109
109
) ;
110
110
fs . rmSync ( `${ destDir } /LICENSE.template.md` ) ;
111
111
112
- sMustache . stop ( "Filled templates" ) ;
112
+ execSync ( `mv ${ destDir } /gitignore ${ destDir } /.gitignore` ) ;
113
+ execSync ( `mv ${ destDir } /client/gitignore ${ destDir } /client/.gitignore` ) ;
114
+ execSync ( `mv ${ destDir } /server/gitignore ${ destDir } /server/.gitignore` ) ;
115
+
116
+ sMustache . stop ( "Tweaked things" ) ;
113
117
114
118
const sGit = p . spinner ( ) ;
115
119
Original file line number Diff line number Diff line change
1
+ // Thx https://stackoverflow.com/a/53239387/6612932
2
+
3
+ import { execSync } from "node:child_process" ;
4
+
5
+ const env = process . env ;
6
+
7
+ if (
8
+ // if INIT_CWD (yarn/npm install invocation path) and PWD
9
+ // are the same, then local (dev) install/add is taking place
10
+ env . INIT_CWD === env . PWD ||
11
+ // local (dev) yarn install may have been run
12
+ // from a project subfolder
13
+ env . INIT_CWD . indexOf ( env . PWD ) === 0
14
+ ) {
15
+ // do post-installation things
16
+ execSync ( "husky install" ) ;
17
+ }
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " create-harmonia" ,
3
- "version" : " 5.0.0 " ,
3
+ "version" : " 5.0.3 " ,
4
4
"type" : " module" ,
5
5
"description" : " Our pedagogical framework for the React-Express-MySQL cursus in Wild Code School" ,
6
6
"homepage" : " https://github.com/wildcodeschool/create-harmonia#readme" ,
15
15
"create-harmonia" : " ./bin/create-harmonia.js"
16
16
},
17
17
"scripts" : {
18
- "postinstall" : " husky install " ,
18
+ "postinstall" : " node ./bin/postinstall " ,
19
19
"lint" : " lint-staged"
20
20
},
21
21
"keywords" : [],
22
22
"author" : " Wild Code School" ,
23
23
"license" : " MIT" ,
24
- "devDependencies " : {
24
+ "dependencies " : {
25
25
"@clack/prompts" : " ^0.7.0" ,
26
- "husky" : " ^8.0.3" ,
27
26
"kleur" : " ^4.1.5" ,
28
- "lint-staged" : " ^15.2.0" ,
29
27
"mustache" : " ^4.2.0"
28
+ },
29
+ "devDependencies" : {
30
+ "husky" : " ^8.0.3" ,
31
+ "lint-staged" : " ^15.2.0"
30
32
}
31
33
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments