Code Monkey home page Code Monkey logo

blog's People

Watchers

 avatar

blog's Issues

【新 Mac 电脑配置开发环境】 new mac guide for developer

#强制 Finder 程序显示隐藏文件 (或者使用快捷键 cmd+shift+.)
defaults write com.apple.finder AppleShowAllFiles TRUE

#show full path in the title bar
defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; 

#重启 Finder
killall Finder

# iterm2

#icloud config-files 目录下同步 
* v2ray config
* iterm2 configure

# brew
下载 https://raw.githubusercontent.com/Homebrew/install/master/install
使用国内的源替换安装

# 手动下载 homebrew/core
git clone git://mirrors.ustc.edu.cn/homebrew-core.git/ /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core --depth=1

安装完成后还要更换为中科院的镜像(包括homebrew-bottles)

brew doctor

brew install zsh

# make zsh default shell
sudo sh -c "echo $(which zsh) >> /etc/shells" && chsh -s $(which zsh)

#oh my zsh
下载执行 https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh 

# https://github.com/clvv/fasd

# nvm
下载执行 https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.1/install.sh


# install stable node
nvm install stable

#fork 并 git clone 到自己的 home 目录下,如
git clone https://github.com/bammoo/my-dotfiles.git ~/my-dotfiles

#删除 `~/.zshrc`
rm ~/.zshrc

#建立映射
ln ~/my-dotfiles/.zshrc ~/.zshrc


# set npm use taobao registry
npm config set registry https://registry.npm.taobao.org/

# install modules
npm install -g whistle
npm install -g http-server
npm install -g svgo

brew install yarn

gatsby 报 sucrase "only default export is available" 的相关错误

sucrase 这个库的作者 把 mjs 和 js 混在一个目录下。

而 sucrase 在支持 module 的时候会用 mjs 文件:
image

其实 mjs 可以兼容 nodejs 项目,比如
image

gatsby 的 webpack 的 resolve.extensions 看起来是这样的:

[
  '.mjs',  '.js',
  '.jsx',  '.wasm',
  '.json', '.ts',
  '.tsx'
]

但是,我的 gatsby 的 webpack 跑起来报 sucrase "only default export is available" 的相关错误,目前发现应该是 babel/webpack 编译下需要加 .mjs 文件后缀(即使extensions里面有 .mjs)。

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.