회사 자체 의 구성 요소 플랫폼 을 구축 하 다.

구성 요소 플랫폼 공유
구성 요소 업로드 플랫폼 sinopia
sinopia 는 코드 가 필요 없습니다. 설정 할 것 만 설정 하면 됩 니 다.
1. 서버 설치 노드
2. 소프트 체인 설정
ln  -s /../node-v6.10.3-linux-x64/bin/node      /usr/local/bin/node            
ln -s /../node-v6.10.3-linux-x64/bin/npm      /usr/local/bin/npm

3. npm 설치 sinopia
/root/.config/sinopia/config.yaml     
storage: /home/{user}/.local/share/sinopia/storage #     ,        

web: #    web ,        


auth:
  htpasswd:
    file: ./htpasswd #     (npm adduser)     ,      ,       
    # Maximum amount of users allowed to register, defaults to "+inf".
    # You can set this to -1 to disable registration.
    #max_users: 1000 #    -1  npm adduser


uplinks: #           ,  packages  proxy     
  npmjs:
    url: https://registry.npm.taobao.org/ #        
    # amount of time to wait for repository to respond
    # before giving up and use the local cached copy
    #timeout: 30s #           

    # maximum time in which data is considered up to date
    #
    # default is 2 minutes, so server won't request the same data from
    # uplink if a similar request was made less than 2 minutes ago
    #maxage: 2m #      

    # if two subsequent requests fail, no further requests will be sent to
    # this uplink for five minutes
    #max_fails: 2 #            
    #fail_timeout: 5m #         

packages: #       ,$all    ,$authenticated      
                  #          ,        
  '@*/*': #  package.json  name      
    # scoped packages
    access: $all
    publish: $authenticated

  '*':
    # allow all users (including non-authenticated users) to read and
    # publish all packages
    #
    # you can specify usernames/groupnames (depending on your auth plugin)
    # and three keywords: "$all", "$anonymous", "$authenticated"
    access: $all

    # allow all known users to publish packages
    # (anyone can register by default, remember?)
    publish: $authenticated

    # if package is not available locally, proxy requests to 'npmjs' registry
    proxy: npmjs

# log settings
logs:
  - {type: stdout, format: pretty, level: http}
  #- {type: file, path: sinopia.log, level: info}

listen: 0.0.0.0:4873 #       ,0.0.0.0      

/ root /. config / sinopia / htpasswd 사용자
storage: / usr / local / sinopia / storage 서버 패키지 의 저장 주소
4. npm 설치 pm2 pm2 위탁 관리 sinopia 프로 세 스, 프로 세 스 장기 오픈 유지
5. 로 컬 nrm 관리 npm 소스
6. 구성 요소 개발
1.    (    sf)
2.npm init    package.json (             )
3.      
  /Users/zhaozhanhai/Desktop/test/component/sfloadmore
4.  npm  
npm login  
Username: sffe  
Password: sffe    
Email: [email protected]


5.npm publish   
 
6.     
npm unpublish  --force
 
7.    
  package.json version
npm publish

2. 구성 요소 미리 보기 플랫폼 1. vuepress 사용

├─ docs
│    |   .vuepress
│        ├─ README.md       
│        └─ .vuepress
│        └─ config.js     (   ,   )
│        └─ enhanceApp.js Vue   ,      ,           
│        └─override.styl       
│        └─components      
│        └─public     
│   |    baseComponents
│   	  ├─ base
│               ├─ test1.md          
│        ├─ README.md         
└─ package.json
  
         components       -  
  vue md   

3. niginx 배치 페이지
1  homebrew
sudo ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  nginx
  :brew install nginx

    
/usr/local/webserver/nginx/sbin      nginx   sudo ./nginx
  :sudo nginx
  :sudo nginx -s quit
      ln -s /usr/local/nginx/sbin/nginx /usr/local/bin/nginx 
  nginx:
  nginx    /usr/local/nginx/conf/nginx.conf
       /usr/local/nginx/logs/error.log
       /usr/local/nginx/conf/nginx.conf

       

user  root; //403     
worker_processes  8;
server {
        listen       80;
        server_name  localhost;
        root /home/sftcwl/www;
        charset  utf-8;

        #access_log  logs/host.access.log  main;

        location / {
            root /home/sftcwl/www/dataCom;
 	    index index.html;
        }
        location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|js|pdf|txt|svg){
              root /home/sftcwl/www;
          }
        location ~* /dataCom/ {
                root /home/sftcwl/www/;
            }

 :
1.mac 1024         sudo nginx  root  
2.nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)      nginx   nginx.pid   nginx -c /usr/local/etc/nginx/nginx.conf   

좋은 웹페이지 즐겨찾기