jalla 1.0.0-4 → 1.0.0-41

Sign up to get free protection for your applications and to get access to all the features.
package/lib/ui.js CHANGED
@@ -1,5 +1,6 @@
1
1
  var ora = require('ora')
2
2
  var pretty = require('pretty-bytes')
3
+ var interactive = require('is-interactive')
3
4
 
4
5
  var PADDING = 2
5
6
  var SPINNER = {
@@ -16,17 +17,22 @@ function ui (app) {
16
17
  text: 'Initializing',
17
18
  spinner: SPINNER,
18
19
  color: 'reset'
19
- }).start()
20
+ })
21
+
22
+ if (interactive()) spinner.start()
20
23
 
21
24
  app.on('error', function (err) {
22
25
  spinner.stopAndPersist({
23
26
  symbol: '◇',
24
- text: (app.env === 'development' && err.stack) || err.message || err
27
+ text: err.stack || err.message || err
25
28
  })
26
29
  })
27
30
 
28
31
  app.on('warning', function (warning) {
29
- spinner.stopAndPersist({ symbol: '▵', text: warning })
32
+ spinner.stopAndPersist({
33
+ symbol: '▲',
34
+ text: warning.stack || warning.message || warning
35
+ })
30
36
  })
31
37
 
32
38
  app.pipeline.on('*', function (event, ...args) {
@@ -40,9 +46,9 @@ function ui (app) {
40
46
  current = null
41
47
  } else if (name === 'asset') {
42
48
  bundling.delete(args[0])
43
- let id = args[0]
44
- let asset = app.context.assets.get(id)
45
- let suffix = ` [${pretty(asset.size)}]`
49
+ const id = args[0]
50
+ const asset = app.context.assets.get(id)
51
+ const suffix = ` [${pretty(asset.size)}]`
46
52
  spinner.stopAndPersist({
47
53
  symbol: '◆',
48
54
  text: truncate(id, suffix.length) + suffix
@@ -52,7 +58,7 @@ function ui (app) {
52
58
  } else if (name === 'warning') {
53
59
  app.emit('warning', args[0])
54
60
  }
55
- if (current) spinner.start(current)
61
+ if (current && interactive()) spinner.start(current)
56
62
  else spinner.stop()
57
63
  })
58
64
 
@@ -65,6 +71,7 @@ function ui (app) {
65
71
  symbol: '◀︎',
66
72
  text: prefix + truncate(url, prefix.length + suffix.length) + suffix
67
73
  })
74
+ if (current && interactive()) spinner.start(current)
68
75
  })
69
76
 
70
77
  app.on('start', function (port) {
@@ -79,7 +86,7 @@ function ui (app) {
79
86
  text: `Server listening on port ${port}`
80
87
  })
81
88
  }
82
- if (current) spinner.start(current)
89
+ if (current && interactive()) spinner.start(current)
83
90
  })
84
91
  }
85
92
 
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "jalla",
3
- "version": "1.0.0-4",
4
- "description": "web compiler and server in one",
3
+ "version": "1.0.0-41",
4
+ "description": "A web compiler and server in one",
5
5
  "main": "index.js",
6
6
  "bin": "bin.js",
7
7
  "scripts": {
8
- "test": "standard && dependency-check ./package.json"
8
+ "test": "standard && dependency-check --missing ./package.json"
9
9
  },
10
10
  "repository": {
11
11
  "type": "git",
@@ -34,65 +34,64 @@
34
34
  "choo": "7.x"
35
35
  },
36
36
  "devDependencies": {
37
- "babel-eslint": "^10.0.1",
38
- "dependency-check": "^3.1.0",
39
- "standard": "^12.0.1"
37
+ "babel-eslint": "^10.1.0",
38
+ "dependency-check": "^4.1.0",
39
+ "standard": "^14.3.1"
40
40
  },
