Skip to content

update master & update translation #380

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 88 commits into from
Oct 17, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
f2a258a
update /content/loaders & /content/plugins
dear-lizhihua Sep 3, 2017
a5725bb
Merge remote-tracking branch 'upstream/translation' into translation
dear-lizhihua Sep 3, 2017
3f5c3fb
docs(api): minor fix in cli
skipjack Sep 8, 2017
9cd50d5
docs(plugins): clarify and simplify `SourceMapDevToolPlugin` docs (#1…
skipjack Sep 8, 2017
a26cc70
docs(guides): update "external limitations" example in author-librari…
pfmmfp Sep 10, 2017
287e0e1
docs(plugins): update commons-chunk-plugin.md (#1560)
liorgreenb Sep 10, 2017
e8dc2f3
docs(guides): rewrite shimming (#1579)
skipjack Sep 12, 2017
2caa06a
docs(guides): fix small issues in shimming (#1591)
jeremenichelli Sep 13, 2017
ddaf684
docs(guides): fix entry path in typescript (#1592)
ltaloc Sep 13, 2017
28ac2fd
docs(guides): fix typos in production (#1584)
elliotwaite Sep 13, 2017
2ff84b9
fix(sponsors): update to reflect opencollective change (#1588)
sokra Sep 13, 2017
cb9a035
docs(config): update configuration-languages (#1590)
peterblazejewicz Sep 14, 2017
bee0f3e
docs(guides): update hot-module-replacement (#1539)
bdwain Sep 14, 2017
2af6968
docs(guides): update development.md (#1586)
marcusmolchany Sep 14, 2017
5f6a75e
docs(guides): update tree-shaking.md (#1589)
Sep 14, 2017
3dc7e74
docs(guides): update code-splitting (#1585)
diegofaria Sep 14, 2017
5003179
docs(plugins): update module-concatenation-plugin (#1565)
pspeter3 Sep 15, 2017
60f2679
docs(api): fix type in compiler.md (#1601)
Sep 18, 2017
eecdc8d
docs(config): update output.md (#1541)
metatoaster Sep 18, 2017
b3cd5ac
docs(api): add concurrent usage warning in node.md (#1599)
sokra Sep 18, 2017
cdf2c87
docs(guides): update environment-variables (#1549)
grisanu Sep 18, 2017
248be26
update /content/loaders & /content/plugins
dear-lizhihua Sep 19, 2017
9cfbbe7
Merge remote-tracking branch 'upstream/master'
dear-lizhihua Sep 19, 2017
36c53b8
Merge remote-tracking branch 'upstream/translation' into translation
dear-lizhihua Sep 19, 2017
51a9aad
Swap ordering of pre/post loaders (#1602)
DrewML Sep 21, 2017
2af9244
docs(sponsors): update segment's donations (#1603)
sokra Sep 22, 2017
7f47223
Merge remote-tracking branch 'upstream/master'
dear-lizhihua Sep 24, 2017
16bd24a
fix(fetch): fix some issues when parsing remote content (#1604)
skipjack Sep 25, 2017
158e5a5
docs(guides): fix typo in code-splitting (#1606)
andresmrm Sep 25, 2017
ec1b37b
docs(config): update `inline` recommendation in dev-server (#1540)
jasonslyvia Sep 26, 2017
ef71ac8
docs(config): update pfx description in dev-server (#1595)
SirMrDexter Sep 26, 2017
6b8a165
docs(config): clarify stats option sort and default (#1596)
jasonblanchard Sep 26, 2017
450b4a6
docs(config): add before/after hook info to dev-server (#1608)
shellscape Sep 28, 2017
9cc40c8
docs(guides): fix typo in development (#1609)
Sep 29, 2017
2b2a3fa
docs(guides): fix typo in production.md (#1610)
andrefarzat Sep 29, 2017
846681d
docs(readme): fix typos (#1615)
murphytrueman Oct 2, 2017
16a0e82
fix(markdown): fix issue with multiple pipes in a single cell (#1611)
slavafomin Oct 4, 2017
8733dcf
docs(guides): update hot-module-replacement (#1614)
caryli Oct 4, 2017
c62842a
docs(guides): fix `onClick` instances in caching (#1613)
yanlee26 Oct 4, 2017
fbaa92d
docs(config): fix typo in module.md (#1618)
githubeing Oct 6, 2017
9d85f07
docs(guides): fix grammar in getting-started.md (#1619)
HarlemSquirrel Oct 6, 2017
017e558
docs(config): add filename to index example (#1620)
skuridin Oct 6, 2017
3c5fff0
docs(guides): update wds options in hot-module-replacement (#1617)
caryli Oct 6, 2017
b23d6a2
fix(sponsors): opencollective api changed, add validation (#1622)
sokra Oct 9, 2017
02723bb
docs(development): update how-to-write-a-loader.md (#1621)
Oct 9, 2017
25a3d6d
Merge branch 'master' into cn
dear-lizhihua Oct 10, 2017
14bff9f
update /content/loaders & /content/plugins
dear-lizhihua Oct 10, 2017
debfddd
Merge remote-tracking branch 'upstream/cn' into cn
dear-lizhihua Oct 10, 2017
57fb4d4
update contributors
dear-lizhihua Oct 10, 2017
99bf48d
Merge branch 'master' into translation
dear-lizhihua Oct 10, 2017
a7aa161
Merge remote-tracking branch 'upstream/master'
dear-lizhihua Oct 11, 2017
7fcd796
Merge remote-tracking branch 'upstream/translation' into translation
dear-lizhihua Oct 11, 2017
e064e70
docs(plugins): add deepChildren to commons-chunk-plugin.md (#1625)
ljcrapo Oct 11, 2017
0f3d8e6
feat(sponsors): highlight latest sponsors/backers (#1628)
sokra Oct 11, 2017
9fbf1d6
refactor: update information architecture
skipjack Sep 29, 2017
dfbd447
refactor(navigation): update routes and styling
skipjack Sep 29, 2017
d869428
fix: add link to starter kits
skipjack Sep 30, 2017
9b5ad7e
refactor(navigation): update the navigation component
skipjack Sep 30, 2017
ab2d8ff
feat: allow page grouping within sections via `group` field
skipjack Sep 30, 2017
3fed90f
style(page): align content better on larger screens
skipjack Sep 30, 2017
b2786f1
docs: remove empty pages
skipjack Sep 30, 2017
e011431
docs(contribute): add writers-guide and update release-process
skipjack Sep 30, 2017
e571e4c
docs: sort the base pages more intuitively
skipjack Sep 30, 2017
5588e02
docs(api): update page names and grouping
skipjack Sep 30, 2017
a89e1e4
fix(mobile): clean up mobile sidebar data
skipjack Sep 30, 2017
5c632c2
docs(api): clean up formatting and fix linting errors
skipjack Oct 1, 2017
973eed2
docs(api): fix markdown listing issues
skipjack Oct 3, 2017
bc6c586
docs(contribute): fix markdown linting issues
skipjack Oct 3, 2017
fb5cf5f
docs(api): rewrite the index page
skipjack Oct 11, 2017
829fdd1
docs(api): minor formatting and cleanup
skipjack Oct 11, 2017
1da9e29
docs: add redirects for all broken routes
skipjack Oct 11, 2017
b11f900
style(page): fix small padding issue
skipjack Oct 11, 2017
68a53c3
docs(guides): update production.md (#1629)
kelset Oct 12, 2017
cdf80dc
fix(markdown): wrap inline code (#1634)
VitaliySmolyakov Oct 13, 2017
6e359f5
docs(guides): fix small typo excluding closing brace (#1637)
Oct 14, 2017
6f5c5cf
docs(guides): fix typo in development.md (#1638)
Oct 14, 2017
611166c
docs(guides): update hot-module-replacement.md (#1639)
Oct 14, 2017
9cca82b
docs(guides): maintain consistent code in production.md (#1640)
Oct 14, 2017
7811cd1
docs(guides): update typescript.md
skipjack Oct 14, 2017
78e3cee
update /content/loaders & /content/plugins
dear-lizhihua Oct 15, 2017
8a1b2c9
Merge branch 'master' into translation
dear-lizhihua Oct 15, 2017
34575cd
Merge remote-tracking branch 'upstream/translation' into translation
dear-lizhihua Oct 15, 2017
e7ad10a
Merge remote-tracking branch 'upstream/master'
dear-lizhihua Oct 15, 2017
3251e8a
Merge remote-tracking branch 'upstream/cn' into cn
dear-lizhihua Oct 15, 2017
7396c0d
Merge branch 'master' into cn
dear-lizhihua Oct 15, 2017
c0dc1be
fix LinkDropdown
dear-lizhihua Oct 15, 2017
4809e4a
Merge branch 'translation' into cn
dear-lizhihua Oct 15, 2017
178eeeb
修复 npm 命令错误导致编译不成功的问题
dear-lizhihua Oct 17, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ they are going:
- [Guides - Review and Simplify][1]
- [Concepts - Review, Organize, Define Clear Goals][2]

We haven't created issues for the other sections yet but they will be coming soon. For
We haven't created issues for the other sections yet, but they will be coming soon. For
dev-related work please see [General - Current Longterm Plan][3], which will soon be
replaced by a more dev-specific issue.

Expand All @@ -68,7 +68,7 @@ If you hope to localize this documentation please jump to the [translate branch]

## Contributing

Read throug the [writer's guide][7] if you're interested in editing the conent on this
Read through the [writer's guide][7] if you're interested in editing the content on this
site. See the [contributors page][5] to learn how to set up and start working on the site
locally.

Expand Down
184 changes: 75 additions & 109 deletions antwar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,155 +13,121 @@ module.exports = {
layout: () => require('./src/components/Site/Site.jsx').default,
paths: {
'/': {
title: "Home",
content: () => require.context('./loaders/page-loader!./src/content', false, /^\.\/.*\.md$/),
index: () => {
const index = require('./src/components/Splash/Splash.jsx').default;
index.title = 'webpack 中文文档';
index.description = 'webpack 是一个模块打包器。它的主要目标是将 JavaScript 文件打包在一起,打包后的文件用于在浏览器中使用,但它也能够胜任转换(transform)、打包(bundle)或包裹(package)任何资源(resource or asset)。';

return index;
},
title: 'Home',
layout: () => require('./src/components/Page/Page.jsx').default,
},
'get-started': {
content: () => require.context('./loaders/page-loader!./src/content', false, /^\.\/.*\.md$/),
index: () => require('./src/components/Splash/Splash.jsx').default,
redirects: {
'': '/guides/getting-started',
'install-webpack': '/guides/installation',
'why-webpack': '/guides/why-webpack',
'support': '/contribute',
'writers-guide': '/contribute/writers-guide'
}
},
api: {
title: "API",
layout: () => require('./src/components/Page/Page.jsx').default,
concepts: {
title: '概念',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
content: () => require.context('./loaders/page-loader!./src/content/api', false, /^\.\/.*\.md$/),
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
},
redirects: {
'passing-a-config': 'configuration-types'
}
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/concepts', false, /^\.\/.*\.md$/)
},
'api/plugins': {
title: "API 插件",
configuration: {
title: '配置',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/configuration', false, /^\.\/.*\.md$/)
},
api: {
title: 'API',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
content: () => require.context('./loaders/page-loader!./src/content/api/plugins', false, /^\.\/.*\.md$/),
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
},
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/api', false, /^\.\/.*\.md$/),
redirects: {
'passing-a-config': 'configuration-types'
}
},
pluginsapi: {
title: 'API 插件',
redirects: {
'': '/api/plugins',
'compiler': '/api/plugins/compiler',
'template': '/api/plugins/template'
},
hideInSidebar: true
},
concepts: {
title: "概念",
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/concepts', false, /^\.\/.*\.md$/),
guides: {
title: '指南',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
}
},
development: {
title: "开发",
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/development', false, /^\.\/.*\.md$/),
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
content: () => require.context('./loaders/page-loader!./src/content/guides', false, /^\.\/.*\.md$/),
redirects: {
'code-splitting-import': '/guides/code-splitting',
'code-splitting-require': '/guides/code-splitting',
'code-splitting-async': '/guides/code-splitting',
'code-splitting-css': '/guides/code-splitting',
'code-splitting-libraries': '/guides/code-splitting',
'why-webpack': '/comparison',
'production-build': '/guides/production'
}
},
plugins: {
title: "插件",
title: '插件',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => {
return combineContexts(
require.context('./loaders/page-loader!./src/content/plugins', false, /^\.\/.*\.md$/),
require.context('./loaders/page-loader!./generated/plugins', false, /^\.\/.*\.md$/)
);
},
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
},
layout: () => require('./src/components/Page/Page.jsx').default
}
},
loaders: {
title: "loaders",
title: 'loaders',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => {
return combineContexts(
require.context('./loaders/page-loader!./src/content/loaders', false, /^\.\/.*\.md$/),
require.context('./loaders/page-loader!./generated/loaders', false, /^\.\/.*\.md$/)
);
},
}
},
guides: {
title: "指南",
layout: () => require('./src/components/Page/Page.jsx').default,
contribute: {
title: '贡献',
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
content: () => require.context('./loaders/page-loader!./src/content/guides', false, /^\.\/.*\.md$/),
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
},
layout: () => require('./src/components/Page/Page.jsx').default,
content: () => require.context('./loaders/page-loader!./src/content/contribute', false, /^\.\/.*\.md$/),
},
vote: () => require('./src/components/Vote/Vote.jsx').default,
organization: () => require('./src/components/Organization/Organization.jsx').default,
'starter-kits': () => require('./src/components/StarterKits/StarterKits.jsx').default,

/*************************
Redirects for Old Content
*************************/
'get-started': {
hidden: true,
redirects: {
'code-splitting-import': '/guides/code-splitting',
'code-splitting-require': '/guides/code-splitting',
'code-splitting-async': '/guides/code-splitting',
'code-splitting-css': '/guides/code-splitting',
'code-splitting-libraries': '/guides/code-splitting',
'why-webpack': '/comparison',
'production-build': '/guides/production'
'': '/guides/getting-started',
'install-webpack': '/guides/installation',
'why-webpack': '/guides/why-webpack',
}
},
configuration: {
title: "配置",
layout: () => require('./src/components/Page/Page.jsx').default,
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
content: () => require.context('./loaders/page-loader!./src/content/configuration', false, /^\.\/.*\.md$/),
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
pluginsapi: {
hidden: true,
redirects: {
'': '/api/plugins',
'compiler': '/api/compiler',
'template': '/api/template'
}
},
support: {
title: "支持",
layout: () => require('./src/components/Page/Page.jsx').default,
url: ({ sectionName, fileName }) => `/${sectionName}/${fileName}/`,
content: () => require.context('./loaders/page-loader!./src/content/support', false, /^\.\/.*\.md$/),
transform: (pages) => {
return _.sortBy(pages, (page) => page.file.sort)
'api/plugins': {
redirects: {
'compiler': '/api/compiler',
'compilation': '/api/compilation',
'module-factories': '/api/module-factories',
'parser': '/api/parser',
'tapable': '/api/tapable',
'template': '/api/template',
'resolver': '/api/resolver'
}
},
vote: () => {
const page = require('./src/components/Vote/List.jsx').default;
page.title = '投票';

return page;
},
organization: () => {
const page = require('./src/components/Organization/Organization.jsx').default;

page.title = '组织';

return page;
},
'guides/starter-kits': () => {
const page = require('./src/components/StarterKits/StarterKits.jsx').default;

page.title = '配套工具';

return page;
development: {
redirects: {
'': '/contribute',
'plugin-patterns': '/contribute/plugin-patterns',
'release-process': '/contribute/release-process',
'how-to-write-a-loader': '/contribute/writing-a-loader',
'how-to-write-a-plugin': '/contribute/writing-a-plugin'
}
}
}
};
1 change: 1 addition & 0 deletions loaders/page-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = function (source) {
const result = frontmatter(source);

result.attributes = result.attributes || {};
result.attributes.group = result.attributes.group || '-';
result.attributes.anchors = markdown().getAnchors(result.body);
result.attributes.contributors = (result.attributes.contributors || []).sort();
result.attributes.related = Array.isArray(result.attributes.related) ? result.attributes.related : [];
Expand Down
7 changes: 7 additions & 0 deletions src/components/Dropdown/LinkDropdown.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

.navigation__hrefs {
margin-left: 40px;
.dropdown__list {
width: 130px;
}
}
2 changes: 1 addition & 1 deletion src/components/Footer/Footer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const Footer = () => (
<section className="footer__left">
<Link className="footer__link" to="/guides/getting-started/">起步</Link>
<Link className="footer__link" to="/organization/">组织</Link>
<Link className="footer__link" to="/support/">支持</Link>
<Link className="footer__link" to="/starter-kits/">配套工具</Link>
<Link className="footer__link" to="/comparison/">比较</Link>
</section>

Expand Down
22 changes: 22 additions & 0 deletions src/components/Navigation/Links.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"title": "Documentation",
"url": "concepts",
"children": [
{ "title": "Concepts", "url": "concepts" },
{ "title": "Configuration", "url": "configuration" },
{ "title": "API", "url": "api" },
{ "title": "Guides", "url": "guides" },
{ "title": "Loaders", "url": "loaders" },
{ "title": "Plugins", "url": "plugins" }
]
},
{
"title": "Contribute",
"url": "contribute"
},
{
"title": "Blog",
"url": "//medium.com/webpack"
}
]
Loading