Giter VIP home page Giter VIP logo

socket's Introduction

前端本地开发指南

安装

下载项目

$ cd  /项目文件夹
$ git clone https://github.com/dotequiet/socket.git .

安装依赖

$ npm install
# or
$ yarn

启动服务

启动本地服务 默认地址:http://localhost:xxxx

$ npm run build:dll
$ npm run dev

前端配置说明

服务代理

proxy配置 ./build/webpack.dev.js 注意:修改配置需要重新编译 npm run dev

devServer: {
        proxy: [{
            target: '',
            secure: false,
            changeOrigin: true,
        }]
    }

svg 文件编译

新引入的svg文件需要编辑后才可正常使用

$ npm run svg

上线步骤

编译打包

$ npm run build

其他说明

自定义脚本 ./package.json

"scripts": {
    // node断点开发
    "startnodeinspect": "nodemon --inspect --inspect-brk server/start.js",
    // node开发
    "startnode": "nodemon server/start.js",
    "dev": "webpack-dev-server --config ./build/webpack.dev.js",
    "start": "webpack-dev-server --inline --config ./build/webpack.dev.js --progress --colors",
    "build:dev": "webpack --config ./build/webpack.dev.js",
    // node编译
    "build:node": "babel server --out-dir dist --source-maps --presets=@babel/env",
    "build": "webpack --config ./build/webpack.prod.js",
    // 编译 svg 图标
    "svg": "vsvg -s ./svg -t ./src/icons",
    // 打包通用库
    "build:dll": "webpack --config ./build/webpack.dll.js"
  }

socket's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.