Skip to content

Commit

Permalink
Web console: Better build experience (apache#8389)
Browse files Browse the repository at this point in the history
* rename sql docs

* rm old file

* add old files
  • Loading branch information
vogievetsky authored and fjy committed Aug 24, 2019
1 parent efbf1a5 commit c948422
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion web-console/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ coordinator-console/
pages/
/index.html

lib/sql-function-doc.js
lib/sql-docs.js

.tscache
tscommand-*.tmp.txt
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions web-console/script/build
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ cp -r ./node_modules/druid-console/coordinator-console .
cp -r ./node_modules/druid-console/pages .
cp ./node_modules/druid-console/index.html .

echo "Adding SQL function doc..."
PATH="./target/node:$PATH" ./script/create-sql-function-doc.js
echo "Adding SQL docs..."
PATH="./target/node:$PATH" ./script/create-sql-docs.js

echo "Transpiling ReactTable CSS..."
PATH="./target/node:$PATH" ./node_modules/.bin/stylus lib/react-table.styl -o lib/react-table.css
Expand Down
4 changes: 3 additions & 1 deletion web-console/script/clean
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# remove lib/sql-function-doc.* for back compat cleanup
rm -rf \
lib/react-table.css \
lib/sql-function-doc.js \
lib/sql-docs.js \
lib/sql-function-doc.* \
node_modules \
coordinator-console \
pages \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
const fs = require('fs-extra');

const readfile = '../docs/querying/sql.md';
const writefile = 'lib/sql-function-doc.js';
const writefile = 'lib/sql-docs.js';

const readDoc = async () => {
const data = await fs.readFile(readfile, 'utf-8');
Expand Down
2 changes: 1 addition & 1 deletion web-console/src/ace-modes/dsql.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
// This file was modified to make the list of keywords more closely adhere to what is found in DruidSQL

var druidKeywords = require('../../lib/keywords');
var druidFunctions = require('../../lib/sql-function-doc');
var druidFunctions = require('../../lib/sql-docs');

ace.define(
'ace/mode/dsql_highlight_rules',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import {
SQL_EXPRESSION_PARTS,
SQL_KEYWORDS,
} from '../../../../lib/keywords';
import { SQL_DATA_TYPES, SQL_FUNCTIONS } from '../../../../lib/sql-function-doc';
import { SQL_DATA_TYPES, SQL_FUNCTIONS } from '../../../../lib/sql-docs';
import { uniq } from '../../../utils';
import { ColumnMetadata } from '../../../utils/column-metadata';

Expand Down
2 changes: 1 addition & 1 deletion web-console/src/views/query-view/query-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import memoizeOne from 'memoize-one';
import React from 'react';
import SplitterLayout from 'react-splitter-layout';

import { SQL_FUNCTIONS } from '../../../lib/sql-function-doc';
import { SQL_FUNCTIONS } from '../../../lib/sql-docs';
import { QueryPlanDialog } from '../../dialogs';
import { EditContextDialog } from '../../dialogs/edit-context-dialog/edit-context-dialog';
import {
Expand Down
2 changes: 1 addition & 1 deletion web-console/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
"jsx": "react",
"rootDirs": ["lib", "src"]
},
"include": ["src/**/*.ts", "src/**/*.tsx", "lib/sql-function-doc.ts"]
"include": ["src/**/*.ts", "src/**/*.tsx"]
}

0 comments on commit c948422

Please sign in to comment.