Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Cavendichun committed Jul 3, 2020
2 parents 0dd8ba9 + 60960df commit a73f105
Show file tree
Hide file tree
Showing 8 changed files with 53 additions and 15 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.en-US.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 1.0.6 (2020-06-24)

### Bug Fixes

- Fix the problem of invalid command line parameters after automatic restart of listening profile changes ([320fa8a](https://github.com/alexiosjs/alexios/commit/320fa8a6851376cedc315cf26cb8f1620711ac62))
- Use node-sass instead of dart-sass, prevent MAC compatibility problems ([3d3e20f](https://github.com/alexiosjs/alexios/commit/3d3e20fe15a2da08ced54b3140badddba1faca44))

## 1.0.5 (2020-06-22)

### Bug Fixes

- Fix the problem that the alexiosrc not working ([f741d7b](https://github.com/alexiosjs/alexios/commit/f741d7b2fb1fa3a1bb2ec659f8b95a0a31ce7521))

### Features

- Auto reload when config files and public path changed ([df7a62d](https://github.com/alexiosjs/alexios/commit/df7a62d70b9ec1cebdcf2e5f563a3994d055fe28))
- Make className of CSS-Modules readable in dev mode ([32d978d](https://github.com/alexiosjs/alexios/commit/32d978d95faa317e5ff32f622f6aac2820bfd1dd))

## 1.0.4 (2020-06-11)

### Bug Fixes
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 1.0.6 (2020-06-24)

### Bug Fixes

- 修复监听配置文件变动自动重启后命令行参数失效的问题 ([320fa8a](https://github.com/alexiosjs/alexios/commit/320fa8a6851376cedc315cf26cb8f1620711ac62))
- 使用 node-sass 代替 dart-sass,防止 mac 的兼容性问题 ([3d3e20f](https://github.com/alexiosjs/alexios/commit/3d3e20fe15a2da08ced54b3140badddba1faca44))

## 1.0.5 (2020-06-22)

### Bug Fixes

- 修复 alexiosrc 配置不生效的问题 ([f741d7b](https://github.com/alexiosjs/alexios/commit/f741d7b2fb1fa3a1bb2ec659f8b95a0a31ce7521))

### Features

- 配置文件修改和 public 文件夹首次新建时自动重启 app ([df7a62d](https://github.com/alexiosjs/alexios/commit/df7a62d70b9ec1cebdcf2e5f563a3994d055fe28))
- dev 环境 className 可读 ([32d978d](https://github.com/alexiosjs/alexios/commit/32d978d95faa317e5ff32f622f6aac2820bfd1dd))

## 1.0.4 (2020-06-11)

### Bug Fixes
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "alexios",
"version": "1.0.4",
"version": "1.0.6",
"description": "A lightweight, powerful and zero-configuration React cli based on Webpack and babel.",
"scripts": {
"lib": "babel ./src -d ./lib --copy-files",
Expand Down Expand Up @@ -59,12 +59,12 @@
"html-webpack-plugin": "^4.2.0",
"less-loader": "^6.1.0",
"mini-css-extract-plugin": "^0.9.0",
"node-sass": "^4.14.1",
"nodemon": "^2.0.4",
"path-to-regexp": "^2.2.1",
"react": "^16.13.1",
"react-app-polyfill": "^1.0.6",
"react-dom": "^16.13.1",
"sass": "^1.26.8",
"sass-loader": "^8.0.2",
"style-loader": "^1.2.1",
"typescript": "^3.8.3",
Expand Down
2 changes: 1 addition & 1 deletion src/commands/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export default async argv => {
devServer.close();
process.send("SIGINT");
console.log(logStr);
require("../scripts/start.js").default();
require("../scripts/start.js").default(argv);
};

rcWatcher.on("change", () => {
Expand Down
4 changes: 2 additions & 2 deletions src/core/alexios.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ const { log } = console;

const core = () => {
return yargs
.command("dev", "Start the development server.", () => {
.command("dev", "Start the development server.", ({ argv }) => {
log(chalk.cyan("Starting the development server...\n"));
process.env.NODE_ENV = "development";
require("../scripts/start.js").default();
require("../scripts/start.js").default(argv);
})
.command("build", "Package your application.", async ({ argv }) => {
log(chalk.cyan("Packaging your application...\n"));
Expand Down
14 changes: 8 additions & 6 deletions src/scripts/start.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { fork } from "child_process";

export default () => {
const args = process.argv.slice(3);

const devProcess = fork(require.resolve("./dev.js"), args, {
stdio: "inherit",
});
export default argv => {
const devProcess = fork(
require.resolve("./dev.js"),
Object.keys(argv).map(k => `--${k}=${argv[k]}`),
{
stdio: "inherit",
}
);

devProcess.once("exit", code => {
process.exit(code);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/get-rc-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const getRcConfig = name => {
const RC_EXSIST = fs.pathExistsSync(rcPath);

if (RC_EXSIST) {
const rcConfig = require.resolve(rcPath);
const rcConfig = require(rcPath);

return name ? rcConfig[name] : rcConfig;
}
Expand Down
6 changes: 3 additions & 3 deletions src/webpack/config.modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,9 @@ export const module = env => {
const SCSS_LOADER = [
{
loader: "sass-loader",
options: {
implementation: require("sass"),
},
// options: {
// implementation: require("sass"),
// },
},
{
loader: "@epegzz/sass-vars-loader",
Expand Down

0 comments on commit a73f105

Please sign in to comment.