3
votes

Can I create the navigation-skeleton project using aurelia-cli (v 1.0)?

When I copy the skeleton (also v 1.0) into a folder and then run au start --watch I get an error
Cannot read property 'getTaskMetada' of null

I've also tried using the cli to create a new project first, then copying the skeleton over the resulting folder structure - no go. I'm excited by Aurelia, but still low on the learning curve.

2
I've found that using the CLI or the skeleton project are like two different approaches. It also seems that not everything is supported yet if you go the CLI way. So I eventually found it easier to start from the skeleton project. - Benjamin De Clercq

2 Answers

3
votes

No you cannot. At least the way you are approaching it. The Aurelia-CLI uses requireJS and npm as opposed to JSPM and SystemJS. If you would like, simply run au new from the CLI and follow the project setup and choose yes for install dependencies. You should then be able to copy over the skeletons CSS JS and HTML and mimic the file structure in your new cli project. Once you have paths correct for css and everything it should run just fine. You will see that aurelia.json is the new config.json from the skeletons. Do your bundling and referencing there.

Refer to this on how to properly configure libraries for bundling in aurelia.json and how to refrence css with <require> tags in cli projects.

0
votes

It sort of is possible using generators like this:

au new # (Select 2 or 3 with typescript)
npm install @generator/skeleton-navigation -D
au generate skeleton-navigation
au run --watch

I get a lot of gulp errors about duplicate identifiers but the app does run.

Be aware though that this generator will overwrite your source code!

Source: https://github.com/aurelia/cli/issues/477