@spicato-inc/create-fortenv 0.1.3 → 0.1.4
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/bin/create-fortenv.js +10 -0
- package/package.json +3 -2
- package/templates/mpa.gitignore +32 -0
- package/templates/spa.gitignore +24 -0
- package/templates/wp-mpa.gitignore +68 -0
- package/templates/wp-spa.gitignore +68 -0
package/bin/create-fortenv.js
CHANGED
|
@@ -158,6 +158,15 @@ async function copyTemplate(source, destination) {
|
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
async function ensureGitignore(type, destination) {
|
|
162
|
+
const target = path.join(destination, '.gitignore');
|
|
163
|
+
if (await exists(target)) {
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
const source = fileURLToPath(new URL(`../templates/${type}.gitignore`, import.meta.url));
|
|
167
|
+
await cp(source, target);
|
|
168
|
+
}
|
|
169
|
+
|
|
161
170
|
async function rewritePackage(destination, name) {
|
|
162
171
|
const file = path.join(destination, 'package.json');
|
|
163
172
|
const pkg = JSON.parse(await readFile(file, 'utf8'));
|
|
@@ -197,6 +206,7 @@ async function main() {
|
|
|
197
206
|
const spinner = p.spinner();
|
|
198
207
|
spinner.start('雛形をコピーしています');
|
|
199
208
|
await copyTemplate(source, destination);
|
|
209
|
+
await ensureGitignore(type, destination);
|
|
200
210
|
await rewritePackage(destination, name);
|
|
201
211
|
spinner.stop('雛形をコピーしました');
|
|
202
212
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spicato-inc/create-fortenv",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-fortenv": "./bin/create-fortenv.js"
|
|
7
7
|
},
|
|
8
8
|
"files": [
|
|
9
|
-
"bin"
|
|
9
|
+
"bin",
|
|
10
|
+
"templates"
|
|
10
11
|
],
|
|
11
12
|
"publishConfig": {
|
|
12
13
|
"access": "public"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# ビルド成果物
|
|
2
|
+
dist/
|
|
3
|
+
# 生成された型
|
|
4
|
+
.astro/
|
|
5
|
+
|
|
6
|
+
public/assets/images/*
|
|
7
|
+
!public/assets/images/.gitkeep
|
|
8
|
+
|
|
9
|
+
# 依存関係
|
|
10
|
+
node_modules/
|
|
11
|
+
|
|
12
|
+
# ログ
|
|
13
|
+
npm-debug.log*
|
|
14
|
+
yarn-debug.log*
|
|
15
|
+
yarn-error.log*
|
|
16
|
+
pnpm-debug.log*
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# 環境変数
|
|
20
|
+
.env
|
|
21
|
+
.env.production
|
|
22
|
+
|
|
23
|
+
# macOS 固有のファイル
|
|
24
|
+
.DS_Store
|
|
25
|
+
|
|
26
|
+
# Playwright の成果物
|
|
27
|
+
/test-results/
|
|
28
|
+
/playwright-report/
|
|
29
|
+
/blob-report/
|
|
30
|
+
/playwright/.cache/
|
|
31
|
+
/playwright/.auth/
|
|
32
|
+
artifacts/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# ビルド成果物
|
|
2
|
+
dist/
|
|
3
|
+
# 生成された型
|
|
4
|
+
.astro/
|
|
5
|
+
|
|
6
|
+
public/assets/images/*
|
|
7
|
+
!public/assets/images/.gitkeep
|
|
8
|
+
|
|
9
|
+
# 依存関係
|
|
10
|
+
node_modules/
|
|
11
|
+
|
|
12
|
+
# ログ
|
|
13
|
+
npm-debug.log*
|
|
14
|
+
yarn-debug.log*
|
|
15
|
+
yarn-error.log*
|
|
16
|
+
pnpm-debug.log*
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# 環境変数
|
|
20
|
+
.env
|
|
21
|
+
.env.production
|
|
22
|
+
|
|
23
|
+
# macOS 固有のファイル
|
|
24
|
+
.DS_Store
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# よく除外するファイルの例です。
|
|
2
|
+
# 案件に合わせて書き換えてください。
|
|
3
|
+
|
|
4
|
+
# Node の生成物
|
|
5
|
+
node_modules/
|
|
6
|
+
vendor/
|
|
7
|
+
99_guidline/*
|
|
8
|
+
!base.md
|
|
9
|
+
|
|
10
|
+
# WordPress
|
|
11
|
+
local/*
|
|
12
|
+
local/app/**
|
|
13
|
+
!local/app/
|
|
14
|
+
!local/app/public/
|
|
15
|
+
!local/app/public/wp-content/
|
|
16
|
+
!local/app/public/wp-content/themes/
|
|
17
|
+
!local/app/public/wp-content/themes/wp-fortenv4mpa/
|
|
18
|
+
!local/app/public/wp-content/themes/wp-fortenv4mpa/**
|
|
19
|
+
local/app/public/wp-content/themes/wp-fortenv4mpa/assets/*
|
|
20
|
+
local/app/public/wp-content/themes/wp-fortenv4mpa/wordpress/acf/**/*.css
|
|
21
|
+
local/app/public/wp-content/themes/wp-fortenv4mpa/wordpress/editor/*.css
|
|
22
|
+
|
|
23
|
+
# コンパイル済みの Java クラス
|
|
24
|
+
*.class
|
|
25
|
+
|
|
26
|
+
# コンパイル済みの Python バイトコード
|
|
27
|
+
*.py[cod]
|
|
28
|
+
|
|
29
|
+
# ログ
|
|
30
|
+
*.log
|
|
31
|
+
|
|
32
|
+
# パッケージファイル
|
|
33
|
+
*.jar
|
|
34
|
+
|
|
35
|
+
# Maven の成果物
|
|
36
|
+
target/
|
|
37
|
+
dist/
|
|
38
|
+
|
|
39
|
+
# 直下のみ(ビルド後)
|
|
40
|
+
assets/css/
|
|
41
|
+
assets/js/
|
|
42
|
+
assets/images/*
|
|
43
|
+
!assets/images/.gitkeep
|
|
44
|
+
|
|
45
|
+
# JetBrains の IDE
|
|
46
|
+
.idea/
|
|
47
|
+
|
|
48
|
+
# 単体テストのレポート
|
|
49
|
+
TEST*.xml
|
|
50
|
+
|
|
51
|
+
# macOS が生成するファイル
|
|
52
|
+
.DS_Store
|
|
53
|
+
|
|
54
|
+
# Windows が生成するファイル
|
|
55
|
+
Thumbs.db
|
|
56
|
+
|
|
57
|
+
# アプリケーション
|
|
58
|
+
*.app
|
|
59
|
+
*.exe
|
|
60
|
+
*.war
|
|
61
|
+
|
|
62
|
+
# 大きなメディアファイル
|
|
63
|
+
*.mp4
|
|
64
|
+
*.tiff
|
|
65
|
+
*.avi
|
|
66
|
+
*.flv
|
|
67
|
+
*.mov
|
|
68
|
+
*.wmv
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# よく除外するファイルの例です。
|
|
2
|
+
# 案件に合わせて書き換えてください。
|
|
3
|
+
|
|
4
|
+
# Node の生成物
|
|
5
|
+
node_modules/
|
|
6
|
+
vendor/
|
|
7
|
+
99_guidline/*
|
|
8
|
+
!base.md
|
|
9
|
+
|
|
10
|
+
# WordPress
|
|
11
|
+
local/*
|
|
12
|
+
local/app/**
|
|
13
|
+
!local/app/
|
|
14
|
+
!local/app/public/
|
|
15
|
+
!local/app/public/wp-content/
|
|
16
|
+
!local/app/public/wp-content/themes/
|
|
17
|
+
!local/app/public/wp-content/themes/wp-fortenv/
|
|
18
|
+
!local/app/public/wp-content/themes/wp-fortenv/**
|
|
19
|
+
local/app/public/wp-content/themes/wp-fortenv/assets/*
|
|
20
|
+
local/app/public/wp-content/themes/wp-fortenv/wordpress/acf/**/*.css
|
|
21
|
+
local/app/public/wp-content/themes/wp-fortenv/wordpress/editor/*.css
|
|
22
|
+
|
|
23
|
+
# コンパイル済みの Java クラス
|
|
24
|
+
*.class
|
|
25
|
+
|
|
26
|
+
# コンパイル済みの Python バイトコード
|
|
27
|
+
*.py[cod]
|
|
28
|
+
|
|
29
|
+
# ログ
|
|
30
|
+
*.log
|
|
31
|
+
|
|
32
|
+
# パッケージファイル
|
|
33
|
+
*.jar
|
|
34
|
+
|
|
35
|
+
# Maven の成果物
|
|
36
|
+
target/
|
|
37
|
+
dist/
|
|
38
|
+
|
|
39
|
+
# 直下のみ(ビルド後)
|
|
40
|
+
assets/css/
|
|
41
|
+
assets/js/
|
|
42
|
+
assets/images/*
|
|
43
|
+
!assets/images/.gitkeep
|
|
44
|
+
|
|
45
|
+
# JetBrains の IDE
|
|
46
|
+
.idea/
|
|
47
|
+
|
|
48
|
+
# 単体テストのレポート
|
|
49
|
+
TEST*.xml
|
|
50
|
+
|
|
51
|
+
# macOS が生成するファイル
|
|
52
|
+
.DS_Store
|
|
53
|
+
|
|
54
|
+
# Windows が生成するファイル
|
|
55
|
+
Thumbs.db
|
|
56
|
+
|
|
57
|
+
# アプリケーション
|
|
58
|
+
*.app
|
|
59
|
+
*.exe
|
|
60
|
+
*.war
|
|
61
|
+
|
|
62
|
+
# 大きなメディアファイル
|
|
63
|
+
*.mp4
|
|
64
|
+
*.tiff
|
|
65
|
+
*.avi
|
|
66
|
+
*.flv
|
|
67
|
+
*.mov
|
|
68
|
+
*.wmv
|