swico 0.6.1-beta1 → 0.6.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "swico",
3
- "version": "0.6.1-beta1",
3
+ "version": "0.6.1",
4
4
  "description": "Simple, efficient, and practical front-end framework",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -21,8 +21,7 @@
21
21
  "scripts": {
22
22
  "compile": "tsc && ts-node ./src/task.ts",
23
23
  "publish:offical": "npm run compile && cd ./dist && npm publish",
24
- "publish:beta": "npm run compile && cd ./dist && npm publish --tag=beta",
25
- "test": "ts-node ./test.ts"
24
+ "publish:beta": "npm run compile && cd ./dist && npm publish --tag=beta"
26
25
  },
27
26
  "repository": {
28
27
  "type": "git",
@@ -58,7 +58,7 @@ var config_1 = require("../utils/config");
58
58
  var chokidar_1 = __importDefault(require("chokidar"));
59
59
  var path_1 = __importDefault(require("path"));
60
60
  var cross_spawn_1 = __importDefault(require("cross-spawn"));
61
- var envPort = process.env.PORT;
61
+ var _a = process.env, envPort = _a.PORT, RESTART = _a.RESTART;
62
62
  var package_json_1 = __importDefault(require("../../package.json"));
63
63
  var handleWatch = function (projectPath, devServer) {
64
64
  var configFilesWatcher = chokidar_1.default
@@ -114,7 +114,7 @@ var handleWatch = function (projectPath, devServer) {
114
114
  };
115
115
  var availablePort;
116
116
  var restartServer = function () {
117
- var result = cross_spawn_1.default.sync('cross-env', ["PORT=".concat(availablePort), 'swico', 'start'], {
117
+ var result = cross_spawn_1.default.sync('cross-env', ["PORT=".concat(availablePort), 'RESTART=true', 'swico', 'start'], {
118
118
  stdio: 'inherit'
119
119
  });
120
120
  if (result.error) {
@@ -129,8 +129,10 @@ function start() {
129
129
  switch (_b.label) {
130
130
  case 0:
131
131
  process.env.SWICO_ENV = 'dev';
132
- tools_1.toast.info("Swico v".concat(package_json_1.default.version));
133
- tools_1.toast.info('Initializing Swico development config...');
132
+ if (RESTART !== 'true') {
133
+ tools_1.toast.info("Swico v".concat(package_json_1.default.version));
134
+ tools_1.toast.info('Initializing Swico development config...');
135
+ }
134
136
  return [4, (0, tools_1.initIndexFile)()];
135
137
  case 1:
136
138
  _b.sent();