├── 010.promisify ├── .eslintignore ├── .husky │ ├── .gitignore │ └── pre-push ├── .gitignore ├── test │ └── .eslintrc.js ├── lib │ └── .eslintrc.js ├── nyc.config.js ├── prettier.config.js ├── .eslintrc.js ├── .docs │ └── debug.js ├── babel.config-module.js └── babel.config-nomodule.js ├── .gitignore ├── 007.configstore ├── .npmrc ├── .gitattributes ├── .gitignore ├── .github │ ├── funding.yml │ └── security.md ├── .docs │ └── debug.js └── .editorconfig ├── 008.update-notifier ├── .npmrc ├── .gitattributes ├── .gitignore ├── .github │ ├── funding.yml │ └── security.md ├── contributing.md ├── screenshot.png ├── .docs │ └── images │ │ └── 1.png ├── .editorconfig └── example.js ├── 001.create-vue ├── .npmrc ├── .vscode │ └── settings.json ├── pnpm-workspace.yaml ├── .husky │ └── pre-commit ├── template │ ├── base │ │ ├── .vscode │ │ │ └── extensions.json │ │ ├── public │ │ │ └── favicon.ico │ │ ├── vite.config.js │ │ ├── package.json │ │ ├── index.html │ │ └── _gitignore │ ├── config │ │ ├── vuex │ │ │ ├── package.json │ │ │ └── src │ │ │ │ └── store │ │ │ │ └── index.js │ │ ├── router │ │ │ └── package.json │ │ ├── jsx │ │ │ ├── package.json │ │ │ └── vite.config.js │ │ ├── cypress │ │ │ ├── cypress │ │ │ │ ├── jsconfig.json │ │ │ │ └── fixtures │ │ │ │ │ └── example.json │ │ │ └── cypress.json │ │ └── typescript │ │ │ ├── env.d.ts │ │ │ └── package.json │ ├── entry │ │ ├── default │ │ │ └── src │ │ │ │ └── main.js │ │ ├── vuex │ │ │ └── src │ │ │ │ └── main.js │ │ ├── router │ │ │ └── src │ │ │ │ └── main.js │ │ └── vuex-and-router │ │ │ └── src │ │ │ └── main.js │ └── code │ │ ├── router │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ ├── icons │ │ │ │ └── IconSupport.vue │ │ │ │ └── __tests__ │ │ │ │ └── HelloWorld.spec.js │ │ └── cypress │ │ │ └── integration │ │ │ └── example.spec.js │ │ ├── typescript-router │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ └── cypress │ │ │ └── integration │ │ │ └── example.spec.ts │ │ ├── default │ │ ├── cypress │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ └── src │ │ │ ├── assets │ │ │ └── logo.svg │ │ │ └── components │ │ │ ├── icons │ │ │ └── IconSupport.vue │ │ │ └── __tests__ │ │ │ └── HelloWorld.spec.js │ │ └── typescript-default │ │ ├── cypress │ │ └── integration │ │ │ └── example.spec.ts │ │ └── src │ │ ├── assets │ │ └── logo.svg │ │ └── components │ │ └── icons │ │ └── IconSupport.vue ├── .docs │ └── images │ │ ├── 1.png │ │ └── 2.png ├── playground │ ├── jsx │ │ ├── src │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── public │ │ │ └── favicon.ico │ │ ├── vite.config.js │ │ ├── index.html │ │ ├── .gitignore │ │ └── package.json │ ├── default │ │ ├── src │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── public │ │ │ └── favicon.ico │ │ ├── vite.config.js │ │ ├── index.html │ │ ├── package.json │ │ └── .gitignore │ ├── jsx-with-tests │ │ ├── src │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ ├── icons │ │ │ │ └── IconSupport.vue │ │ │ │ └── __tests__ │ │ │ │ └── HelloWorld.spec.js │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-jsx │ │ ├── src │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── public │ │ │ └── favicon.ico │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── typescript │ │ ├── src │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── public │ │ │ └── favicon.ico │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── with-tests │ │ ├── src │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ ├── icons │ │ │ │ └── IconSupport.vue │ │ │ │ └── __tests__ │ │ │ │ └── HelloWorld.spec.js │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── vite.config.js │ │ ├── index.html │ │ ├── .gitignore │ │ └── package.json │ ├── router │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── vite.config.js │ │ ├── index.html │ │ ├── .gitignore │ │ └── package.json │ ├── typescript-with-tests │ │ ├── src │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── tsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── jsx-router │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── jsx-vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-jsx-with-tests │ │ ├── src │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── tsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── router-vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── jsx-router-vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── vuex-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ ├── icons │ │ │ │ └── IconSupport.vue │ │ │ │ └── __tests__ │ │ │ │ └── HelloWorld.spec.js │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── router-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-router │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── jsx-vuex-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ ├── icons │ │ │ │ └── IconSupport.vue │ │ │ │ └── __tests__ │ │ │ │ └── HelloWorld.spec.js │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-jsx-vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── jsx-router-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ ├── icons │ │ │ │ └── IconSupport.vue │ │ │ │ └── __tests__ │ │ │ │ └── HelloWorld.spec.js │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── router-vuex-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-jsx-router │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-router-vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.ts │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── jsx-router-vuex-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.js │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.js │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── cypress │ │ │ ├── jsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.js │ │ ├── cypress.json │ │ ├── vite.config.js │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-jsx-router-vuex │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.ts │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-vuex-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── cypress │ │ │ ├── tsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-jsx-vuex-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.ts │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── cypress │ │ │ ├── tsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-router-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── tsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-jsx-router-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── cypress │ │ │ ├── tsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── src │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ ├── typescript-router-vuex-with-tests │ │ ├── public │ │ │ └── favicon.ico │ │ ├── src │ │ │ ├── store │ │ │ │ └── index.ts │ │ │ ├── views │ │ │ │ ├── Home.vue │ │ │ │ └── About.vue │ │ │ ├── main.ts │ │ │ ├── assets │ │ │ │ └── logo.svg │ │ │ └── components │ │ │ │ └── icons │ │ │ │ └── IconSupport.vue │ │ ├── cypress │ │ │ ├── tsconfig.json │ │ │ ├── fixtures │ │ │ │ └── example.json │ │ │ └── integration │ │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore │ └── typescript-jsx-router-vuex-with-tests │ │ ├── public │ │ └── favicon.ico │ │ ├── src │ │ ├── store │ │ │ └── index.ts │ │ ├── views │ │ │ ├── Home.vue │ │ │ └── About.vue │ │ ├── main.ts │ │ ├── assets │ │ │ └── logo.svg │ │ └── components │ │ │ └── icons │ │ │ └── IconSupport.vue │ │ ├── cypress │ │ ├── tsconfig.json │ │ ├── fixtures │ │ │ └── example.json │ │ └── integration │ │ │ └── example.spec.ts │ │ ├── cypress.json │ │ ├── env.d.ts │ │ ├── vite.config.ts │ │ ├── index.html │ │ └── .gitignore ├── .prettierrc ├── .prettierignore ├── README.md └── utils │ └── getCommand.js ├── 009.validate-npm-package-name ├── .gitignore ├── .github │ └── settings.yml ├── .docs │ ├── debug.js │ └── images │ │ └── 1.png └── .travis.yml ├── 012.axios ├── .github │ └── FUNDING.yml ├── test │ ├── manual │ │ └── fixture.json │ └── specs │ │ ├── basicAuth.spec.js │ │ ├── utils │ │ └── trim.spec.js │ │ ├── helpers │ │ ├── bind.spec.js │ │ └── isURLSameOrigin.spec.js │ │ └── cancel │ │ └── isCancel.spec.js ├── index.js ├── axios.png ├── .docs │ └── Note.md ├── .gitignore ├── lib │ ├── helpers │ │ ├── README.md │ │ ├── isAxiosError.js │ │ ├── isAbsoluteURL.js │ │ └── combineURLs.js │ ├── core │ │ └── README.md │ └── cancel │ │ └── isCancel.js ├── examples │ ├── README.md │ ├── upload │ │ └── server.js │ └── post │ │ └── server.js └── .npmignore ├── .vscode └── settings.json ├── 002.vue-dev-server ├── .gitignore ├── .vscode │ └── settings.json ├── test │ ├── main.js │ ├── test.vue │ └── index.html └── bin │ └── vue-dev-server.js ├── 004.co ├── .gitignore ├── .travis.yml ├── component.json ├── test │ ├── context.js │ └── invalid.js ├── .docs │ ├── async-await.js │ └── co.js └── .vscode │ └── launch.json ├── 003.koa-compose ├── .gitignore ├── .doc │ └── images │ │ └── 1.png └── .github │ └── dependabot.yml ├── 006.launch-editor ├── launch-editor │ ├── .gitignore │ ├── lerna.json │ └── packages │ │ └── launch-editor │ │ └── editor-info │ │ ├── linux.js │ │ └── windows.js ├── vite-project │ ├── .gitignore │ ├── .vscode │ │ └── extensions.json │ ├── src │ │ ├── main.js │ │ └── assets │ │ │ └── logo.png │ ├── public │ │ └── favicon.ico │ ├── vite.config.js │ ├── package.json │ ├── index.html │ └── README.md ├── .docs │ └── images │ │ └── 1.png └── vue-cli-project │ ├── babel.config.js │ ├── src │ ├── main.js │ └── assets │ │ └── logo.png │ ├── public │ └── favicon.ico │ ├── .gitignore │ └── README.md ├── .docs └── debug │ ├── images │ ├── 1.png │ ├── 2.png │ └── 3.png │ └── 自动附加.md ├── 011.only-allow └── __fixtures__ │ ├── pnpm │ └── package.json │ ├── yarn │ └── package.json │ └── npm │ └── package.json ├── README.md └── 005.mitt ├── tsconfig.json ├── .gitignore ├── .github └── workflows │ └── compressed-size.yml ├── .editorconfig └── .docs └── api.ts /010.promisify/.eslintignore: -------------------------------------------------------------------------------- 1 | /dist 2 | -------------------------------------------------------------------------------- /010.promisify/.husky/.gitignore: -------------------------------------------------------------------------------- 1 | _ 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | -------------------------------------------------------------------------------- /007.configstore/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /007.configstore/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /008.update-notifier/.npmrc: -------------------------------------------------------------------------------- 1 | package-lock=false 2 | -------------------------------------------------------------------------------- /001.create-vue/.npmrc: -------------------------------------------------------------------------------- 1 | enable-pre-post-scripts=true 2 | -------------------------------------------------------------------------------- /007.configstore/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn.lock 3 | -------------------------------------------------------------------------------- /008.update-notifier/.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto eol=lf 2 | -------------------------------------------------------------------------------- /009.validate-npm-package-name/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /012.axios/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | open_collective: axios 2 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } -------------------------------------------------------------------------------- /002.vue-dev-server/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | -------------------------------------------------------------------------------- /004.co/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | co-browser.js -------------------------------------------------------------------------------- /008.update-notifier/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | yarn.lock 3 | -------------------------------------------------------------------------------- /012.axios/test/manual/fixture.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "axios" 3 | } -------------------------------------------------------------------------------- /003.koa-compose/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | coverage 3 | *.log 4 | -------------------------------------------------------------------------------- /006.launch-editor/launch-editor/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | *.log 3 | -------------------------------------------------------------------------------- /001.create-vue/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } -------------------------------------------------------------------------------- /002.vue-dev-server/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "editor.formatOnSave": true 3 | } 4 | -------------------------------------------------------------------------------- /012.axios/index.js: -------------------------------------------------------------------------------- 1 | // 引用lib目录下的axios.js 2 | module.exports = require('./lib/axios'); -------------------------------------------------------------------------------- /007.configstore/.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: sindresorhus 2 | tidelift: npm/configstore 3 | -------------------------------------------------------------------------------- /001.create-vue/pnpm-workspace.yaml: -------------------------------------------------------------------------------- 1 | packages: 2 | - 'playground/**' 3 | - '!template/**' 4 | -------------------------------------------------------------------------------- /008.update-notifier/.github/funding.yml: -------------------------------------------------------------------------------- 1 | github: sindresorhus 2 | tidelift: npm/update-notifier 3 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | dist 4 | dist-ssr 5 | *.local -------------------------------------------------------------------------------- /009.validate-npm-package-name/.github/settings.yml: -------------------------------------------------------------------------------- 1 | --- 2 | _extends: '.github:npm-cli/settings.yml' 3 | -------------------------------------------------------------------------------- /010.promisify/.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules 2 | /coverage 3 | /.nyc_output 4 | .DS_Store 5 | Thumbs.db 6 | -------------------------------------------------------------------------------- /010.promisify/.husky/pre-push: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | npm run lint 5 | -------------------------------------------------------------------------------- /012.axios/axios.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/012.axios/axios.png -------------------------------------------------------------------------------- /.docs/debug/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/.docs/debug/images/1.png -------------------------------------------------------------------------------- /.docs/debug/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/.docs/debug/images/2.png -------------------------------------------------------------------------------- /.docs/debug/images/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/.docs/debug/images/3.png -------------------------------------------------------------------------------- /001.create-vue/.husky/pre-commit: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | . "$(dirname "$0")/_/husky.sh" 3 | 4 | pnpm exec lint-staged 5 | -------------------------------------------------------------------------------- /001.create-vue/template/base/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["johnsoncodehk.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /010.promisify/test/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | node: true, 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /001.create-vue/template/config/vuex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "vuex": "^4.0.2" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | "recommendations": ["johnsoncodehk.volar"] 3 | } 4 | -------------------------------------------------------------------------------- /012.axios/test/specs/basicAuth.spec.js: -------------------------------------------------------------------------------- 1 | describe('basicAuth', function () { 2 | setupBasicAuthTest(); 3 | }); 4 | -------------------------------------------------------------------------------- /009.validate-npm-package-name/.docs/debug.js: -------------------------------------------------------------------------------- 1 | const validate = require("../index"); 2 | 3 | validate("demo-package"); 4 | -------------------------------------------------------------------------------- /001.create-vue/template/config/router/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "vue-router": "^4.0.11" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /008.update-notifier/contributing.md: -------------------------------------------------------------------------------- 1 | See the [contributing docs](https://github.com/yeoman/yeoman/blob/main/contributing.md) 2 | -------------------------------------------------------------------------------- /001.create-vue/.docs/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/.docs/images/1.png -------------------------------------------------------------------------------- /001.create-vue/.docs/images/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/.docs/images/2.png -------------------------------------------------------------------------------- /003.koa-compose/.doc/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/003.koa-compose/.doc/images/1.png -------------------------------------------------------------------------------- /008.update-notifier/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/008.update-notifier/screenshot.png -------------------------------------------------------------------------------- /010.promisify/lib/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parserOptions: { 3 | sourceType: "module", 4 | }, 5 | }; 6 | -------------------------------------------------------------------------------- /011.only-allow/__fixtures__/pnpm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "preinstall": "node ../../bin.js pnpm" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /011.only-allow/__fixtures__/yarn/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "preinstall": "node ../../bin.js yarn" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tinylib-analysis 2 | 3 | 各种类型的小型库源码分析 [点这里查看](https://www.haiweilian.com/blogs/node/tinylib-analysis/guide.html)。 4 | -------------------------------------------------------------------------------- /001.create-vue/template/config/jsx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "devDependencies": { 3 | "@vitejs/plugin-vue-jsx": "^1.2.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /006.launch-editor/.docs/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/006.launch-editor/.docs/images/1.png -------------------------------------------------------------------------------- /011.only-allow/__fixtures__/npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "preinstall": "node ../../bin.js npm" 4 | } 5 | } 6 | 7 | -------------------------------------------------------------------------------- /006.launch-editor/vue-cli-project/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /008.update-notifier/.docs/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/008.update-notifier/.docs/images/1.png -------------------------------------------------------------------------------- /009.validate-npm-package-name/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "10" 5 | - "8" 6 | - "6" 7 | - "11" 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/playground/default/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /006.launch-editor/vue-cli-project/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/template/base/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/template/base/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/template/entry/default/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "tabWidth": 2, 4 | "singleQuote": true, 5 | "printWidth": 100, 6 | "trailingComma": "none" 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/vuex/public/favicon.ico -------------------------------------------------------------------------------- /002.vue-dev-server/test/main.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import App from "./test.vue"; 3 | 4 | new Vue({ 5 | render: h => h(App) 6 | }).$mount("#app"); 7 | -------------------------------------------------------------------------------- /005.mitt/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "strict": true, 5 | }, 6 | "include": ["src/*.ts", "test/*.ts"] 7 | } 8 | -------------------------------------------------------------------------------- /006.launch-editor/launch-editor/lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "lerna": "2.5.1", 3 | "npmClient": "yarn", 4 | "useWorkspaces": true, 5 | "version": "2.2.1" 6 | } 7 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/006.launch-editor/vite-project/public/favicon.ico -------------------------------------------------------------------------------- /006.launch-editor/vite-project/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/006.launch-editor/vite-project/src/assets/logo.png -------------------------------------------------------------------------------- /009.validate-npm-package-name/.docs/images/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/009.validate-npm-package-name/.docs/images/1.png -------------------------------------------------------------------------------- /001.create-vue/playground/default/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/default/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/router/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/router/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /005.mitt/.gitignore: -------------------------------------------------------------------------------- 1 | /dist 2 | /test-reports 3 | /node_modules 4 | /npm-debug.log 5 | /index.d.ts 6 | package-lock.json 7 | .DS_Store 8 | .idea 9 | .vscode 10 | -------------------------------------------------------------------------------- /006.launch-editor/vue-cli-project/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/006.launch-editor/vue-cli-project/public/favicon.ico -------------------------------------------------------------------------------- /010.promisify/nyc.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | all: true, 3 | clean: true, 4 | reporter: ["lcov"], 5 | exclude: ["coverage", "test"], 6 | }; 7 | -------------------------------------------------------------------------------- /010.promisify/prettier.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | tabWidth: 4, 3 | bracketSpacing: false, 4 | printWidth: 88, 5 | arrowParens: "avoid", 6 | }; 7 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx-router/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx-vuex/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | createApp(App).mount('#app') 5 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/with-tests/public/favicon.ico -------------------------------------------------------------------------------- /006.launch-editor/vue-cli-project/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/006.launch-editor/vue-cli-project/src/assets/logo.png -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/router-vuex/public/favicon.ico -------------------------------------------------------------------------------- /012.axios/.docs/Note.md: -------------------------------------------------------------------------------- 1 | # 012.\[axios\]-最广泛的请求库是怎么设计的 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx-router-vuex/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-vuex/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/router-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-router/public/favicon.ico -------------------------------------------------------------------------------- /010.promisify/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parserOptions: { 4 | ecmaVersion: 2016, 5 | }, 6 | extends: ["standard", "prettier"], 7 | }; 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx-vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx-vuex/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx-router-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/router-vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx-router/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-router-vuex/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /012.axios/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | .idea 3 | .tscache 4 | .DS_Store 5 | node_modules/ 6 | typings/ 7 | coverage/ 8 | test/typescript/axios.js* 9 | sauce_connect.log 10 | package-lock.json 11 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/jsx-router-vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx-router-vuex/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx-vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-router-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/template/config/vuex/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /012.axios/lib/helpers/README.md: -------------------------------------------------------------------------------- 1 | # axios // helpers 2 | 3 | `helpers/` 中的模块是通用模块,*不*特定于 axios 的内部专门情况。这些模块理论上可以发布到 npm 并由其他模块或应用程序使用。 4 | 通用模块的一些示例如下: 5 | 6 | - 浏览器 polyfills 7 | - cookie 管理 8 | - 解析 HTTP 请求头 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx-router-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/.prettierignore: -------------------------------------------------------------------------------- 1 | pnpm-lock.yaml 2 | 3 | # prettier doesn't respect newlines between chained methods 4 | # https://github.com/prettier/prettier/issues/7884 5 | **/*.spec.js 6 | **/*.spec.ts 7 | **/dist 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-router-vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/template/config/cypress/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /007.configstore/.docs/debug.js: -------------------------------------------------------------------------------- 1 | import Configstore from '../index.js' 2 | 3 | const config = new Configstore('configstore-debug', { 4 | name: 'lian' 5 | }); 6 | 7 | config.set('foo', 'bar'); 8 | config.get('foo'); 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haiweilian/tinylib-analysis/HEAD/001.create-vue/playground/typescript-jsx-router-vuex-with-tests/public/favicon.ico -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/template/config/cypress/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /007.configstore/.github/security.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. 4 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /004.co/.travis.yml: -------------------------------------------------------------------------------- 1 | node_js: 2 | - "stable" 3 | - "4" 4 | - "iojs" 5 | - "0.12" 6 | language: node_js 7 | script: "npm run-script test-travis" 8 | after_script: "npm install coveralls@2 && cat ./coverage/lcov.info | coveralls" 9 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()] 7 | }) 8 | -------------------------------------------------------------------------------- /008.update-notifier/.github/security.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | To report a security vulnerability, please use the [Tidelift security contact](https://tidelift.com/security). Tidelift will coordinate the fix and disclosure. 4 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/cypress/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/src/store/index.ts: -------------------------------------------------------------------------------- 1 | import { createStore } from 'vuex' 2 | 3 | export default createStore({ 4 | state: {}, 5 | mutations: {}, 6 | actions: {}, 7 | modules: {} 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/template/code/router/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/template/config/cypress/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/template/entry/vuex/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/cypress/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": ["es5", "dom"], 5 | "types": ["cypress"] 6 | }, 7 | "include": ["./**/*"] 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/template/entry/router/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/cypress.json: -------------------------------------------------------------------------------- 1 | { 2 | "baseUrl": "http://localhost:5050", 3 | "component": { 4 | "componentFolder": "src", 5 | "testFiles": "**/__tests__/*.spec.{js,ts,jsx,tsx}" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-router/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /003.koa-compose/.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: npm 4 | directory: "/" 5 | schedule: 6 | interval: daily 7 | open-pull-requests-limit: 5 8 | versioning-strategy: increase-if-necessary 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-router/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /012.axios/lib/core/README.md: -------------------------------------------------------------------------------- 1 | # axios // core 2 | 3 | `core/` 中的模块是特定于 axios 内部使用的模块。因为它们的逻辑特定于专门情况,所以在 axios 模块之外使用这些模块很可能没有用。core模块的一些例子如下: 4 | 5 | - 调度请求 6 | - 通过 `adapters/` 发送的请求(参见 lib/adapters/README.md) 7 | 8 | - 管理拦截器 9 | 10 | - 处理配置 11 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import store from './store' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(store) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/cypress/fixtures/example.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Using fixtures to represent data", 3 | "email": "hello@cypress.io", 4 | "body": "Fixtures are a great way to mock data for responses to routes" 5 | } 6 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /007.configstore/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [*.yml] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 10 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | const app = createApp(App) 6 | 7 | app.use(router) 8 | 9 | app.mount('#app') 10 | -------------------------------------------------------------------------------- /012.axios/examples/README.md: -------------------------------------------------------------------------------- 1 | # axios 实例 2 | 3 | 执行以下步骤来运行实例: 4 | 5 | 1. `git clone https://github.com/axios/axios.git` 6 | 2. `cd axios` 7 | 3. `npm install` 8 | 4. `grunt build` 9 | 5. `npm run examples` 10 | 6. [http://localhost:3000](http://localhost:3000) -------------------------------------------------------------------------------- /012.axios/lib/cancel/isCancel.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * @description: 判断是否为Cancel类的对象 5 | * @param {Any} value 要判断的值 6 | * @return {Boolean} 7 | */ 8 | module.exports = function isCancel(value) { 9 | return !!(value && value.__CANCEL__); 10 | }; 11 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/template/config/typescript/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/template/config/typescript/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "build": "vue-tsc --noEmit && vite build", 4 | "typecheck": "vue-tsc --noEmit" 5 | }, 6 | "devDependencies": { 7 | "typescript": "~4.3.5", 8 | "vue-tsc": "^0.3.0" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /008.update-notifier/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.yml] 12 | indent_style = space 13 | indent_size = 2 14 | -------------------------------------------------------------------------------- /001.create-vue/README.md: -------------------------------------------------------------------------------- 1 | # create-vue 2 | 3 | [![Open in Visual Studio Code](https://open.vscode.dev/badges/open-in-vscode.svg)](https://open.vscode.dev/vuejs/create-vue) 4 | 5 | An easy way to start a Vue project 6 | 7 | ## Usage 8 | 9 | ```sh 10 | npm init vue@next 11 | ``` 12 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/template/code/default/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-default/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module '*.vue' { 4 | import { DefineComponent } from 'vue' 5 | // eslint-disable-next-line 6 | const component: DefineComponent<{}, {}, any> 7 | export default component 8 | } 9 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /001.create-vue/template/entry/vuex-and-router/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/src/main.js: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /002.vue-dev-server/test/test.vue: -------------------------------------------------------------------------------- 1 | 4 | 5 | 14 | 15 | 20 | -------------------------------------------------------------------------------- /012.axios/.npmignore: -------------------------------------------------------------------------------- 1 | **/.* 2 | *.iml 3 | coverage/ 4 | examples/ 5 | node_modules/ 6 | typings/ 7 | sandbox/ 8 | test/ 9 | bower.json 10 | CODE_OF_CONDUCT.md 11 | COLLABORATOR_GUIDE.md 12 | CONTRIBUTING.md 13 | COOKBOOK.md 14 | ECOSYSTEM.md 15 | Gruntfile.js 16 | karma.conf.js 17 | webpack.*.js 18 | sauce_connect.log 19 | -------------------------------------------------------------------------------- /012.axios/examples/upload/server.js: -------------------------------------------------------------------------------- 1 | module.exports = function (req, res) { 2 | var data = ''; 3 | 4 | req.on('data', function (chunk) { 5 | data += chunk; 6 | }); 7 | 8 | req.on('end', function () { 9 | console.log('File uploaded'); 10 | res.writeHead(200); 11 | res.end(); 12 | }); 13 | }; 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/src/main.ts: -------------------------------------------------------------------------------- 1 | import { createApp } from 'vue' 2 | import App from './App.vue' 3 | 4 | import router from './router' 5 | import store from './store' 6 | 7 | const app = createApp(App) 8 | 9 | app.use(router) 10 | app.use(store) 11 | 12 | app.mount('#app') 13 | -------------------------------------------------------------------------------- /001.create-vue/utils/getCommand.js: -------------------------------------------------------------------------------- 1 | export default function getCommand(packageManager, scriptName) { 2 | if (scriptName === 'install') { 3 | return packageManager === 'yarn' ? 'yarn' : `${packageManager} install` 4 | } 5 | 6 | return packageManager === 'npm' ? `npm run ${scriptName}` : `${packageManager} ${scriptName}` 7 | } 8 | -------------------------------------------------------------------------------- /002.vue-dev-server/test/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Vue Dev Server 6 | 7 | 8 |
9 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /005.mitt/.github/workflows/compressed-size.yml: -------------------------------------------------------------------------------- 1 | name: Compressed Size 2 | 3 | on: [pull_request] 4 | 5 | jobs: 6 | build: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - uses: actions/checkout@v2 10 | - uses: preactjs/compressed-size-action@v2 11 | with: 12 | pattern: "./dist/*.{js,mjs,cjs}" 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/template/base/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/template/code/router/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /004.co/component.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "co", 3 | "version": "4.4.0", 4 | "description": "generator async control flow goodness", 5 | "keywords": [ 6 | "async", 7 | "flow", 8 | "generator", 9 | "coro", 10 | "coroutine" 11 | ], 12 | "repo": "tj/co", 13 | "scripts": ["index.js"], 14 | "licence": "MIT" 15 | } 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/default/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/default/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/template/code/router/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-router/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /004.co/test/context.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require('assert'); 3 | 4 | var co = require('..'); 5 | 6 | var ctx = { 7 | some: 'thing' 8 | }; 9 | 10 | describe('co.call(this)', function () { 11 | it('should pass the context', function () { 12 | return co.call(ctx, function *(){ 13 | assert(ctx == this); 14 | }); 15 | }) 16 | }) 17 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/template/code/default/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /012.axios/test/specs/utils/trim.spec.js: -------------------------------------------------------------------------------- 1 | var trim = require('../../../lib/utils').trim; 2 | 3 | describe('utils::trim', function () { 4 | it('should trim spaces', function () { 5 | expect(trim(' foo ')).toEqual('foo'); 6 | }); 7 | 8 | it('should trim tabs', function () { 9 | expect(trim('\tfoo\t')).toEqual('foo'); 10 | }); 11 | }); 12 | 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-default/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-router/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /010.promisify/.docs/debug.js: -------------------------------------------------------------------------------- 1 | import { promisify } from '../lib/promisify.js' 2 | 3 | function load (src, callback){ 4 | setTimeout(() => { 5 | callback(null, 'name') 6 | }) 7 | } 8 | 9 | const loadPromise = promisify(load) 10 | 11 | loadPromise('src').then(res => { 12 | console.log(res) // name 13 | }).catch(err => { 14 | console.log(err) 15 | }) 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /012.axios/test/specs/helpers/bind.spec.js: -------------------------------------------------------------------------------- 1 | var bind = require('../../../lib/helpers/bind'); 2 | 3 | describe('bind', function () { 4 | it('should bind an object to a function', function () { 5 | var o = { val: 123 }; 6 | var f = bind(function (num) { 7 | return this.val * num; 8 | }, o); 9 | 10 | expect(f(2)).toEqual(246); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/default/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | 4 | // https://vitejs.dev/config/ 5 | export default defineConfig({ 6 | plugins: [vue()], 7 | resolve: { 8 | alias: { 9 | '@/': new URL('./src/', import.meta.url).pathname 10 | } 11 | } 12 | }) 13 | -------------------------------------------------------------------------------- /001.create-vue/template/base/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "dev": "vite", 4 | "build": "vite build", 5 | "preserve": "vite build", 6 | "serve": "vite preview --port 5050" 7 | }, 8 | "dependencies": { 9 | "vue": "^3.2.14" 10 | }, 11 | "devDependencies": { 12 | "@vitejs/plugin-vue": "^1.9.3", 13 | "vite": "^2.6.3" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /001.create-vue/template/code/router/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /012.axios/lib/helpers/isAxiosError.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * 判断error是否为Axios抛出的 5 | * 6 | * @param {*} payload 要检测的error 7 | * @returns {boolean} 如果error为Axios抛出的则返回true,否则返回false 8 | */ 9 | module.exports = function isAxiosError(payload) { 10 | // 通过isAxiosError来判断 11 | return (typeof payload === 'object') && (payload.isAxiosError === true); 12 | }; 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/src/assets/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/template/code/default/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /006.launch-editor/vue-cli-project/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /010.promisify/babel.config-module.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | comments: false, 3 | presets: [ 4 | [ 5 | "@babel/preset-env", 6 | { 7 | modules: false, 8 | targets: { 9 | esmodules: true, 10 | }, 11 | }, 12 | ], 13 | "minify", 14 | ], 15 | }; 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vite-project", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build", 7 | "serve": "vite preview" 8 | }, 9 | "dependencies": { 10 | "vue": "^3.2.16" 11 | }, 12 | "devDependencies": { 13 | "@vitejs/plugin-vue": "^1.9.3", 14 | "vite": "^2.6.4" 15 | } 16 | } -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-default/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-router/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /006.launch-editor/launch-editor/packages/launch-editor/editor-info/linux.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | atom: 'atom', 3 | Brackets: 'brackets', 4 | code: 'code', 5 | emacs: 'emacs', 6 | 'idea.sh': 'idea', 7 | 'phpstorm.sh': 'phpstorm', 8 | 'pycharm.sh': 'pycharm', 9 | 'rubymine.sh': 'rubymine', 10 | sublime_text: 'subl', 11 | vim: 'vim', 12 | 'webstorm.sh': 'webstorm' 13 | } 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /.docs/debug/自动附加.md: -------------------------------------------------------------------------------- 1 | ## 自动附加 2 | 3 | [VS Code 官方调试文档](https://code.visualstudio.com/docs/nodejs/nodejs-debugging) 4 | 5 | 1. 在 `VS Code` 里按下 `cmd + shift + p` 打开命令面板。 6 | 7 | 2. 搜索 `toggle auto attach` 并确认。 8 | 9 | ![1](./images/1.png) 10 | 11 | 3. 选择仅带标志(仅在给定 "--inspect" 标志时自动附加)。 12 | 13 | ![2](./images/2.png) 14 | 15 | 4. 用 `node --inspect xxx.js` 运行文件进入调试模式。 16 | 17 | ![3](./images/3.png) 18 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/src/components/icons/IconSupport.vue: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /001.create-vue/template/config/jsx/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /005.mitt/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | end_of_line = lf 6 | charset = utf-8 7 | trim_trailing_whitespace = true 8 | insert_final_newline = true 9 | 10 | [{package.json,.*rc,*.yml}] 11 | indent_style = space 12 | indent_size = 2 13 | insert_final_newline = false 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | indent_style = space 18 | indent_size = 2 19 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /004.co/.docs/async-await.js: -------------------------------------------------------------------------------- 1 | // 1 2 3 4 2 | (async () => { 3 | console.log(1); 4 | 5 | await new Promise((resolve) => { 6 | setTimeout(() => { 7 | resolve(); 8 | console.log(2); 9 | }); 10 | }); 11 | 12 | await new Promise((resolve) => { 13 | setTimeout(() => { 14 | resolve(); 15 | console.log(3); 16 | }); 17 | }); 18 | 19 | console.log(4); 20 | })(); 21 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /012.axios/examples/post/server.js: -------------------------------------------------------------------------------- 1 | module.exports = function (req, res) { 2 | var data = ''; 3 | 4 | req.on('data', function (chunk) { 5 | data += chunk; 6 | }); 7 | 8 | req.on('end', function () { 9 | console.log('POST data received'); 10 | res.writeHead(200, { 11 | 'Content-Type': 'text/json' 12 | }); 13 | res.write(JSON.stringify(data)); 14 | res.end(); 15 | }); 16 | }; 17 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/vite.config.js: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/template/base/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /012.axios/lib/helpers/isAbsoluteURL.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * 判断给定的地址是否为绝对url 5 | * 6 | * @param {string} url 要检查的url 7 | * @returns {boolean} 如果为绝对url返回true,否则返回false 8 | */ 9 | module.exports = function isAbsoluteURL(url) { 10 | // 如果 URL 以“://”或“//”开头,则该 URL 被视为绝对url。 11 | // RFC 3986 将 scheme 名称定义为以字母开头且后跟字母、数字、加号、句点或连字符的任意组合的字符序列。 12 | return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url); 13 | }; 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/default/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/default/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build", 7 | "preserve": "vite build", 8 | "serve": "vite preview --port 5050" 9 | }, 10 | "dependencies": { 11 | "vue": "^3.2.14" 12 | }, 13 | "devDependencies": { 14 | "@vitejs/plugin-vue": "^1.9.3", 15 | "vite": "^2.6.3" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import vue from '@vitejs/plugin-vue' 3 | import vueJsx from '@vitejs/plugin-vue-jsx' 4 | 5 | // https://vitejs.dev/config/ 6 | export default defineConfig({ 7 | plugins: [vue(), vueJsx()], 8 | resolve: { 9 | alias: { 10 | '@/': new URL('./src/', import.meta.url).pathname 11 | } 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/template/code/router/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /005.mitt/.docs/api.ts: -------------------------------------------------------------------------------- 1 | import mitt from "../src/index"; 2 | 3 | type Events = { 4 | foo: string; 5 | bar?: number; 6 | obj: { 7 | name: string 8 | } 9 | }; 10 | 11 | const emitter = mitt(); 12 | 13 | emitter.on("foo", (e) => {}); 14 | emitter.emit("foo"); 15 | emitter.emit("foo", "1"); 16 | 17 | emitter.on("bar", (e) => {}) 18 | emitter.emit("bar") 19 | emitter.emit("bar", 1) 20 | 21 | emitter.on('*', (e)=>{}) 22 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /002.vue-dev-server/bin/vue-dev-server.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const express = require('express') 4 | const { vueMiddleware } = require('../middleware') 5 | 6 | const app = express() 7 | const root = process.cwd(); 8 | 9 | // 自定义中间件 10 | app.use(vueMiddleware()) 11 | 12 | // 目录作为静态资源 13 | app.use(express.static(root)) 14 | 15 | app.listen(3000, () => { 16 | console.log('server running at http://localhost:3000') 17 | }) 18 | -------------------------------------------------------------------------------- /010.promisify/babel.config-nomodule.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | comments: false, 3 | presets: [ 4 | [ 5 | "@babel/preset-env", 6 | { 7 | modules: "cjs", 8 | targets: { 9 | node: "6", 10 | browsers: ["> 0.25%", "not dead"], 11 | }, 12 | }, 13 | ], 14 | "minify", 15 | ], 16 | }; 17 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /004.co/.docs/co.js: -------------------------------------------------------------------------------- 1 | const co = require("../index"); 2 | 3 | // 1 2 3 4 4 | co(function* () { 5 | console.log(1); 6 | 7 | yield new Promise((resolve) => { 8 | setTimeout(() => { 9 | resolve(); 10 | console.log(2); 11 | }); 12 | }); 13 | 14 | yield new Promise((resolve) => { 15 | setTimeout(() => { 16 | resolve(); 17 | console.log(3); 18 | }); 19 | }); 20 | 21 | console.log(4); 22 | }); 23 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/template/code/typescript-router/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/cypress/integration/example.spec.js: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vuex", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build", 7 | "preserve": "vite build", 8 | "serve": "vite preview --port 5050" 9 | }, 10 | "dependencies": { 11 | "vue": "^3.2.14", 12 | "vuex": "^4.0.2" 13 | }, 14 | "devDependencies": { 15 | "@vitejs/plugin-vue": "^1.9.3", 16 | "vite": "^2.6.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /001.create-vue/template/base/_gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/default/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/router/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/cypress/integration/example.spec.ts: -------------------------------------------------------------------------------- 1 | // https://docs.cypress.io/api/introduction/api.html 2 | 3 | describe('My First Test', () => { 4 | it('visits the app root url', () => { 5 | cy.visit('/') 6 | cy.contains('h1', 'You did it!') 7 | }) 8 | 9 | it('navigates to the about page', () => { 10 | cy.visit('/about') 11 | cy.contains('h1', 'This is an about page') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Vite App 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /006.launch-editor/vite-project/README.md: -------------------------------------------------------------------------------- 1 | # Vue 3 + Vite 2 | 3 | This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` 12 | 13 | 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /012.axios/test/specs/cancel/isCancel.spec.js: -------------------------------------------------------------------------------- 1 | var isCancel = require('../../../lib/cancel/isCancel'); 2 | var Cancel = require('../../../lib/cancel/Cancel'); 3 | 4 | describe('isCancel', function() { 5 | it('returns true if value is a Cancel', function() { 6 | expect(isCancel(new Cancel())).toBe(true); 7 | }); 8 | 9 | it('returns false if value is not a Cancel', function() { 10 | expect(isCancel({ foo: 'bar' })).toBe(false); 11 | }); 12 | }); 13 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jsx", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "dev": "vite", 6 | "build": "vite build", 7 | "preserve": "vite build", 8 | "serve": "vite preview --port 5050" 9 | }, 10 | "dependencies": { 11 | "vue": "^3.2.14" 12 | }, 13 | "devDependencies": { 14 | "@vitejs/plugin-vue": "^1.9.3", 15 | "@vitejs/plugin-vue-jsx": "^1.2.0", 16 | "vite": "^2.6.3" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /008.update-notifier/example.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | const updateNotifier = require('.'); 3 | 4 | // Run: $ node example 5 | 6 | // You have to run this file two times the first time 7 | // This is because it never reports updates on the first run 8 | // If you want to test your own usage, ensure you set an older version 9 | 10 | updateNotifier({ 11 | pkg: { 12 | name: 'public-ip', 13 | version: '0.9.2' 14 | }, 15 | updateCheckInterval: 0 16 | }).notify(); 17 | -------------------------------------------------------------------------------- /012.axios/lib/helpers/combineURLs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * 通过组合host和相对地址来创建新的url 5 | * 6 | * @param {string} baseURL host地址 7 | * @param {string} relativeURL 相对地址 8 | * @returns {string} 组合后的地址 9 | */ 10 | module.exports = function combineURLs(baseURL, relativeURL) { 11 | return relativeURL 12 | // 组合的时候,把host地址的最后的 / 去掉, 把相对地址前面的 / 去掉 13 | ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '') 14 | : baseURL; 15 | }; 16 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/router-vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /004.co/.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // 使用 IntelliSense 了解相关属性。 3 | // 悬停以查看现有属性的描述。 4 | // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "Launch Program", 9 | "program": "${workspaceFolder}/.docs/co.js", 10 | "request": "launch", 11 | "skipFiles": [ 12 | "/**" 13 | ], 14 | "type": "pwa-node" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /006.launch-editor/vue-cli-project/README.md: -------------------------------------------------------------------------------- 1 | # vue3-project 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /006.launch-editor/launch-editor/packages/launch-editor/editor-info/windows.js: -------------------------------------------------------------------------------- 1 | module.exports = [ 2 | 'Brackets.exe', 3 | 'Code.exe', 4 | 'atom.exe', 5 | 'sublime_text.exe', 6 | 'notepad++.exe', 7 | 'clion.exe', 8 | 'clion64.exe', 9 | 'idea.exe', 10 | 'idea64.exe', 11 | 'phpstorm.exe', 12 | 'phpstorm64.exe', 13 | 'pycharm.exe', 14 | 'pycharm64.exe', 15 | 'rubymine.exe', 16 | 'rubymine64.exe', 17 | 'webstorm.exe', 18 | 'webstorm64.exe' 19 | ] 20 | -------------------------------------------------------------------------------- /012.axios/test/specs/helpers/isURLSameOrigin.spec.js: -------------------------------------------------------------------------------- 1 | var isURLSameOrigin = require('../../../lib/helpers/isURLSameOrigin'); 2 | 3 | describe('helpers::isURLSameOrigin', function () { 4 | it('should detect same origin', function () { 5 | expect(isURLSameOrigin(window.location.href)).toEqual(true); 6 | }); 7 | 8 | it('should detect different origin', function () { 9 | expect(isURLSameOrigin('https://github.com/axios/axios')).toEqual(false); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-router-vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /004.co/test/invalid.js: -------------------------------------------------------------------------------- 1 | 2 | var assert = require('assert'); 3 | 4 | var co = require('..'); 5 | 6 | describe('yield ', function () { 7 | it('should throw an error', function () { 8 | return co(function* () { 9 | try { 10 | yield null; 11 | throw new Error('lol'); 12 | } catch (err) { 13 | assert(err instanceof TypeError); 14 | assert(~err.message.indexOf('You may only yield')); 15 | } 16 | }) 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /001.create-vue/playground/typescript-jsx-router-vuex-with-tests/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | .DS_Store 12 | dist 13 | dist-ssr 14 | *.local 15 | 16 | /cypress/videos/ 17 | /cypress/screenshots/ 18 | 19 | # Editor directories and files 20 | .vscode 21 | !.vscode/extensions.json 22 | .idea 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw? 28 | -------------------------------------------------------------------------------- /001.create-vue/playground/with-tests/src/components/__tests__/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@cypress/vue' 2 | import HelloWorld from '../HelloWorld.vue' 3 | 4 | describe('HelloWorld', () => { 5 | it('playground', () => { 6 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 7 | }) 8 | 9 | it('renders properly', () => { 10 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 11 | cy.get('h1').should('contain', 'Hello Cypress') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/template/code/default/src/components/__tests__/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@cypress/vue' 2 | import HelloWorld from '../HelloWorld.vue' 3 | 4 | describe('HelloWorld', () => { 5 | it('playground', () => { 6 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 7 | }) 8 | 9 | it('renders properly', () => { 10 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 11 | cy.get('h1').should('contain', 'Hello Cypress') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/template/code/router/src/components/__tests__/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@cypress/vue' 2 | import HelloWorld from '../HelloWorld.vue' 3 | 4 | describe('HelloWorld', () => { 5 | it('playground', () => { 6 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 7 | }) 8 | 9 | it('renders properly', () => { 10 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 11 | cy.get('h1').should('contain', 'Hello Cypress') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-with-tests/src/components/__tests__/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@cypress/vue' 2 | import HelloWorld from '../HelloWorld.vue' 3 | 4 | describe('HelloWorld', () => { 5 | it('playground', () => { 6 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 7 | }) 8 | 9 | it('renders properly', () => { 10 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 11 | cy.get('h1').should('contain', 'Hello Cypress') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/vuex-with-tests/src/components/__tests__/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@cypress/vue' 2 | import HelloWorld from '../HelloWorld.vue' 3 | 4 | describe('HelloWorld', () => { 5 | it('playground', () => { 6 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 7 | }) 8 | 9 | it('renders properly', () => { 10 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 11 | cy.get('h1').should('contain', 'Hello Cypress') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-router-with-tests/src/components/__tests__/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@cypress/vue' 2 | import HelloWorld from '../HelloWorld.vue' 3 | 4 | describe('HelloWorld', () => { 5 | it('playground', () => { 6 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 7 | }) 8 | 9 | it('renders properly', () => { 10 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 11 | cy.get('h1').should('contain', 'Hello Cypress') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /001.create-vue/playground/jsx-vuex-with-tests/src/components/__tests__/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import { mount } from '@cypress/vue' 2 | import HelloWorld from '../HelloWorld.vue' 3 | 4 | describe('HelloWorld', () => { 5 | it('playground', () => { 6 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 7 | }) 8 | 9 | it('renders properly', () => { 10 | mount(HelloWorld, { props: { msg: 'Hello Cypress' } }) 11 | cy.get('h1').should('contain', 'Hello Cypress') 12 | }) 13 | }) 14 | --------------------------------------------------------------------------------