diff --git a/build/build-readme.ts b/build/build-readme.ts index 2b06536..f8e32fa 100644 --- a/build/build-readme.ts +++ b/build/build-readme.ts @@ -17,7 +17,7 @@ const projs = glob const readmeAbsPaths = projs.map((p) => path.resolve(p, 'readme.md')); -const readmeRelPaths = readmeAbsPaths.map((p) => path.relative(rootDir, p)); +const readmeRelPaths = projs.map((p) => path.relative(rootDir, p)); const titles = readmeAbsPaths.map( (p) => fs.readFileSync(p, 'utf8').match(/(?<=(^#\s)).*(?=\n)/)![0], diff --git a/readme.md b/readme.md index 9eb8942..6d3ecbf 100644 --- a/readme.md +++ b/readme.md @@ -6,19 +6,19 @@ -- [0 编译 JS 文件](demo/0-basic-single-js/readme.md) -- [1 打包 HTML+JS](demo/1-basic-with-html/readme.md) -- [2 dev-server 即时预览](demo/2-basic-dev-server-and-hot-reload/readme.md) -- [3 打包 HTML+JS+CSS](demo/3-basic-html-js-css/readme.md) -- [4 用 webpack-chain 重构打包配置](demo/4-webpack-chain/readme.md) -- [5 用 TypeScript 重构打包配置](demo/5-refactor-config-with-ts/readme.md) -- [6 Scss、Less、CSS](demo/6-more-style/readme.md) -- [7 Babel 基本, 用 TypeScript 写业务代码](demo/7-babel-basic/readme.md) -- [8 代码压缩配置](demo/8-minify-and-restructure-configs/readme.md) -- [9 Dynamic Import](demo/9-dynamic-import/readme.md) -- [10 Let's: Polyfill](demo/10-webpack-babel-polyfill-basic/readme.md) -- [11 Let's: Polyfill + async](demo/11-polyfill-and-async/readme.md) -- [12 Let's: Tree Shaking](demo/12-tree-shaking/readme.md) +- [0 编译 JS 文件](demo/0-basic-single-js) +- [1 打包 HTML+JS](demo/1-basic-with-html) +- [2 dev-server 即时预览](demo/2-basic-dev-server-and-hot-reload) +- [3 打包 HTML+JS+CSS](demo/3-basic-html-js-css) +- [4 用 webpack-chain 重构打包配置](demo/4-webpack-chain) +- [5 用 TypeScript 重构打包配置](demo/5-refactor-config-with-ts) +- [6 Scss、Less、CSS](demo/6-more-style) +- [7 Babel 基本, 用 TypeScript 写业务代码](demo/7-babel-basic) +- [8 代码压缩配置](demo/8-minify-and-restructure-configs) +- [9 Dynamic Import](demo/9-dynamic-import) +- [10 Let's: Polyfill](demo/10-webpack-babel-polyfill-basic) +- [11 Let's: Polyfill + async](demo/11-polyfill-and-async) +- [12 Let's: Tree Shaking](demo/12-tree-shaking)