angualr project environment to build

1 Install node.js 
     https://nodejs.org/en/    be found in the official website to download the latest version 
    After a successful installation   open cmd command input node -v view the version number if the installation was successful
2 Installation yarn
   Yarn provides a rich command allows you to perform many operations Yarn package, including installation, management, publishing, etc.
     https://yarnpkg.com/zh-Hans/    find stable version download at the official website '
     After a successful installation    open cmd command input yarn -v view the version number if the installed version number is displayed successfully installed
       Enter yarn commands directly to view details
     If the installation is not successful to see if there are other environmental impacts tips
     The sample code
  C:\Users\root>yarn -v
1.10.1
C:\Users\root>yarn
yarn install v1.10.1
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
success Saved lockfile.
Done in 0.11s.
3 Install angular   
    3.1 Setting up the development environment
   Directly on the command line, type yarn global add @ angular / cli    
   If you do not install the yarn can enter the $ npm install -g @ agular / cli command directly
    Note Angular    npm install - G @angular / CLI in the yarn package management tools as installed    so should replace npm install installation yarn global add Syntax   
   Display following the successful installation
   yarn global v1.10.1         version number
   [1/4] Resolving packages...
   [2/4] Fetching packages...
   info [email protected]: The platform "win32" is incompatible with this module.
   info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
   [3/4] Linking dependencies...
   [4/4] Building fresh packages...
   success Installed "@angular/[email protected]" with binaries:       提示成功
    Done in 86.28s.
 3.2 Creating a new project
      Enter cmd command    ng new new My - App
      Angular CLI will install the necessary NPM package, create a project file and generate a simple default application in the project. This may take a little time. You can use  to add some new items prepackaged function command. You can use  to add some new items prepackaged function command. ng add ng add
 3.3 start the development server
     Into the project directory, and start the server.

     content_copycd my-app

     Open the serve

  ng serve Command starts the development server, monitor file changes, and re-build this application when modifying these files.

    Use (or ) parameters can automatically open a browser and visit . --open -o http://localhost:4200/

4 configuration dependencies

   1 Installation dependencies

     C: \ Users \ root> cd my-app downloaded into the project   

     C:\Users\root\my-app>cd src

     C: \ Users \ root \ my    -app \ src> yarn in an input command cmd yarn package install dependencies

      yarn install v1.10.1

   2 Start dependencies

   C: \ Users \ root \ my     -app \ src> yarn start  the input command cmd yarn start start dependencies

 

yarn run v1.10.1          

$ A serve

** Angular Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2018-10-15T08:43:58.137Z

Hash: c2ae3b537a5907462efc

Time: 7795ms

chunk {main} main.js, main.js.map (main) 10.7 kB [initial] [rendered]

chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 227 kB [initial] [rendered]

chunk {runtime} runtime.js, runtime.js.map (runtime) 6.22 kB [entry] [rendered]

chunk {styles} styles.js, styles.js.map (styles) 15.6 kB [initial] [rendered]

chunk {vendor} vendor.js, vendor.js.map (vendor) 3.28 MB [initial] [rendered]

i 「wdm」: Compiled successfully.

 

5 git installation

   5.1 install git  

    5.2 Configuring user login account name

            Configuring user login account and password details in gitlab     attention to the need to create a new file

            Copied directly into the user configuration information gitlab

            git config --global user.name "Zhang Xu"

             git config --global user.email "[email protected]"

      After configuration is complete

             Find   crm-front   project may also be other items   to copy files to download in itlab in    $ gitlab comes to file 

               Http://git.inspur.com/bss-crm/crm-front.git   after adding ctrl + c

              Git clone $     http://git.inspur.com/bss-crm/crm-front.git        Note execute   clone clone clone command file is placed in the open position git     

              $ Cd        Use the cd command to view the file is not downloaded     

 

      $ Cd crm-front / cd to files downloaded
    $ Git branch -a view remote branch   
     * master
     remotes / Origin / the HEAD  -> Origin / master           current master remote branch point
     remotes / origin / dev             remote branch dev
     remotes / origin / master     remote branch   master  

             $ Git checkout -b dev origin / dev dev switching current branch to     git checkouta command for handover branch      

     $ Ls reads the configuration file to view the file
     $ Yarn configuration environment to perform yarn strat project can run up
6 command operations (vs code editor operation)
        git pull pull (download) remote data synchronization to command its own directory
      Upload their own operations during a conflict is if your not up to date, needs to put its own backup, and then pull the latest data, and then put their change into the new content appears
      The scratch file after modifications to the local, and then take a pull before uploading it to see if there is no conflict, then fill modify the folder and modify the contents of the message in the input box, and then click the check mark to upload ps: vs code editor operating  
      serve --host localhost --port 4201 ng      ng serve to modify the port --port port number is 4201

Guess you like

Origin www.cnblogs.com/zxbky/p/11223827.html