Skip to content

Commit daa0cba

Browse files
committed
tweak: rename *-local.js to *-override.js, convey a more accurate meaning.
1 parent f93121a commit daa0cba

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,4 +192,4 @@ slides/webgl
192192
/zh-src
193193
/en-src
194194

195-
/config/env.*-local.js
195+
/config/env.*-override.js

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ It will:
3030

3131
### Local Config
3232

33-
To customize the links of `echarts-examples` and other configurations, you can create a local config file `echarts-doc/config/env.dev-local.js`, which is not tracked by git, and its top-level properties will be used to override the corresponding properties of `echarts-doc/config/env.dev.js` when `npm run dev`.
33+
To customize the links of `echarts-examples` and other configurations, you can create a local config file `echarts-doc/config/env.dev-override.js`, which is not tracked by git, and its top-level properties will be used to override the corresponding properties of `echarts-doc/config/env.dev.js` when `npm run dev`.
3434

35-
For example, create a `echarts-doc/config/env.dev-local.js`:
35+
For example, create a `echarts-doc/config/env.dev-override.js`:
3636
```js
3737
module.exports = {
38-
// These props will override the same props in `echarts-doc/config/env.dev-local.js`
38+
// These props will override the same props in `echarts-doc/config/env.dev.js`
3939
galleryViewPath: 'http://127.0.0.1:3002/en/view.html?local=1&c=',
4040
galleryEditorPath: 'http://127.0.0.1:3002/en/editor.html?local=1&c=',
4141
EMBEDDED_ECHARTS_SCRIPT_URL: 'http://localhost:8001/echarts/echarts/dist/echarts.js',

build/helper.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ exports.readConfigEnvFile = function (envType) {
1111
assert(ENV_TYPE.indexOf(envType) >= 0, 'envType must be one of ' + ENV_TYPE.join(', '));
1212

1313
const configEnvRelativePath = '../config/env.' + envType + '.js';
14-
const configEnvLocalRelativePath = '../config/env.' + envType + '-local.js';
14+
const configEnvOverrideRelativePath = '../config/env.' + envType + '-override.js';
1515

1616
const config = require(configEnvRelativePath);
17-
if (fs.existsSync(path.resolve(__dirname, configEnvLocalRelativePath))) {
18-
const configLocal = require(configEnvLocalRelativePath);
17+
if (fs.existsSync(path.resolve(__dirname, configEnvOverrideRelativePath))) {
18+
const configLocal = require(configEnvOverrideRelativePath);
1919
assert(
2020
typeof configLocal === 'object' && !Array.isArray(configLocal),
21-
configEnvLocalRelativePath + ' must be an object.'
21+
configEnvOverrideRelativePath + ' must be an object.'
2222
);
2323
Object.assign(config, configLocal);
2424
}

0 commit comments

Comments
 (0)