Git Product home page Git Product logo

tobethelight.github.io's People

Contributors

tobethelight avatar

Stargazers

 avatar

tobethelight.github.io's Issues

docker

docker run --name zk -p 2181:2181 zookeeper

electron

解决下载慢的问题

  • mac
$ open .npmrc
electron_mirror=http://npm.taobao.org/mirrors/electron/
  • windows
    同,也可手动下载并添加至缓存路径(mac理论也可)

git

回滚删除远端提交

git reset --hard commit_id 
git push origin HEAD --force

严格模式的关闭 'use strict'

工作记录

基于 vue-cli webpack 的开发环境关闭严格模式。

问题:

构建后每个模块会被添加"use strict",导致部分调用 callee 库冲突,需关闭此功能。

解决:

发现不止babel中插件有此功能,eslint-loader 中也有此功能,可在 eslint-loader 中添加 strict: "never" 来关闭此功能。

吐槽:

.eslintrc 文件里的配置跟 eslint-loader 中的配置还不一样[捂脸],又让这堆配置坑了一天[捂脸]。

cmd命令

  1. tree目录树
  2. for /r %i in (*.*) do (if "%~xi" neq ".css" del %i) 当前目录下删除非css后缀文件
  3. for /f "delims=" %i in ('dir /s /b /ad ') do rd "%i" 当前目录下删除空文件夹

私有npm搭建

尝试

开始尝试了cnpm,但是不明原因的在windows系统下无法缓存下载包(也可能是我没配好),所以又尝试了Sinopia和Verdaccio,最终使用Verdaccio实现。

步骤

  1. git clone https://github.com/verdaccio/verdaccio.git
  2. cd verdaccio
  3. npm i
  4. npm i pm2 -g
  5. .eslintrc添加"linebreak-style": ["error", "windows"],
  6. npm run build:webui
  7. pm2 start ./bin/verdaccio

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.