Skip to content

Commit a31bdd6

Browse files
committed
Merge branch 'develop' into cn
# Conflicts: # components/splash/splash.jsx # content/contribute.md # content/index.md
2 parents 9f1345a + ca370eb commit a31bdd6

File tree

11 files changed

+61
-29
lines changed

11 files changed

+61
-29
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
build/
12
antwar.config.js

antwar.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ module.exports = {
7878
}
7979
)
8080
}
81-
}
81+
};
8282

8383
function root(contentCb) {
8484
return {

components/splash/splash-style.scss

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@
44
&__viz {
55
position:relative;
66
display:flex;
7-
height:100vh;
8-
min-height:600px;
9-
max-height:900px;
7+
height:500px;
108
}
119

1210
&__modules,

components/splash/splash.jsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,12 @@ export default props => {
2020
</Container>
2121
</section>
2222
<section className="splash__viz">
23-
<div className="splash__modules">
24-
25-
</div>
26-
2723
<div className="splash__icon">
2824
<Cube className="splash__cube" depth={ 150 } />
2925
</div>
3026

31-
<div className="splash__output">
32-
33-
</div>
34-
3527
<span className="splash__headline">
36-
webpack 将&nbsp;
37-
<Link to="/concepts/modules">模块</Link>
38-
&nbsp;转换为 生产环境下的&nbsp;
39-
<Link to="/concepts/output"></Link>
40-
&nbsp;和资源
28+
Who said front-end code can't be modular?
4129
</span>
4230
</section>
4331

content/concepts/modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ The webpack community has built _loaders_ for a wide variety of popular language
4242

4343
And many others! Overall, webpack provides a powerful and rich API for customization that allows one to use webpack for **any stack**, while staying **unopinionated** about your development, testing, and production workflows.
4444

45-
For a full list, see [**the list of loaders**](https://webpack.github.io/docs/list-of-loaders.html) or [**write your own**](./api/loaders).
45+
For a full list, see [**the list of loaders**](https://webpack.github.io/docs/list-of-loaders.html) or [**write your own**](/api/loaders).

content/contribute.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ title: 贡献
66
77
## 文档
88

9-
[作者指南](writers-guide)
9+
[作者指南](/writers-guide)
1010

1111
## 技术贡献
1212

content/index.md

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
1-
---
2-
title: 快速内容
3-
---
1+
**index.js**
42

5-
仍然在讨论如何处理这一部分。
3+
```js
4+
const foo = require('./foo.js')
5+
6+
foo.bar()
7+
```
8+
9+
**foo.js**
10+
11+
```js
12+
module.exports = {
13+
bar: function () {
14+
//
15+
}
16+
}
17+
```
18+
19+
## Bundle your [modules](/concepts/modules) with webpack.
20+
21+
**webpack.config.js**
22+
23+
```js
24+
module.exports = {
25+
entry: './index.js',
26+
output: {
27+
path: 'bundle.js'
28+
}
29+
}
30+
```
31+
32+
**page.html**
33+
34+
```html
35+
<html>
36+
<head>
37+
...
38+
</head>
39+
<body>
40+
...
41+
<script src="/bundle.js"></script>
42+
</body>
43+
</html>
44+
```
45+
46+
## It's really that simple. [Get started](/get-started) now!

content/writers-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ title: 作者指南
1919

2020
1. `npm i`
2121
2. `npm start`
22-
3. [http://localhost:3000](http://localhost:3000)
22+
3. `open http://localhost:3000`
2323

2424
The site will update itself as you make changes.
2525

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
"build-test": "http-server build/",
2727
"deploy": "gh-pages -d build",
2828
"lint": "run-s lint:*",
29+
"lint:links": "hyperlink build/index.html -r",
2930
"lint:js": "eslint . --ext .js --ext .jsx",
3031
"lint:md": "eslint . --ext .md",
3132
"lint:markdown": "markdownlint --config ./.markdownlintrc **/*.md *.md ./content/**/*.md",
@@ -36,10 +37,10 @@
3637
},
3738
"devDependencies": {
3839
"alex": "^3.1.0",
39-
"antwar": "0.8.1-alpha.95152042",
40-
"antwar-helpers": "0.8.1-alpha.95152042",
41-
"antwar-interactive": "0.8.1-alpha.95152042",
42-
"antwar-prevnext-plugin": "0.8.1-alpha.95152042",
40+
"antwar": "0.8.1-alpha.50699ca3",
41+
"antwar-helpers": "0.8.1-alpha.50699ca3",
42+
"antwar-interactive": "0.8.1-alpha.50699ca3",
43+
"antwar-prevnext-plugin": "0.8.1-alpha.50699ca3",
4344
"autoprefixer": "^6.3.7",
4445
"babel-core": "^6.10.4",
4546
"babel-eslint": "^6.1.2",
@@ -57,6 +58,7 @@
5758
"gh-pages": "^0.11.0",
5859
"html-webpack-plugin": "^2.22.0",
5960
"http-server": "^0.9.0",
61+
"hyperlink": "^2.5.0",
6062
"json-loader": "^0.5.4",
6163
"lodash": "^4.16.1",
6264
"markdown-loader": "^0.1.7",

scripts/deploy.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ SOURCE_BRANCH="master"
66

77
# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
88
if [ "$TRAVIS_PULL_REQUEST" != "false" -o "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]; then
9-
echo "Skipping deploy; just doing a build."
9+
echo "Skipping deploy; just doing a build and linting links."
1010
npm run build
11+
npm run lint:links
1112
exit 0
1213
fi
1314

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ module.exports = function(env) {
140140
interactiveConfig
141141
);
142142
case 'build':
143+
case 'lint:links':
143144
return merge(
144145
commonConfig,
145146
buildConfig

0 commit comments

Comments
 (0)