File tree Expand file tree Collapse file tree 3 files changed +21
-18
lines changed Expand file tree Collapse file tree 3 files changed +21
-18
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,9 @@ branches:
5
5
language : node_js
6
6
node_js :
7
7
- " 8"
8
- script :
9
- - bash ./src/scripts/deploy.sh
10
8
sudo : required
11
9
install :
12
- - npm install --global yarn
13
10
- yarn
14
11
- sudo pip install proselint
12
+ script :
13
+ - bash ./src/scripts/deploy.sh
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ title: Mode
3
3
sort : 4
4
4
contributors :
5
5
- EugeneHlushko
6
+ - byzyk
6
7
---
7
8
8
9
Providing the ` mode ` configuration option tells webpack to use its built-in optimizations accordingly.
@@ -85,20 +86,20 @@ If you want to change the behavior according the **mode** variable inside the *w
85
86
86
87
``` javascript
87
88
var config = {
88
- entry: " ./app.js"
89
- ..
90
- }
89
+ entry: ' ./app.js'
90
+ // . ..
91
+ };
91
92
92
93
module .exports = (env , argv ) => {
93
-
94
- if (argv .mode === " development" ) {
95
- config .devtool = " source-map" ;
94
+
95
+ if (argv .mode === ' development' ) {
96
+ config .devtool = ' source-map' ;
96
97
}
97
-
98
- if (argv .mode === " production" ) {
98
+
99
+ if (argv .mode === ' production' ) {
100
+ // ...
99
101
}
100
-
101
- return config;
102
- }
103
102
103
+ return config;
104
+ };
104
105
```
Original file line number Diff line number Diff line change @@ -7,17 +7,20 @@ SOURCE_BRANCH="master"
7
7
# Pull requests and commits to other branches shouldn't try to deploy, just build to verify
8
8
if [ " $TRAVIS_PULL_REQUEST " != " false" -o " $TRAVIS_BRANCH " != " $SOURCE_BRANCH " ]; then
9
9
echo " Skipping deploy; just doing a build and linting links/prose/js."
10
- npm run build
11
- npm test
10
+ yarn test
11
+ yarn build
12
12
exit 0
13
13
fi
14
14
15
15
# Save some useful information
16
16
REPO=` git config remote.origin.url`
17
17
SSH_REPO=${REPO/ https: \/\/ github.com\/ / git@ github.com: }
18
18
19
+ # Run tests
20
+ yarn test
21
+
19
22
# Run our build
20
- npm run build
23
+ yarn build
21
24
22
25
# Set some git options
23
26
git config --global user.name " Travis CI"
@@ -35,4 +38,4 @@ eval `ssh-agent -s`
35
38
ssh-add src/scripts/deploy_key
36
39
37
40
# Now that we're all set up, we can deploy
38
- npm run deploy
41
+ yarn deploy
You can’t perform that action at this time.
0 commit comments