Skip to content

Commit 3a8af20

Browse files
committed
remove few import * from
1 parent e86c103 commit 3a8af20

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

build/bump-version-changelog.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
* And adds on top a ## main with add stuff here.
88
*/
99

10-
import * as fs from 'fs';
10+
import {readFileSync, writeFileSync} from 'fs';
1111

1212
const changelogPath = 'CHANGELOG.md';
13-
let changelog = fs.readFileSync(changelogPath, 'utf8');
13+
let changelog = readFileSync(changelogPath, 'utf8');
1414
changelog = changelog.replace('## main', `## ${process.argv[2]}`);
1515
changelog = changelog.replaceAll('- _...Add new stuff here..._\n', '');
1616
changelog = `## main
@@ -23,4 +23,4 @@ changelog = `## main
2323
2424
` + changelog;
2525

26-
fs.writeFileSync(changelogPath, changelog, 'utf8');
26+
writeFileSync(changelogPath, changelog, 'utf8');

build/generate-style-spec.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import * as fs from 'fs';
2-
import * as properties from '../src/util/properties';
3-
1+
import {writeFileSync} from 'fs';
42
import spec from '../src/reference/v8.json' with {type: 'json'};
3+
import {supportsPropertyExpression, supportsZoomExpression} from '../src/util/properties';
54

65
function unionType(values) {
76
if (Array.isArray(values)) {
@@ -45,9 +44,9 @@ function propertyType(property) {
4544
}
4645
})();
4746

48-
if (properties.supportsPropertyExpression(property)) {
47+
if (supportsPropertyExpression(property)) {
4948
return `DataDrivenPropertyValueSpecification<${baseType}>`;
50-
} else if (properties.supportsZoomExpression(property)) {
49+
} else if (supportsZoomExpression(property)) {
5150
return `PropertyValueSpecification<${baseType}>`;
5251
} else if (property.expression) {
5352
return 'ExpressionSpecification';
@@ -116,7 +115,7 @@ function layerType(key) {
116115

117116
const layerTypes = Object.keys(spec.layer.type.values);
118117

119-
fs.writeFileSync('src/types.g.ts',
118+
writeFileSync('src/types.g.ts',
120119
`// Generated code; do not edit. Edit build/generate-style-spec.ts instead.
121120
/* eslint-disable */
122121

0 commit comments

Comments
 (0)