V
V
Vetal Matitskiy2017-09-27 13:36:41
JavaScript
Vetal Matitskiy, 2017-09-27 13:36:41

Angular 4, is it possible to set up a build on the server?

good afternoon, I understand the Angular 4 framework, I write small components. very frustrating the length of the build process. Is it possible to use some cloud resources to build an Angular project, so that you can write code from a local laptop, and all these megatons of modules are assembled remotely? what are the options for this

Answer the question

In order to leave comments, you need to log in

2 answer(s)
K
Konstantin, 2019-06-16
@just_konstantin

var header = document.querySelector('.sticky');
var timeout = null

window.onscroll = function showHeader () {
  if (window.pageYOffset > 138) {
    header.classList.remove('goback');
    header.classList.add('sticky-header');
  } else {
    header.classList.add('goback');
    timeout = setTimeout(function () {
  		header.classList.remove('sticky-header');
    }, 250)
  }
}

if (window.pageYOffset > 138) {
  clearTimeout(timeout)
  header.classList.add('sticky-header');
}

U
Urukhayy, 2017-09-27
@Urukhayy

Try building with waiting for file changes:
Or
After the base build, the process hangs open and waits for changes in the project files. If it detects the slightest changes, it will immediately, automatically, build only the changes made, which is much faster than building the entire project over again with ng build every time . But there are situations when a build with a wait ( -w ) takes a long time to build. This applies to edits that affect the connection/disconnection/modification of modules.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question