a spike to attempt to port aurelia code into typescript
The process is to take the ES6 Aurelia source code, maintain a local copy here for comparison when porting across new code changes: aurelia repo source code
Using the source from above, the next step in the process is to create equivalent, matching typescript source code by copying .js
files and renaming them .ts
extension, making small edits to make the typescript compiler happy, and as an added bonus, adding typescript type annotations for the public api:
aurelia repo typescript-converted source code
The (gulp-based) build process then compiles the typescript aurelia source code, creating the .d.ts
files that consist of only the type definitions. In addition, the .js
files in ES6 format are created also. These files can hopefully be used by babel compiler
to produce ES6 modules in register
format.
build output
- clone this repo
- run
git bash
shell, change to the main folder - change to
aurelia-ts
folder - run
npm install
- change to
node_modules/typescript
folder - run
npm install
- run
npm install -g jake
(if you haven't already) - run
jake local
- run
jake LKG
- change back to
aurelia-ts
folder - run
gulp build
you should now see folders in the output-gulp
folder. each of these folders should contain .d.ts
and .js
files from the build.
-
run
./get-latest.sh
this is a
git bash
script to help keep the aurelia-latest up to date -
clones aurelia repos into
aurelia-latest-repos
-
copies
src
folder from each repo into corresponding folder inaurelia-latest
-
manually copy
.js
files fromaurelia-latest
intoaurelia-ts
(rename each to.ts
) -
update
gulpfile.js
-
if it is a new repo, add the .d.ts file in
output-gulp