Separate script for linting.

This commit is contained in:
kovacsv 2021-12-23 21:46:52 +01:00
parent 3b68f6d746
commit 43917f401d
3 changed files with 5 additions and 22 deletions

View File

@ -20,11 +20,12 @@
"scripts": {
"start": "http-server",
"test": "mocha test",
"build": "node tools/run_python.js tools/build.py",
"lint": "eslint source && eslint website",
"doc": "jsdoc -c tools/jsdoc.json",
"build": "npm run lint && npm run doc && node tools/run_python.js tools/build.py",
"update": "node tools/run_python.js tools/update.py",
"updatelibs": "npm install && node tools/run_python.js tools/updatelibs.py",
"svg": "node tools/run_python.js tools/svg.py",
"doc": "jsdoc -c tools/jsdoc.json"
"svg": "node tools/run_python.js tools/svg.py"
},
"dependencies": {
"@simonwep/pickr": "1.8.2",

View File

@ -18,12 +18,6 @@ def GetVersion (rootDir):
packageJson = json.load (packageJsonFile)
return packageJson['version']
def ESLintFolder (folder):
result = Tools.RunCommand ('eslint', [folder])
if result != 0:
return False
return True
def CompressCssFiles (inputFiles, outputFile):
parameters = ['-o', outputFile]
for inputFile in inputFiles:
@ -143,18 +137,6 @@ def Main (argv):
with open (os.path.join (toolsDir, 'config.json')) as configJson:
config = json.load (configJson)
PrintInfo ('ESLint importer sources.')
esLintResult = ESLintFolder (os.path.join (rootDir, 'source'))
if not esLintResult:
PrintError ('ESLint importer sources failed.')
return 1
PrintInfo ('ESLint website sources.')
esLintResult = ESLintFolder (os.path.join (rootDir, 'website', 'o3dv'))
if not esLintResult:
PrintError ('ESLint website sources failed.')
return 1
version = GetVersion (rootDir)
PrintInfo ('Create build directory')
CreateDestinationDir (config, rootDir, websiteDir, version, testBuild)

View File

@ -7,7 +7,7 @@
"encoding": "utf8",
"destination": "build/docs/",
"recurse": true,
"verbose": true
"verbose": false
},
"docdash" : {
"menu": {