Front end Engineering Notes


1、 Talk about your preliminary understanding of engineering, combined with the problems you have encountered before, and say the value that more than three engineering can solve problems or bring.

All means aimed at improving efficiency, reducing cost and ensuring quality belong to "Engineering".

The main problems to be solved are as follows:

  • Disadvantages of traditional language or grammar

For example, if you want to use the new features of ES6 +, but there are problems with compatibility; if you want to use less / sass / postcss to enhance the programmability of CSS, but the running environment can’t directly support it

  • Cannot use modularization / componentization

We want to use modularization to improve the maintainability of the project, but the running environment can not directly support it

  • Repetitive mechanical work

Before the deployment goes online, you need to manually compress the code and resource files. During the deployment process, you need to manually upload the code to the server

  • Unified code style and quality assurance

Multi person collaborative development can not rigidly unify everyone’s code style, and the quality of code pulled from the warehouse can not be guaranteed

  • Rely on back end service interface support

Some functions need to wait for the back-end service interface to complete in advance

  • Overall dependence on back end projects

2、 What do you think scaffolding can do more than create a project structure for us?

Starting from the following stages:
Front end Engineering Notes

Create project

  • Create project structure
  • Create a specific type of file


  • formatting code
  • Check code style
  • Compile / build / package;

Preview / test

  • Web Server/Mock
  • Live Reloading/HMR
  • SourceMap


  • Git Hooks
  • Link-staged
  • Continuous integration


  • CI/CD
  • Automatic publishing

3、 Summarize the process of scaffold implementation, and use nodejs to complete a custom small scaffold tool

Working process:

Ask users questions interactively through command line, generate files according to the results of users’ answers, and generate project files dynamically

Nodejs custom small scaffold
The basic usage is as follows:

mkdir myself-cli
cd myself-cli
yarn init

Front end Engineering Notes
In the generated package.json Add the “bin” field to the file to specify the “entry file” cli.js “,
Add“ cli.js “File, node cli application entry file must have such a header

#!/usr/bin/env node 

After completion of document content

Horn link // publish to global
Myself cli // execute

Continuously updated