diff --git a/package.json b/package.json index c4da4b2..82f31e4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/tools/build.py b/tools/build.py index 37af124..82d81a3 100644 --- a/tools/build.py +++ b/tools/build.py @@ -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) diff --git a/tools/jsdoc.json b/tools/jsdoc.json index 43b0e6d..1111fa3 100644 --- a/tools/jsdoc.json +++ b/tools/jsdoc.json @@ -7,7 +7,7 @@ "encoding": "utf8", "destination": "build/docs/", "recurse": true, - "verbose": true + "verbose": false }, "docdash" : { "menu": {