Skip to content

Commit

Permalink
Migrate changes from source-academy/cadet-frontend (#1)
Browse files Browse the repository at this point in the history
* Move slang files from cadet-frontend

- Change week to chapter
- Add rttc check
- Formatting changes
  - compliance to cadet-frontend tslint rules (to be added here)
- Removed MutableVariableDeclarationError
- Context has a generic type for external properties
- Add NoDeclareMutableError, NoDeclareReservedError,
  and NoUnspecifiedOperatorError

* Add es2017 object definition

This is to prevent the TS error "Property 'entries' does not exist on
type 'ObjectConstructor'". Object.entries(...) is the offending expression, and the solution is to add a (granular) definition of the es2017 object library, where the `entries()` method was added to ES.

* Fix ts compile error for repl.ts

Error: "error TS2339: Property 'week' does not exist on type 'Context<{}>'."
This is because the Context now has the property 'chapter' instead of
'week'.

* Change github URLs to source-academy's

* Use yarn instead of npm

* Add jest (tests fail)

* Update README

* Fix yarn build throwing type errors

* Add builtins definition

- extra param for createContext
- extra param for importBuiltins
- extra param for timed (to call display from builtins)
- Have not removed the redux store call from display (now
defaultDisplay)

* Remove redux calls from default display function

Also renamed defaultDisplay -> display

* Remove import statement

* Move type BuiltIns -> interface under types

To stick to the interfaces in that file, and to consolidate the
definitions

* Add comment for typedef

* Rename BuiltIns -> CustomBuiltIns

* Fix reference lib -> dist, tsconfig compiler options for module

* Add prompt to CustomBuiltIns type

* Rename toolchain -> src, remove babel
  • Loading branch information
remo5000 authored and ning-y committed Jul 9, 2018
1 parent c1d9e00 commit c3e350f
Show file tree
Hide file tree
Showing 50 changed files with 5,589 additions and 3,187 deletions.
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
toolchain/*.js
toolchain/*/*.js
*.js
*.map
lib/
dist/
15 changes: 7 additions & 8 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,18 @@ Usage
-----
The REPL is still under development.

To install,
To build,

.. code-block::
$ git clone https://github.com/ningyuansg/slang.git
$ git clone https://github.com/source-academy/js-slang.git
$ cd slang
$ npm install
$ npm run build
$ npm install -g
$ yarn
$ yarn build
To invoke the repl, run the command `slang` anywhere:
To invoke the repl, run the built `slang.js`,

.. code-block::
$ slang
>
$ ./slang.js
>
Loading

0 comments on commit c3e350f

Please sign in to comment.