Skip to content

Commit 2ec0ea2

Browse files
authored
Update validate-es5 script to match specific files
1 parent b06f945 commit 2ec0ea2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
"setup-website": "cd website && npm install",
178178
"build-website": "npm-run-all ci-build ci-build-website",
179179
"ci-build-website": "cp -a dist/built/. website/source/built && bash -c '(npm run build-website-examples & npm run build-website-tutorials & wait -n && wait -n)' && cd dist && cp -ar data ../website/source/. && rm -rf ../website/source/data/tiles && rm -rf ../website/source/data/tiles.tgz && rm -rf ../website/source/data/base-images && rm -rf ../website/source/data/base-images.tgz && cp -ar apidocs/. ../website/source/apidocs && cd ../website && npm install && rm -f db.json && npx hexo generate",
180-
"validate-es5": "node -e \"const fs=require('fs'),acorn=require('acorn');fs.readdirSync('dist/built').forEach(f=>{if(f.endsWith('.js')){try{acorn.parse(fs.readFileSync('dist/built/'+f,'utf8'),{ecmaVersion:5})}catch(e){console.error('ES5 syntax error in dist/built/'+f+':',e.message);process.exit(1)}}});console.log('All files in dist/built pass ES5 syntax check.')\"",
180+
"validate-es5": "node -e \"const fs=require('fs'),acorn=require('acorn');fs.readdirSync('dist/built').forEach(f=>{if(f.match(/^geo\\\\.lean.*\\.js$/)){try{acorn.parse(fs.readFileSync('dist/built/'+f,'utf8'),{ecmaVersion:5})}catch(e){console.error('ES5 syntax error in dist/built/'+f+':',e.message);process.exit(1)}}});console.log('All files in dist/built pass ES5 syntax check.')\"",
181181
"prepublishOnly": "npm run build && cp dist/built/*.js .",
182182
"semantic-release": "semantic-release"
183183
},

0 commit comments

Comments
 (0)