Build production on SystemJS with systemjs-builder
Asked Answered
A

0

0

I have my project that use SystemJS (i use a template that comes on this way).

I need to build the final project to production env. I read that i can use systemjs-builder for this. I read the official page: https://github.com/systemjs/builder.

Sorry, i'm so new on Angular 2! I don't understand how to start. For example, this part:

Basic Use

Ensure that the transpiler is installed separately (npm install babel-core here).

var path = require("path");
var Builder = require('systemjs-builder');

// optional constructor options
// sets the baseURL and loads the configuration file
var builder = new Builder('path/to/baseURL', 'path/to/system/config-file.js');

builder
.bundle('local/module.js', 'outfile.js')
.then(function() {
  console.log('Build complete');
})
.catch(function(err) {
  console.log('Build error');
  console.log(err);
});

What i should to do here? I must to install this package called babel? And after this? I need to create a file with that code? Where? what name must have this file? How i can execute?

Thanks for your help. Please, be patient with a new angular developer!

Aguste answered 11/4, 2017 at 0:43 Comment(2)
Have a look at this #35868160. It was written for an older Angular2-RC but should be relevant for you as well.Rachael
Thanks for your comment my friend @Rachael but i'm afraid that i'm on the same place after read this...Alpinist

© 2022 - 2024 — McMap. All rights reserved.