Skip to content

Commit e91f363

Browse files
committed
feat: add npm run assets
1 parent 3381097 commit e91f363

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,7 @@ run/
1111
*.sw*
1212
*.un~
1313
dump.rdb
14+
*.hashed.*
15+
*.min.*
16+
*.debug.*
17+
app/assets.json

app/middleware/locals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ module.exports = (options, app) => {
99

1010
if (app.config.mini_assets) {
1111
try {
12-
assets = require('./assets.json');
12+
assets = require('../assets.json');
1313
} catch (e) {
1414
logger.error(
1515
'You must execute `make build` before start app when mini_assets is true.'

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"egg-validate": "^1.0.0",
1919
"egg-view-ejs": "^2.0.0",
2020
"loader": "^2.1.1",
21+
"loader-builder": "^2.6.0",
2122
"loader-koa": "^2.0.1",
2223
"lodash": "^4.17.5",
2324
"markdown-it": "^8.4.1",
@@ -53,7 +54,8 @@
5354
"cov": "egg-bin cov",
5455
"lint": "eslint .",
5556
"ci": "npm run lint && npm run cov",
56-
"autod": "autod"
57+
"autod": "autod",
58+
"assets": "loader app/view app/"
5759
},
5860
"ci": {
5961
"version": "8",

0 commit comments

Comments
 (0)