FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
sql-parser/Cakefile at master · forward/sql-parser · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
forward
/
sql-parser
Public
Notifications
You must be signed in to change notification settings
Fork
124
Star
540
Code
Issues
12
Pull requests
6
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
sql-parser
/
Cakefile
Copy path
More file actions
More file actions
Latest commit
History
History
History
53 lines (44 loc) · 1.57 KB
Breadcrumbs
sql-parser
/
Cakefile
Copy path
File metadata and controls
53 lines (44 loc) · 1.57 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
spawn
,
exec
}
=
require
'
child_process
'
fs
=
require
(
'
fs
'
)
require
(
'
coffee-script/register
'
)
run
=
(
args
,
cb
)
->
proc
=
spawn
'
./node_modules/.bin/coffee
'
, args
proc
.
stderr
.
on
'
data
'
, (
buffer
)
->
console
.
log
buffer
.
toString
()
proc
.
on
'
exit
'
, (
status
)
->
process
.
exit
(
1
)
if
status
!=
0
cb
()
if
typeof
cb
is
'
function
'
build
=
(
cb
)
->
files
=
fs
.
readdirSync
'
src
'
files
=
(
'
src/
'
+
file
for
file
in
files
when
file
.
match
(
/
\.
coffee
$
/
))
run
[
'
-c
'
,
'
-o
'
,
'
lib
'
].
concat
(files), cb
task
'
build
'
,
'
Run full build
'
,
->
invoke
'
build:compile
'
invoke
'
build:parser
'
setTimeout (
->
invoke
'
build:browser
'
),
100
task
'
build:compile
'
,
'
Compile all coffee files to js
'
,
build
task
'
build:parser
'
,
'
rebuild the Jison parser
'
,
->
parser
=
require
(
'
./src/grammar
'
).
parser
fs
.
writeFileSync
'
lib/compiled_parser.js
'
,
parser
.
generate
()
task
'
build:browser
'
,
'
Build a single JS file suitable for use in the browser
'
,
->
code
=
'
'
for
name
in
[
'
lexer
'
,
'
compiled_parser
'
,
'
nodes
'
,
'
parser
'
,
'
sql_parser
'
]
code
+=
"""
require['./
#{
name
}
'] = new function() {
var exports = this;
#{
fs
.
readFileSync
"
lib/
#{
name
}
.js
"
}
};
"""
code
=
"""
(function(root) {
var SQLParser = function() {
function require(path){ return require[path]; }
#{
code
}
return require['./sql_parser']
}();
if(typeof define === 'function' && define.amd) {
define(function() { return SQLParser });
} else { root.SQLParser = SQLParser }
}(this));
"""
fs
.
writeFileSync
'
./browser/sql-parser.js
'
, code
Back
|
FazBrowse Home
|
New Git URL