grep "'react'" -rn src/**/*.js | grep -o ".*\." | xargs -I {} git mv {}js {}tsx
find src -name "*.js" | grep -o ".*\." | xargs -I {} git mv {}js {}ts
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
You want a script that does a local compile to e.g. an out/
directory. Let's call this compile.sh
for our purposes, but for your project it might be npm build
or gulp make-docs
or anything similar.
The out/
directory should contain everything you want deployed to gh-pages
. That almost always includes an index.html
.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby is our language as asciidoctor is a ruby gem. | |
lang: ruby | |
before_install: | |
- sudo apt-get install pandoc | |
- gem install asciidoctor | |
script: | |
- make | |
after_success: | |
- .travis/push.sh | |
env: |
Description | macOS, iTerm2 | vim |
---|---|---|
Begin of line | Command-A | ^ |
End of line | Command-E | $ |
Delete | Command-H | x |
Up Arrow | Command-P | k |
Down Arrow | Command-N | j |
Right Arrow | Command-F | h |
Left Arrow | Command-N | l |
protocol LoadProtocol {
func beginLoad()
func endLoad()
}
extension LoadProtocol {
func load<T>(_ action: T, _ perform: (T, @escaping () -> Void) -> Void) {
beginLoad()
perform(action, endLoad)
NewerOlder