This gist is used for example content on the docs - see the Embed Files section.
This file contains hidden or 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
- :sp [filename] - Opens a new file and splits your screen horizontally to show more than one buffer | |
- :vsp [filename] - Opens a new file and splits your screen vertically to show more than one buffer | |
- cntrl + ww - to switch between screens | |
- :bn - Switch to next buffer | |
- :bp - Switch to previous buffer | |
- :bd - Close a buffer | |
- :tabe - to open tabs | |
- :tabn, tabp | |
- :e <path> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>style-perfectionist</title> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.css"> |
This file contains hidden or 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>style-perfectionist</title> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:300,300italic,700,700italic"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.css"> |
This file contains hidden or 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
"use strict"; | |
const path = require("path"); | |
const webpack = require("../"); | |
const { createFsFromVolume, Volume } = require("memfs"); | |
const deterministicChunkIdsPlugin = require("../lib/ids/DeterministicChunkIdsPlugin"); | |
describe("deterministic Plugin tests", () => { | |
jest.setTimeout(20000); | |
it("should run the chunk ids as a determinitic one", () => { |
This file contains hidden or 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
"use strict"; | |
const path = require("path"); | |
const webpack = require("../"); | |
const { createFsFromVolume, Volume } = require("memfs"); | |
const deterministicChunkIdsPlugin = require("../lib/ids/DeterministicChunkIdsPlugin"); | |
describe("deterministic Plugin tests", () => { | |
jest.setTimeout(20000); | |
it("should run the chunk ids as a determinitic one", () => { |
This file contains hidden or 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
"use strict"; | |
const path = require("path"); | |
const webpack = require("../"); | |
const { createFsFromVolume, Volume } = require("memfs"); | |
const deterministicChunkIdsPlugin = require("../lib/ids/DeterministicChunkIdsPlugin"); | |
describe("deterministic Plugin tests", () => { | |
jest.setTimeout(20000); | |
it("should run the chunk ids as a determinitic one", () => { |
This file contains hidden or 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
## |
one realization from working on Netlify's CLI is that the CLI framework we used, oclif, didn't provide a great user experience out of the box.
Emphasis on great: it does a lot of nice things, like offering flag and argument parsing, help documentation, and pluggability. That's good for the CLI developer. But what about the CLI user?
- Idiomatic oclif code often checks for required preconditions, and if it doesn't exist, it prints a warning and then
process.exit(1)
. - Decent code prints a helpful warning telling the user what they got wrong. It is informative.
- Better code offers a prompt, creates a file, or something similar to solve the precondition before proceeding. (possibly recursively). It is intent-based.
- Great code remembers past inputs to prompts and uses that to offer useful defaults. It is adaptive.
NewerOlder