41
41
  "dependencies": {
42
- "@babel/core": "^7.4.5",
43
- "@babel/preset-env": "^7.4.5",
44
- "autoprefixer": "^8.0.0",
42
+ "@babel/core": "^7.8.7",
43
+ "@babel/preset-env": "^7.8.7",
44
+ "@goto-bus-stop/envify": "^5.0.0",
45
+ "autoprefixer": "^9.7.4",
45
46
  "babel-plugin-dynamic-import-split-require": "^2.0.0",
46
47
  "babelify": "^10.0.0",
47
- "brfs": "^1.6.1",
48
- "browserify": "^16.2.3",
49
- "browserslist": "^4.6.3",
48
+ "brfs": "^2.0.2",
49
+ "browserify": "^17.0.0",
50
+ "browserslist": "^4.16.6",
50
51
  "caniuse-api": "^3.0.0",
51
- "chalk": "^2.4.1",
52
- "chokidar": "^3.0.1",
53
- "clear-module": "^3.0.0",
54
- "common-shakeify": "^0.6.0",
55
- "concat-stream": "^1.6.2",
56
- "convert-source-map": "^1.6.0",
52
+ "chalk": "^4.1.1",
53
+ "chokidar": "^3.3.1",
54
+ "clear-module": "^4.1.1",
55
+ "concat-stream": "^2.0.0",
56
+ "convert-source-map": "^1.7.0",
57
57
  "dedent": "^0.7.0",
58
58
  "documentify": "^3.2.2",
59
- "dropcss": "^1.0.13",
60
59
  "envify": "^4.1.0",
61
- "exorcist": "^1.0.1",
62
- "get-port": "^3.2.0",
63
- "hstream": "^1.2.0",
64
- "koa": "^2.7.0",
65
- "koa-conditional-get": "^2.0.0",
66
- "koa-etag": "^3.0.0",
67
- "koa-static": "^4.0.3",
60
+ "exorcist": "^2.0.0",
61
+ "get-port": "^5.1.1",
62
+ "hstream": "^3.1.1",
63
+ "is-interactive": "^1.0.0",
64
+ "jsesc": "^3.0.2",
65
+ "koa": "^2.11.0",
66
+ "koa-conditional-get": "^3.0.0",
67
+ "koa-etag": "^4.0.0",
68
+ "koa-static": "^5.0.0",
68
69
  "mime": "^2.4.3",
69
- "minify-stream": "^1.2.0",
70
- "minimist": "^1.2.0",
71
- "mkdirp": "^0.5.1",
70
+ "minify-stream": "^2.1.0",
71
+ "minimatch": "^3.0.4",
72
+ "minimist": "^1.2.4",
72
73
  "nanobus": "^4.4.0",
73
- "nanohtml": "^1.6.3",
74
- "ora": "^3.4.0",
74
+ "nanohtml": "^1.9.1",
75
+ "ora": "^4.0.3",
75
76
  "pirates": "^4.0.0",
76
- "postcss": "^7.0.17",
77
- "postcss-csso": "^3.0.0",
78
- "postcss-import": "^11.1.0",
79
- "postcss-load-config": "^1.2.0",
80
- "postcss-url": "^7.3.2",
77
+ "postcss": "^8.3.5",
78
+ "postcss-csso": "^5.0.1",
79
+ "postcss-import": "^14.0.2",
80
+ "postcss-load-config": "^3.1.0",
81
+ "postcss-url": "^10.1.3",
81
82
  "postcss-watcher": "^2.0.0",
82
83
  "posthtml-minifier": "^0.1.0",
83
- "posthtmlify": "^0.1.0",
84
+ "posthtmlify": "^0.2.0",
84
85
  "pretty-bytes": "^5.2.0",
85
- "read-pkg-up": "^3.0.0",
86
- "regenerator-runtime": "^0.13.2",
87
- "resolve": "^1.7.1",
88
- "source-map-support": "^0.5.6",
86
+ "read-pkg-up": "^7.0.1",
87
+ "regenerator-runtime": "^0.13.5",
88
+ "resolve": "^1.15.1",
89
+ "source-map-support": "^0.5.16",
89
90
  "split-require": "^3.1.2",
90
91
  "tfilter": "^1.0.1",
91
- "through2": "^3.0.1",
92
- "tinyify": "^2.5.1",
92
+ "through2": "^4.0.2",
93
+ "tinyify": "^4.0.0",
93
94
  "transform-ast": "^2.4.4",
94
- "uglifyify": "^5.0.1",
95
- "unassertify": "^2.1.1",
96
- "watchify": "^3.11.1"
95
+ "watchify": "^4.0.0"
97
96
  }
98
97
  }