Build aurelia project

I am not able to build proper js file, can anyone help me from scretch to setup for build.

1 Like

How does your build look like at the moment? Can you share how you want to do your build? Did you use aurelia CLI?

Hi @bigopon,
I have tried both navigation-skeleton and aurelia-CLI , but I am confused which approach I should follow,
This one is skeleton-folder

This one is aurelia-CLI

1 Like

I’m not sure why you have jspm_packages in both of your projects, but it doesn’t look right to me. I see that you also tried out webpack, so if things aren’t working well for you with some gulp task, I can suggest you something like this: https://github.com/questmetrics/aurelia-webpack-bare

If you have trouble following the readme, you can post your question there or here anytime, I’ll try to follow up and answer them. About that, what steps you can do:

git clone https://github.com/questmetrics/aurelia-webpack-bare phenom-access-manager
cd phenom-access-manager
npm install
npm install webpack-dev-server --save-dev

After finishing the installation, you can do either

npm run dev

for local development, or if you just want to build to dist folder, with either:

  • development build
npm run build
  • production build
npm run build:prod

I think it has only a small number of steps that you can test/verify it yourself if you want a simple build instruction. Can you try that?

@bigopon I did these steps, its working, but in this folder I don’t have aurelia_project folder, my application will work without aurelia_json?

It’s a way to support common tasks generated by Aurelia CLI. Normally using it is fine. But if you are having issues with it and cannot figure out why, doing it with only webpack is better and easier. Making progress is more important anyway.

Thank you for this @bigopon, can I use app.js file to run aurelia in django? If not I am not able to find solution, can you help

With this approach how can i include this application in django project, because this is the only requirement for me, I am struggling from past few days.

Thanks

Wherever your current folder that contain index.html that your django app is using, you can build the application to that folder. So you can change output config in webpack.config.js:

output: {
  path: path.resolve(__dirname, 'relative/path/to/folder_of_index.html'),
  filename: isProduction ? '[name].[hash].js' : '[name].js'
}