Play

Check-in [66257248df]
Login
Overview
Comment:Added initial workings of a cli program.
Timelines: family | ancestors | descendants | both | cli
Files: files | file ages | folders
SHA3-256: 66257248df1fec8f5db4ed5b65b88fd8772851be88462a533945d2c1770efa73
User & Date: robin.hansen on 2021-03-30 09:15:11
Other Links: branch diff | manifest | tags
Context
2021-03-30
09:29
Added new Elm module containing CLI related functionality. This will be compiled toa bin/compiler.js... check-in: 5ff3a4c6ce user: robin.hansen tags: cli
09:15
Added initial workings of a cli program. check-in: 66257248df user: robin.hansen tags: cli
08:57
Merge basic module and package support. check-in: 97ad30bba8 user: robin.hansen tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Added bin/cli.js version [2189dee74d].















































>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env node

const subCmd = process.argv[2];
const subCmdFlags = process.argv.slice(3);

switch (subCmd) {
    case "check": checkProject(); break;
    default: printHelp(); break;
}

function checkProject() {
    console.log("TODO: compile project");
}

function printHelp() {
    console.log(`
Play compiler. Alpha-2.

Possible options are:
* check: compile the project.
* help: print this help message.
    `);
}

Modified package.json from [ad181fde73] to [fe6c78cc73].

1
2
3
4


5
6
7
8
9
10
11
..
13
14
15
16
17
18
19
20
21
22

{
  "name": "play",
  "version": "0.0.1",
  "description": "",


  "dependencies": {},
  "devDependencies": {
    "elm": "^0.19.1-5",
    "elm-format": "^0.8.5",
    "elm-test": "^0.19.1-revision6",
    "jest": "^26.6.3",
    "strip-indent": "^3.0.0",
................................................................................
  },
  "scripts": {
    "test": "npm run test:elm && npm run test:wasm",
    "test:elm": "elm-test",
    "test:elm:watch": "elm-test --watch",
    "test:wasm": "elm make src/Main.elm --output wasm_tests/compiler.js && sed -i '' \"s/console.warn\\(.*\\);/\\/*&*\\//g\" wasm_tests/compiler.js && jest"
  },
  "author": "Robin Heggelund Hansen",
  "license": "MIT"
}





>
>







 







|
|
|
>
1
2
3
4
5
6
7
8
9
10
11
12
13
..
15
16
17
18
19
20
21
22
23
24
25
{
  "name": "play",
  "version": "0.0.1",
  "description": "",
  "author": "Robin Heggelund Hansen",
  "license": "MIT",
  "dependencies": {},
  "devDependencies": {
    "elm": "^0.19.1-5",
    "elm-format": "^0.8.5",
    "elm-test": "^0.19.1-revision6",
    "jest": "^26.6.3",
    "strip-indent": "^3.0.0",
................................................................................
  },
  "scripts": {
    "test": "npm run test:elm && npm run test:wasm",
    "test:elm": "elm-test",
    "test:elm:watch": "elm-test --watch",
    "test:wasm": "elm make src/Main.elm --output wasm_tests/compiler.js && sed -i '' \"s/console.warn\\(.*\\);/\\/*&*\\//g\" wasm_tests/compiler.js && jest"
  },
  "bin": {
    "play": "bin/cli.js"
  }
}