ソースを参照

Use the build folder

customisations
alemart 2ヶ月前
コミット
09fb5ac5e7
3個のファイルの変更5行の追加5行の削除
  1. 1
    1
      docs/hooks.py
  2. 1
    1
      esbuild.mjs
  3. 3
    3
      package.json

+ 1
- 1
docs/hooks.py ファイルの表示

11
 def copy_directory(dir_path, site_dir):
11
 def copy_directory(dir_path, site_dir):
12
     d = os.path.join(site_dir, dir_path)
12
     d = os.path.join(site_dir, dir_path)
13
     os.makedirs(d, exist_ok=True)
13
     os.makedirs(d, exist_ok=True)
14
-    s = dir_path if dir_path != "dist" else "www/dist"
14
+    s = dir_path if dir_path != "dist" else "build/dist"
15
     copy_tree(s, d)
15
     copy_tree(s, d)
16
 
16
 
17
 def copy_tree(src, dst, symlinks=False, ignore=None):
17
 def copy_tree(src, dst, symlinks=False, ignore=None):

+ 1
- 1
esbuild.mjs ファイルの表示

29
     legalComments: 'inline',
29
     legalComments: 'inline',
30
     banner: { js: generateBanner() },
30
     banner: { js: generateBanner() },
31
     footer: { js: serve ? generateLiveReloadCode() : '' },
31
     footer: { js: serve ? generateLiveReloadCode() : '' },
32
-    outfile: 'www/dist/' + (minify ? 'encantar.min.js' : 'encantar.js'),
32
+    outfile: 'build/dist/' + (minify ? 'encantar.min.js' : 'encantar.js'),
33
     sourcemap: !production && 'linked',
33
     sourcemap: !production && 'linked',
34
     logLevel: 'info',
34
     logLevel: 'info',
35
 };
35
 };

+ 3
- 3
package.json ファイルの表示

31
   "types": "build/types/main.d.ts",
31
   "types": "build/types/main.d.ts",
32
   "scripts": {
32
   "scripts": {
33
     "start": "node esbuild.mjs --minify --serve",
33
     "start": "node esbuild.mjs --minify --serve",
34
-    "prebuild": "tsc --noEmit && npm run clean",
34
+    "prebuild": "tsc --noEmit && npm run clean && bash -c 'mkdir -p build/{dist,types,plugins}'",
35
     "build": "node esbuild.mjs && node esbuild.mjs --minify",
35
     "build": "node esbuild.mjs && node esbuild.mjs --minify",
36
     "build-types": "tsc --emitDeclarationOnly --declaration --declarationDir build/types",
36
     "build-types": "tsc --emitDeclarationOnly --declaration --declarationDir build/types",
37
-    "plugins": "for f in $(find plugins/ -name *.js); do esbuild --minify < $f > ${f%.*}.min.js; done",
37
+    "plugins": "for f in $(find plugins/ -name *.js); do esbuild --minify < $f > build/${f%.*}.min.js; done",
38
     "update": "npm update speedy-vision",
38
     "update": "npm update speedy-vision",
39
     "deploy": "mkdocs gh-deploy",
39
     "deploy": "mkdocs gh-deploy",
40
     "docs": "mkdocs serve",
40
     "docs": "mkdocs serve",
41
-    "clean": "rm -rf www/dist/*.* && rm -rf build/",
41
+    "clean": "rm -rf build/",
42
     "test": "echo \"Error: no test specified\" && exit 1"
42
     "test": "echo \"Error: no test specified\" && exit 1"
43
   },
43
   },
44
   "dependencies": {
44
   "dependencies": {

読み込み中…
キャンセル
保存