Skip to content

Commit 358ab56

Browse files
authored
Merge pull request #70 from ptwales/npm-package
Prepare the package.json to be used with npm
2 parents 6b5dc9d + b292d73 commit 358ab56

5 files changed

Lines changed: 12 additions & 10 deletions

File tree

File renamed without changes.

editors/ccap-temple-mode.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ COMPILER-LOC the directory containing the compiler executable.
158158
TARGET-PACKAGE package or module to place the generated module.
159159
LANGUAGE either 'scala' or 'purs'.
160160
OUT-DIR directory to place the generated code file."
161-
(let ((compile-command (concat compiler-loc "/compile"))
161+
(let ((compile-command (concat compiler-loc "/codgen.js"))
162162
(module-argument (concat "-p " target-package))
163163
(lang-argument (concat "-m " language))
164164
(output-argument (concat "-o " out-dir))
@@ -338,7 +338,7 @@ OUT-DIR directory to place the generated code file."
338338
;; Flycheck
339339
(add-to-list 'flycheck-checkers 'ccap-temple)
340340
(flycheck-add-mode 'ccap-temple 'ccap-temple-mode)
341-
(setq flycheck-ccap-temple-executable (concat ccap-temple-mode-codegen-repo "/compile"))
341+
(setq flycheck-ccap-temple-executable (concat ccap-temple-mode-codegen-repo "/codegen.js"))
342342

343343
;; Syntax highlighting.
344344
(setq font-lock-defaults '((ccap-temple-font-lock-keywords))))
File renamed without changes.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
{
2+
"name": "purescript-ccap-codegen",
23
"private": true,
4+
"version": "0.0.5",
35
"scripts": {
46
"clean": "rimraf output && rimraf .pulp-cache",
57
"build": "spago build --purs-args '--censor-lib --strict'",
@@ -10,10 +12,10 @@
1012
"dependencies": {
1113
"decimal.js": "10.2.0",
1214
"pg": "^7.11.0",
13-
"spago": "^0.13.0",
1415
"yargs": "^8.0.2"
1516
},
1617
"devDependencies": {
18+
"spago": "^0.13.0",
1719
"dotenv-cli": "^3.0.0",
1820
"purescript": "^0.13.5",
1921
"purescript-language-server": "^0.12.7",

runtests

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ spago build
77
case $1 in
88
ccap)
99
DB=dev15-db.wicourts.gov:5612:cc:viewer
10-
./get-schema --config $DB -d > samples/Domains.tmpl
11-
./get-schema --config $DB -t Case > samples/Case.tmpl
10+
./get-schema.js --config $DB -d > samples/Domains.tmpl
11+
./get-schema.js --config $DB -t Case > samples/Case.tmpl
1212
;;
1313
esac
1414

@@ -17,23 +17,23 @@ for i in samples/*.tmpl; do
1717
# not parsed correctly. NOTE: this passing does NOT guarantee a
1818
# working purescript or scala file on generation; for example, if
1919
# a type is undefined, no error checking catches this.
20-
./compile.js -m test -p unused $i
20+
./codegen.js -m test -p unused $i
2121

2222
# Pretty-print county.tmpl to the console. Removes comments and
2323
# puts the template in a readable format.
24-
./compile.js -m pretty -p unused $i
24+
./codegen.js -m pretty -p unused $i
2525

2626
# Generate the purescript file from the given template
27-
./compile.js -p Ccap.Cc.Test -m purs $i
27+
./codegen.js -p Ccap.Cc.Test -m purs $i
2828

2929
# Generate the scala file from the given template
30-
./compile.js -p gov.wicourts.cc -m scala $i
30+
./codegen.js -p gov.wicourts.cc -m scala $i
3131

3232
# TODO: Test compilation of generated output.
3333
done
3434

3535
# We can at least test compile this one for now
3636

37-
./compile.js -p Test.Generated -m purs -o test/generated samples/SelfContained.tmpl
37+
./codegen.js -p Test.Generated -m purs -o test/generated samples/SelfContained.tmpl
3838

3939
spago test

0 commit comments

Comments
 (0)