File tree Expand file tree Collapse file tree 2 files changed +8
-9
lines changed
Expand file tree Collapse file tree 2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change 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
1212const changelogPath = 'CHANGELOG.md' ;
13- let changelog = fs . readFileSync ( changelogPath , 'utf8' ) ;
13+ let changelog = readFileSync ( changelogPath , 'utf8' ) ;
1414changelog = changelog . replace ( '## main' , `## ${ process . argv [ 2 ] } ` ) ;
1515changelog = changelog . replaceAll ( '- _...Add new stuff here..._\n' , '' ) ;
1616changelog = `## main
@@ -23,4 +23,4 @@ changelog = `## main
2323
2424` + changelog ;
2525
26- fs . writeFileSync ( changelogPath , changelog , 'utf8' ) ;
26+ writeFileSync ( changelogPath , changelog , 'utf8' ) ;
Original file line number Diff line number Diff line change 1- import * as fs from 'fs' ;
2- import * as properties from '../src/util/properties' ;
3-
1+ import { writeFileSync } from 'fs' ;
42import spec from '../src/reference/v8.json' with { type : 'json' } ;
3+ import { supportsPropertyExpression , supportsZoomExpression } from '../src/util/properties' ;
54
65function 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
117116const 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
You can’t perform that action at this time.
0 commit comments