├── .editorconfig ├── .github ├── CONTRIBUTING.md └── ISSUE_TEMPLATE │ ├── ask_question.md │ ├── bug_report.md │ ├── feature_request.md │ └── make_suggestion.md ├── .gitignore ├── .npmrc ├── LICENSE ├── README.md ├── interviews ├── 20200515.md ├── 20200517.md ├── 20200518.md ├── 20200519.md ├── 20200520.md ├── 20200615.md ├── 20200616.md ├── 20200617.md ├── 20200618.md ├── 20200619.md ├── 20200622.md ├── 20200628.md ├── 20200715面试题.md └── README.md ├── live ├── 20200522 │ ├── README.md │ ├── code │ │ ├── 01-promise.js │ │ ├── 02-this.js │ │ ├── 03-es2018.js │ │ ├── 04-es2019.js │ │ ├── 05-es2020.js │ │ └── reactive.js │ └── package.json ├── 20200603 │ ├── README.pdf │ └── code │ │ ├── 01-functor.js │ │ ├── 02-folktale.js │ │ ├── 03-mybind.js │ │ ├── 04-chain.js │ │ ├── 05-chain.js │ │ ├── 06-chain.js │ │ ├── 07-scopes.html │ │ ├── 08-闭包.html │ │ ├── index.html │ │ ├── package.json │ │ └── scripts │ │ └── jsonp.js ├── 20200616 │ ├── .npmrc │ ├── Node.js 介绍.pdf │ ├── README.md │ └── media │ │ ├── image-20200616151612999.png │ │ ├── image-20200616153602938.png │ │ ├── image-20200616153851719.png │ │ ├── image-20200616153934374.png │ │ ├── image-20200616153952489.png │ │ ├── image-20200616170158609.png │ │ └── resize,m_lfit,w_600,h_800,limit_1.png ├── 20200623 │ ├── README.md │ └── md2png │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .m2irc │ │ ├── .md2pngrc │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── bin │ │ └── md2png.js │ │ ├── lib │ │ └── index.js │ │ ├── package.json │ │ └── test │ │ └── md2png.test.js ├── 20200707 │ ├── README.md │ ├── mpa-sample │ │ ├── dist │ │ │ ├── iphone-12 │ │ │ │ ├── bundle.5a78b2.js │ │ │ │ └── index.html │ │ │ └── iphone-xs │ │ │ │ ├── bundle.a3237b.js │ │ │ │ ├── bundle.feb73c.js │ │ │ │ └── index.html │ │ ├── package.json │ │ ├── src │ │ │ ├── common │ │ │ │ ├── normalize.css │ │ │ │ ├── request.js │ │ │ │ └── utils.js │ │ │ ├── iphone-12 │ │ │ │ ├── index.html │ │ │ │ ├── index.js │ │ │ │ └── style.css │ │ │ └── iphone-xs │ │ │ │ ├── index.html │ │ │ │ ├── index.js │ │ │ │ └── style.css │ │ └── webpack.conf.js │ ├── vue-app-base │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── dist │ │ │ ├── img │ │ │ │ └── logo.26bd86.png │ │ │ ├── index.html │ │ │ └── js │ │ │ │ ├── bundle.3797fc.js │ │ │ │ └── bundle.c2ff23.js │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ ├── src │ │ │ ├── App.vue │ │ │ ├── assets │ │ │ │ └── logo.png │ │ │ ├── components │ │ │ │ └── HelloWorld.vue │ │ │ ├── main.js │ │ │ └── style.less │ │ ├── webpack.common.js │ │ ├── webpack.dev.js │ │ └── webpack.prod.js │ └── vue-app-base1 │ │ ├── .env │ │ ├── .env.production │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── dist │ │ ├── bundle.js │ │ ├── index.html │ │ └── logo.26bd86.png │ │ ├── package.json │ │ ├── public │ │ ├── favicon.ico │ │ └── index.html │ │ ├── src │ │ ├── App.vue │ │ ├── assets │ │ │ └── logo.png │ │ ├── components │ │ │ └── HelloWorld.vue │ │ ├── main.js │ │ └── style.less │ │ ├── webpack.common.js │ │ ├── webpack.dev.js │ │ └── webpack.prod.js ├── 20200717 │ ├── code │ │ ├── snabbdom-demo │ │ │ ├── .gitignore │ │ │ ├── index.html │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ └── app.js │ │ │ └── styles │ │ │ │ └── main.css │ │ └── vue-router-hash-demo │ │ │ ├── .browserslistrc │ │ │ ├── .editorconfig │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── babel.config.js │ │ │ ├── package.json │ │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ │ └── src │ │ │ ├── App.vue │ │ │ ├── MyRouter │ │ │ └── index.js │ │ │ ├── assets │ │ │ └── logo.png │ │ │ ├── components │ │ │ └── HelloWorld.vue │ │ │ ├── main.js │ │ │ ├── router │ │ │ └── index.js │ │ │ └── views │ │ │ ├── About.vue │ │ │ ├── Home.vue │ │ │ └── Video.vue │ ├── snabbdom │ │ ├── .editorconfig │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .node-version │ │ ├── .nvmrc │ │ ├── .travis.yml │ │ ├── .vscode │ │ │ └── settings.json │ │ ├── LICENSE │ │ ├── README.md │ │ ├── browserstack-karma.js │ │ ├── dist │ │ │ ├── h.js │ │ │ ├── h.min.js │ │ │ ├── h.min.js.map │ │ │ ├── snabbdom-attributes.js │ │ │ ├── snabbdom-attributes.min.js │ │ │ ├── snabbdom-attributes.min.js.map │ │ │ ├── snabbdom-class.js │ │ │ ├── snabbdom-class.min.js │ │ │ ├── snabbdom-class.min.js.map │ │ │ ├── snabbdom-dataset.js │ │ │ ├── snabbdom-dataset.min.js │ │ │ ├── snabbdom-dataset.min.js.map │ │ │ ├── snabbdom-eventlisteners.js │ │ │ ├── snabbdom-eventlisteners.min.js │ │ │ ├── snabbdom-eventlisteners.min.js.map │ │ │ ├── snabbdom-patch.js │ │ │ ├── snabbdom-patch.min.js │ │ │ ├── snabbdom-patch.min.js.map │ │ │ ├── snabbdom-props.js │ │ │ ├── snabbdom-props.min.js │ │ │ ├── snabbdom-props.min.js.map │ │ │ ├── snabbdom-style.js │ │ │ ├── snabbdom-style.min.js │ │ │ ├── snabbdom-style.min.js.map │ │ │ ├── snabbdom.js │ │ │ ├── snabbdom.min.js │ │ │ ├── snabbdom.min.js.map │ │ │ ├── tovnode.js │ │ │ ├── tovnode.min.js │ │ │ └── tovnode.min.js.map │ │ ├── examples │ │ │ ├── carousel-svg │ │ │ │ ├── README.md │ │ │ │ ├── build.js │ │ │ │ ├── index.html │ │ │ │ └── script.js │ │ │ ├── hero │ │ │ │ ├── build.js │ │ │ │ ├── index.html │ │ │ │ └── script.js │ │ │ ├── reorder-animation │ │ │ │ ├── build.js │ │ │ │ ├── index.html │ │ │ │ └── script.js │ │ │ └── svg │ │ │ │ ├── build.js │ │ │ │ ├── index.html │ │ │ │ └── script.js │ │ ├── gulpfile.js │ │ ├── karma.conf.js │ │ ├── logo.png │ │ ├── nodenv │ │ ├── package.json │ │ ├── perf │ │ │ ├── benchmarks.js │ │ │ └── index.html │ │ ├── src │ │ │ ├── h.ts │ │ │ ├── helpers │ │ │ │ └── attachto.ts │ │ │ ├── hooks.ts │ │ │ ├── htmldomapi.ts │ │ │ ├── is.ts │ │ │ ├── jsx-global.d.ts │ │ │ ├── jsx.ts │ │ │ ├── modules │ │ │ │ ├── attributes.ts │ │ │ │ ├── class.ts │ │ │ │ ├── dataset.ts │ │ │ │ ├── eventlisteners.ts │ │ │ │ ├── hero.ts │ │ │ │ ├── module.ts │ │ │ │ ├── props.ts │ │ │ │ └── style.ts │ │ │ ├── snabbdom.bundle.ts │ │ │ ├── snabbdom.ts │ │ │ ├── thunk.ts │ │ │ ├── tovnode.ts │ │ │ └── vnode.ts │ │ ├── test │ │ │ ├── attachto.js │ │ │ ├── attributes.js │ │ │ ├── core.js │ │ │ ├── dataset.js │ │ │ ├── eventlisteners.js │ │ │ ├── htmldomapi.js │ │ │ ├── jsx.tsx │ │ │ ├── style.js │ │ │ └── thunk.js │ │ └── tsconfig.json │ └── vue │ │ ├── .babelrc.js │ │ ├── .circleci │ │ └── config.yml │ │ ├── .editorconfig │ │ ├── .eslintignore │ │ ├── .eslintrc.js │ │ ├── .flowconfig │ │ ├── .gitignore │ │ ├── BACKERS.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── benchmarks │ │ ├── big-table │ │ │ ├── demo.css │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── dbmon │ │ │ ├── ENV.js │ │ │ ├── app.js │ │ │ ├── index.html │ │ │ └── lib │ │ │ │ ├── memory-stats.js │ │ │ │ ├── monitor.js │ │ │ │ └── styles.css │ │ ├── reorder-list │ │ │ └── index.html │ │ ├── ssr │ │ │ ├── README.md │ │ │ ├── common.js │ │ │ ├── renderToStream.js │ │ │ └── renderToString.js │ │ ├── svg │ │ │ └── index.html │ │ └── uptime │ │ │ └── index.html │ │ ├── examples │ │ ├── 01-Runtime+Compiler │ │ │ └── index.html │ │ ├── 02-debug │ │ │ └── index.html │ │ ├── 03-initVue │ │ │ └── index.html │ │ ├── 04-observe │ │ │ └── index.html │ │ ├── 05-observe-arr │ │ │ └── index.html │ │ ├── 06-set │ │ │ └── index.html │ │ ├── 07-watch │ │ │ └── index.html │ │ ├── 08-watch │ │ │ └── index.html │ │ ├── 09-nextTick │ │ │ └── index.html │ │ ├── 10-virtualdom │ │ │ └── index.html │ │ ├── 11-key │ │ │ └── index.html │ │ ├── 12-compile │ │ │ └── index.html │ │ ├── 13-ast │ │ │ └── index.html │ │ ├── 14-component │ │ │ └── index.html │ │ ├── 15-test │ │ │ └── index.html │ │ ├── 18-test │ │ │ └── index.html │ │ ├── commits │ │ │ ├── app.js │ │ │ ├── index.html │ │ │ └── mock.js │ │ ├── elastic-header │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── firebase │ │ │ ├── app.js │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── grid │ │ │ ├── grid.js │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── markdown │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── modal │ │ │ ├── index.html │ │ │ └── style.css │ │ ├── move-animations │ │ │ └── index.html │ │ ├── select2 │ │ │ └── index.html │ │ ├── svg │ │ │ ├── index.html │ │ │ ├── style.css │ │ │ └── svg.js │ │ ├── todomvc │ │ │ ├── app.js │ │ │ ├── index.html │ │ │ └── readme.md │ │ └── tree │ │ │ ├── index.html │ │ │ └── tree.js │ │ ├── flow │ │ ├── compiler.js │ │ ├── component.js │ │ ├── global-api.js │ │ ├── modules.js │ │ ├── options.js │ │ ├── ssr.js │ │ ├── vnode.js │ │ └── weex.js │ │ ├── package.json │ │ ├── packages │ │ ├── vue-server-renderer │ │ │ ├── README.md │ │ │ ├── build.dev.js │ │ │ ├── build.prod.js │ │ │ ├── client-plugin.d.ts │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ ├── server-plugin.d.ts │ │ │ └── types │ │ │ │ ├── index.d.ts │ │ │ │ ├── plugin.d.ts │ │ │ │ └── tsconfig.json │ │ ├── vue-template-compiler │ │ │ ├── README.md │ │ │ ├── browser.js │ │ │ ├── index.js │ │ │ ├── package.json │ │ │ └── types │ │ │ │ ├── index.d.ts │ │ │ │ ├── test.ts │ │ │ │ └── tsconfig.json │ │ ├── weex-template-compiler │ │ │ ├── README.md │ │ │ ├── build.js │ │ │ ├── index.js │ │ │ └── package.json │ │ └── weex-vue-framework │ │ │ ├── README.md │ │ │ ├── factory.js │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── scripts │ │ ├── alias.js │ │ ├── build.js │ │ ├── config.js │ │ ├── feature-flags.js │ │ ├── gen-release-note.js │ │ ├── get-weex-version.js │ │ ├── git-hooks │ │ │ ├── commit-msg │ │ │ └── pre-commit │ │ ├── release-weex.sh │ │ ├── release.sh │ │ └── verify-commit-msg.js │ │ ├── src │ │ ├── compiler │ │ │ ├── codeframe.js │ │ │ ├── codegen │ │ │ │ ├── events.js │ │ │ │ └── index.js │ │ │ ├── create-compiler.js │ │ │ ├── directives │ │ │ │ ├── bind.js │ │ │ │ ├── index.js │ │ │ │ ├── model.js │ │ │ │ └── on.js │ │ │ ├── error-detector.js │ │ │ ├── helpers.js │ │ │ ├── index.js │ │ │ ├── optimizer.js │ │ │ ├── parser │ │ │ │ ├── entity-decoder.js │ │ │ │ ├── filter-parser.js │ │ │ │ ├── html-parser.js │ │ │ │ ├── index.js │ │ │ │ └── text-parser.js │ │ │ └── to-function.js │ │ ├── core │ │ │ ├── components │ │ │ │ ├── index.js │ │ │ │ └── keep-alive.js │ │ │ ├── config.js │ │ │ ├── global-api │ │ │ │ ├── assets.js │ │ │ │ ├── extend.js │ │ │ │ ├── index.js │ │ │ │ ├── mixin.js │ │ │ │ └── use.js │ │ │ ├── index.js │ │ │ ├── instance │ │ │ │ ├── events.js │ │ │ │ ├── index.js │ │ │ │ ├── init.js │ │ │ │ ├── inject.js │ │ │ │ ├── lifecycle.js │ │ │ │ ├── proxy.js │ │ │ │ ├── render-helpers │ │ │ │ │ ├── bind-dynamic-keys.js │ │ │ │ │ ├── bind-object-listeners.js │ │ │ │ │ ├── bind-object-props.js │ │ │ │ │ ├── check-keycodes.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── render-list.js │ │ │ │ │ ├── render-slot.js │ │ │ │ │ ├── render-static.js │ │ │ │ │ ├── resolve-filter.js │ │ │ │ │ ├── resolve-scoped-slots.js │ │ │ │ │ └── resolve-slots.js │ │ │ │ ├── render.js │ │ │ │ └── state.js │ │ │ ├── observer │ │ │ │ ├── array.js │ │ │ │ ├── dep.js │ │ │ │ ├── index.js │ │ │ │ ├── scheduler.js │ │ │ │ ├── traverse.js │ │ │ │ └── watcher.js │ │ │ ├── util │ │ │ │ ├── debug.js │ │ │ │ ├── env.js │ │ │ │ ├── error.js │ │ │ │ ├── index.js │ │ │ │ ├── lang.js │ │ │ │ ├── next-tick.js │ │ │ │ ├── options.js │ │ │ │ ├── perf.js │ │ │ │ └── props.js │ │ │ └── vdom │ │ │ │ ├── create-component.js │ │ │ │ ├── create-element.js │ │ │ │ ├── create-functional-component.js │ │ │ │ ├── helpers │ │ │ │ ├── extract-props.js │ │ │ │ ├── get-first-component-child.js │ │ │ │ ├── index.js │ │ │ │ ├── is-async-placeholder.js │ │ │ │ ├── merge-hook.js │ │ │ │ ├── normalize-children.js │ │ │ │ ├── normalize-scoped-slots.js │ │ │ │ ├── resolve-async-component.js │ │ │ │ └── update-listeners.js │ │ │ │ ├── modules │ │ │ │ ├── directives.js │ │ │ │ ├── index.js │ │ │ │ └── ref.js │ │ │ │ ├── patch.js │ │ │ │ └── vnode.js │ │ ├── platforms │ │ │ ├── web │ │ │ │ ├── compiler │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── html.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── text.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── style.js │ │ │ │ │ ├── options.js │ │ │ │ │ └── util.js │ │ │ │ ├── entry-compiler.js │ │ │ │ ├── entry-runtime-with-compiler.js │ │ │ │ ├── entry-runtime.js │ │ │ │ ├── entry-server-basic-renderer.js │ │ │ │ ├── entry-server-renderer.js │ │ │ │ ├── runtime │ │ │ │ │ ├── class-util.js │ │ │ │ │ ├── components │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ └── transition.js │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── show.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ └── transition.js │ │ │ │ │ ├── node-ops.js │ │ │ │ │ ├── patch.js │ │ │ │ │ └── transition-util.js │ │ │ │ ├── server │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── show.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── style.js │ │ │ │ │ └── util.js │ │ │ │ └── util │ │ │ │ │ ├── attrs.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── compat.js │ │ │ │ │ ├── element.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── style.js │ │ │ └── weex │ │ │ │ ├── compiler │ │ │ │ ├── directives │ │ │ │ │ ├── index.js │ │ │ │ │ └── model.js │ │ │ │ ├── index.js │ │ │ │ └── modules │ │ │ │ │ ├── append.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── props.js │ │ │ │ │ ├── recycle-list │ │ │ │ │ ├── component-root.js │ │ │ │ │ ├── component.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── recycle-list.js │ │ │ │ │ ├── text.js │ │ │ │ │ ├── v-bind.js │ │ │ │ │ ├── v-for.js │ │ │ │ │ ├── v-if.js │ │ │ │ │ ├── v-on.js │ │ │ │ │ └── v-once.js │ │ │ │ │ └── style.js │ │ │ │ ├── entry-compiler.js │ │ │ │ ├── entry-framework.js │ │ │ │ ├── entry-runtime-factory.js │ │ │ │ ├── runtime │ │ │ │ ├── components │ │ │ │ │ ├── index.js │ │ │ │ │ ├── richtext.js │ │ │ │ │ ├── transition-group.js │ │ │ │ │ └── transition.js │ │ │ │ ├── directives │ │ │ │ │ └── index.js │ │ │ │ ├── index.js │ │ │ │ ├── modules │ │ │ │ │ ├── attrs.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── events.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── style.js │ │ │ │ │ └── transition.js │ │ │ │ ├── node-ops.js │ │ │ │ ├── patch.js │ │ │ │ ├── recycle-list │ │ │ │ │ ├── render-component-template.js │ │ │ │ │ └── virtual-component.js │ │ │ │ └── text-node.js │ │ │ │ └── util │ │ │ │ ├── element.js │ │ │ │ ├── index.js │ │ │ │ └── parser.js │ │ ├── server │ │ │ ├── bundle-renderer │ │ │ │ ├── create-bundle-renderer.js │ │ │ │ ├── create-bundle-runner.js │ │ │ │ └── source-map-support.js │ │ │ ├── create-basic-renderer.js │ │ │ ├── create-renderer.js │ │ │ ├── optimizing-compiler │ │ │ │ ├── codegen.js │ │ │ │ ├── index.js │ │ │ │ ├── modules.js │ │ │ │ ├── optimizer.js │ │ │ │ └── runtime-helpers.js │ │ │ ├── render-context.js │ │ │ ├── render-stream.js │ │ │ ├── render.js │ │ │ ├── template-renderer │ │ │ │ ├── create-async-file-mapper.js │ │ │ │ ├── index.js │ │ │ │ ├── parse-template.js │ │ │ │ └── template-stream.js │ │ │ ├── util.js │ │ │ ├── webpack-plugin │ │ │ │ ├── client.js │ │ │ │ ├── server.js │ │ │ │ └── util.js │ │ │ └── write.js │ │ ├── sfc │ │ │ └── parser.js │ │ └── shared │ │ │ ├── constants.js │ │ │ └── util.js │ │ ├── test │ │ ├── e2e │ │ │ ├── .eslintrc.json │ │ │ ├── nightwatch.config.js │ │ │ ├── runner.js │ │ │ └── specs │ │ │ │ ├── async-edge-cases.html │ │ │ │ ├── async-edge-cases.js │ │ │ │ ├── basic-ssr.html │ │ │ │ ├── basic-ssr.js │ │ │ │ ├── commits.js │ │ │ │ ├── grid.js │ │ │ │ ├── markdown.js │ │ │ │ ├── modal.js │ │ │ │ ├── select2.js │ │ │ │ ├── svg.js │ │ │ │ ├── todomvc.js │ │ │ │ └── tree.js │ │ ├── helpers │ │ │ ├── .eslintrc.json │ │ │ ├── classlist.js │ │ │ ├── test-object-option.js │ │ │ ├── to-equal.js │ │ │ ├── to-have-been-warned.js │ │ │ ├── trigger-event.js │ │ │ ├── vdom.js │ │ │ └── wait-for-update.js │ │ ├── ssr │ │ │ ├── .eslintrc │ │ │ ├── async-loader.js │ │ │ ├── compile-with-webpack.js │ │ │ ├── fixtures │ │ │ │ ├── app.js │ │ │ │ ├── async-bar.js │ │ │ │ ├── async-foo.js │ │ │ │ ├── cache-opt-out.js │ │ │ │ ├── cache.js │ │ │ │ ├── error.js │ │ │ │ ├── nested-cache.js │ │ │ │ ├── promise-rejection.js │ │ │ │ ├── split.js │ │ │ │ ├── test.css │ │ │ │ ├── test.png │ │ │ │ └── test.woff2 │ │ │ ├── jasmine.js │ │ │ ├── ssr-basic-renderer.spec.js │ │ │ ├── ssr-bundle-render.spec.js │ │ │ ├── ssr-stream.spec.js │ │ │ ├── ssr-string.spec.js │ │ │ └── ssr-template.spec.js │ │ ├── unit │ │ │ ├── .eslintrc.json │ │ │ ├── features │ │ │ │ ├── component │ │ │ │ │ ├── component-async.spec.js │ │ │ │ │ ├── component-keep-alive.spec.js │ │ │ │ │ ├── component-scoped-slot.spec.js │ │ │ │ │ ├── component-slot.spec.js │ │ │ │ │ └── component.spec.js │ │ │ │ ├── debug.spec.js │ │ │ │ ├── directives │ │ │ │ │ ├── bind.spec.js │ │ │ │ │ ├── class.spec.js │ │ │ │ │ ├── cloak.spec.js │ │ │ │ │ ├── for.spec.js │ │ │ │ │ ├── html.spec.js │ │ │ │ │ ├── if.spec.js │ │ │ │ │ ├── model-checkbox.spec.js │ │ │ │ │ ├── model-component.spec.js │ │ │ │ │ ├── model-dynamic.spec.js │ │ │ │ │ ├── model-file.spec.js │ │ │ │ │ ├── model-parse.spec.js │ │ │ │ │ ├── model-radio.spec.js │ │ │ │ │ ├── model-select.spec.js │ │ │ │ │ ├── model-text.spec.js │ │ │ │ │ ├── on.spec.js │ │ │ │ │ ├── once.spec.js │ │ │ │ │ ├── pre.spec.js │ │ │ │ │ ├── show.spec.js │ │ │ │ │ ├── static-style-parser.spec.js │ │ │ │ │ ├── style.spec.js │ │ │ │ │ └── text.spec.js │ │ │ │ ├── error-handling.spec.js │ │ │ │ ├── filter │ │ │ │ │ └── filter.spec.js │ │ │ │ ├── global-api │ │ │ │ │ ├── assets.spec.js │ │ │ │ │ ├── compile.spec.js │ │ │ │ │ ├── config.spec.js │ │ │ │ │ ├── extend.spec.js │ │ │ │ │ ├── mixin.spec.js │ │ │ │ │ ├── observable.spec.js │ │ │ │ │ ├── set-delete.spec.js │ │ │ │ │ └── use.spec.js │ │ │ │ ├── instance │ │ │ │ │ ├── init.spec.js │ │ │ │ │ ├── methods-data.spec.js │ │ │ │ │ ├── methods-events.spec.js │ │ │ │ │ ├── methods-lifecycle.spec.js │ │ │ │ │ ├── properties.spec.js │ │ │ │ │ └── render-proxy.spec.js │ │ │ │ ├── options │ │ │ │ │ ├── _scopeId.spec.js │ │ │ │ │ ├── comments.spec.js │ │ │ │ │ ├── components.spec.js │ │ │ │ │ ├── computed.spec.js │ │ │ │ │ ├── data.spec.js │ │ │ │ │ ├── delimiters.spec.js │ │ │ │ │ ├── directives.spec.js │ │ │ │ │ ├── el.spec.js │ │ │ │ │ ├── errorCaptured.spec.js │ │ │ │ │ ├── extends.spec.js │ │ │ │ │ ├── functional.spec.js │ │ │ │ │ ├── inheritAttrs.spec.js │ │ │ │ │ ├── inject.spec.js │ │ │ │ │ ├── lifecycle.spec.js │ │ │ │ │ ├── methods.spec.js │ │ │ │ │ ├── mixins.spec.js │ │ │ │ │ ├── name.spec.js │ │ │ │ │ ├── parent.spec.js │ │ │ │ │ ├── props.spec.js │ │ │ │ │ ├── propsData.spec.js │ │ │ │ │ ├── render.spec.js │ │ │ │ │ ├── renderError.spec.js │ │ │ │ │ ├── template.spec.js │ │ │ │ │ └── watch.spec.js │ │ │ │ ├── ref.spec.js │ │ │ │ └── transition │ │ │ │ │ ├── inject-styles.js │ │ │ │ │ ├── transition-group.spec.js │ │ │ │ │ ├── transition-mode.spec.js │ │ │ │ │ └── transition.spec.js │ │ │ ├── index.js │ │ │ ├── karma.base.config.js │ │ │ ├── karma.cover.config.js │ │ │ ├── karma.dev.config.js │ │ │ ├── karma.sauce.config.js │ │ │ ├── karma.unit.config.js │ │ │ └── modules │ │ │ │ ├── compiler │ │ │ │ ├── codeframe.spec.js │ │ │ │ ├── codegen.spec.js │ │ │ │ ├── compiler-options.spec.js │ │ │ │ ├── optimizer.spec.js │ │ │ │ └── parser.spec.js │ │ │ │ ├── observer │ │ │ │ ├── dep.spec.js │ │ │ │ ├── observer.spec.js │ │ │ │ ├── scheduler.spec.js │ │ │ │ └── watcher.spec.js │ │ │ │ ├── server-compiler │ │ │ │ ├── compiler-options.spec.js │ │ │ │ └── optimizer.spec.js │ │ │ │ ├── sfc │ │ │ │ └── sfc-parser.spec.js │ │ │ │ ├── util │ │ │ │ ├── error.spec.js │ │ │ │ └── next-tick.spec.js │ │ │ │ └── vdom │ │ │ │ ├── create-component.spec.js │ │ │ │ ├── create-element.spec.js │ │ │ │ ├── modules │ │ │ │ ├── attrs.spec.js │ │ │ │ ├── class.spec.js │ │ │ │ ├── directive.spec.js │ │ │ │ ├── dom-props.spec.js │ │ │ │ ├── events.spec.js │ │ │ │ └── style.spec.js │ │ │ │ └── patch │ │ │ │ ├── children.spec.js │ │ │ │ ├── edge-cases.spec.js │ │ │ │ ├── element.spec.js │ │ │ │ ├── hooks.spec.js │ │ │ │ └── hydration.spec.js │ │ └── weex │ │ │ ├── .eslintrc │ │ │ ├── cases │ │ │ ├── cases.spec.js │ │ │ ├── event │ │ │ │ ├── click.after.vdom.js │ │ │ │ ├── click.before.vdom.js │ │ │ │ └── click.vue │ │ │ ├── recycle-list │ │ │ │ ├── attrs.vdom.js │ │ │ │ ├── attrs.vue │ │ │ │ ├── classname.vdom.js │ │ │ │ ├── classname.vue │ │ │ │ ├── components │ │ │ │ │ ├── banner.vue │ │ │ │ │ ├── counter.vue │ │ │ │ │ ├── editor.vue │ │ │ │ │ ├── footer.vue │ │ │ │ │ ├── lifecycle.vue │ │ │ │ │ ├── poster.vue │ │ │ │ │ ├── stateful-lifecycle.vdom.js │ │ │ │ │ ├── stateful-lifecycle.vue │ │ │ │ │ ├── stateful-v-model.vdom.js │ │ │ │ │ ├── stateful-v-model.vue │ │ │ │ │ ├── stateful.vdom.js │ │ │ │ │ ├── stateful.vue │ │ │ │ │ ├── stateless-multi-components.vdom.js │ │ │ │ │ ├── stateless-multi-components.vue │ │ │ │ │ ├── stateless-with-props.vdom.js │ │ │ │ │ ├── stateless-with-props.vue │ │ │ │ │ ├── stateless.vdom.js │ │ │ │ │ └── stateless.vue │ │ │ │ ├── inline-style.vdom.js │ │ │ │ ├── inline-style.vue │ │ │ │ ├── text-node.vdom.js │ │ │ │ ├── text-node.vue │ │ │ │ ├── v-else-if.vdom.js │ │ │ │ ├── v-else-if.vue │ │ │ │ ├── v-else.vdom.js │ │ │ │ ├── v-else.vue │ │ │ │ ├── v-for-iterator.vdom.js │ │ │ │ ├── v-for-iterator.vue │ │ │ │ ├── v-for.vdom.js │ │ │ │ ├── v-for.vue │ │ │ │ ├── v-if.vdom.js │ │ │ │ ├── v-if.vue │ │ │ │ ├── v-on-inline.vdom.js │ │ │ │ ├── v-on-inline.vue │ │ │ │ ├── v-on.vdom.js │ │ │ │ ├── v-on.vue │ │ │ │ ├── v-once.vdom.js │ │ │ │ └── v-once.vue │ │ │ └── render │ │ │ │ ├── class.vdom.js │ │ │ │ ├── class.vue │ │ │ │ ├── sample.vdom.js │ │ │ │ └── sample.vue │ │ │ ├── compiler │ │ │ ├── append.spec.js │ │ │ ├── class.spec.js │ │ │ ├── compile.spec.js │ │ │ ├── parser.spec.js │ │ │ ├── props.spec.js │ │ │ ├── style.spec.js │ │ │ └── v-model.spec.js │ │ │ ├── helpers │ │ │ └── index.js │ │ │ ├── jasmine.js │ │ │ └── runtime │ │ │ ├── attrs.spec.js │ │ │ ├── class.spec.js │ │ │ ├── components │ │ │ └── richtext.spec.js │ │ │ ├── events.spec.js │ │ │ ├── framework.spec.js │ │ │ ├── node.spec.js │ │ │ └── style.spec.js │ │ └── types │ │ ├── index.d.ts │ │ ├── options.d.ts │ │ ├── plugin.d.ts │ │ ├── test │ │ ├── augmentation-test.ts │ │ ├── es-module.ts │ │ ├── options-test.ts │ │ ├── plugin-test.ts │ │ ├── ssr-test.ts │ │ ├── tsconfig.json │ │ ├── umd-test.ts │ │ └── vue-test.ts │ │ ├── tsconfig.json │ │ ├── typings.json │ │ ├── umd.d.ts │ │ ├── vnode.d.ts │ │ └── vue.d.ts ├── 20200724 │ ├── code │ │ ├── .browserslistrc │ │ ├── .editorconfig │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── public │ │ │ ├── favicon.ico │ │ │ └── index.html │ │ └── src │ │ │ ├── App.vue │ │ │ ├── assets │ │ │ └── logo.png │ │ │ ├── components │ │ │ └── HelloWorld.vue │ │ │ ├── main.js │ │ │ ├── my-vue-router │ │ │ ├── components │ │ │ │ ├── link.js │ │ │ │ └── view.js │ │ │ ├── create-matcher.js │ │ │ ├── create-route-map.js │ │ │ ├── history │ │ │ │ ├── base.js │ │ │ │ ├── hash.js │ │ │ │ └── html5.js │ │ │ ├── index.js │ │ │ ├── install.js │ │ │ └── util │ │ │ │ └── route.js │ │ │ ├── router │ │ │ └── index.js │ │ │ └── views │ │ │ ├── About.vue │ │ │ ├── Home.vue │ │ │ └── music │ │ │ ├── Index.vue │ │ │ ├── Pop.vue │ │ │ └── Rock.vue │ └── handouts │ │ └── README.pdf ├── 20200805 │ └── README.md ├── 20200811 │ ├── README.md │ ├── assets │ │ └── image-20200811160053800.png │ └── astdemo │ │ ├── 01-esprima.js │ │ ├── 02-babel.js │ │ ├── ast │ │ ├── 01-arrow.json │ │ └── 01-function.json │ │ └── package.json ├── 20200908 │ ├── code │ │ ├── 10 │ │ │ └── index.js │ │ ├── 01 │ │ │ ├── index.js │ │ │ └── index2.js │ │ ├── 02 │ │ │ └── type和interface │ │ │ │ ├── index.ts │ │ │ │ ├── 不同点.ts │ │ │ │ └── 相同点.ts │ │ ├── 03 │ │ │ ├── index.js │ │ │ └── login.js │ │ ├── 04 │ │ │ └── index.js │ │ ├── 05 │ │ │ ├── index.js │ │ │ └── index2.js │ │ ├── 07 │ │ │ └── index.html │ │ └── 08 │ │ │ └── package.json │ └── note │ │ └── 期中测试题(上).pdf ├── 20200917 │ ├── 101-node-deploy │ │ ├── app.js │ │ ├── config.js │ │ ├── lib │ │ │ ├── commander.js │ │ │ ├── compress.js │ │ │ ├── ssh.js │ │ │ └── uploadFile.js │ │ └── package.json │ ├── README.md │ ├── assets │ │ ├── image-20200917113125348.png │ │ ├── image-20200917144721581.png │ │ ├── image-20200917144747017.png │ │ └── image-20200917144819689.png │ └── nginx.conf ├── 20200927 │ ├── .dockerignore │ ├── Dockerfile │ ├── README.md │ └── assets │ │ ├── image-1601197546129.png │ │ ├── image-1601203657864.png │ │ ├── image-1601203670308.png │ │ ├── image-1601203676459.png │ │ ├── image-20200927184708875.png │ │ └── image.png ├── 20201017 │ ├── code │ │ ├── api │ │ │ ├── db.json │ │ │ └── package.json │ │ ├── blog-width-gridsome │ │ │ ├── .env.development │ │ │ ├── .env.production │ │ │ ├── README.md │ │ │ ├── content │ │ │ │ └── blog │ │ │ │ │ ├── article1.md │ │ │ │ │ ├── article2.md │ │ │ │ │ └── foo │ │ │ │ │ └── abc.md │ │ │ ├── gridsome.config.js │ │ │ ├── gridsome.server.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── .temp │ │ │ │ │ ├── config.js │ │ │ │ │ ├── constants.js │ │ │ │ │ ├── icons.js │ │ │ │ │ ├── now.js │ │ │ │ │ ├── plugins-client.js │ │ │ │ │ ├── plugins-server.js │ │ │ │ │ └── routes.js │ │ │ │ ├── assets │ │ │ │ │ └── css │ │ │ │ │ │ └── index.css │ │ │ │ ├── components │ │ │ │ │ └── README.md │ │ │ │ ├── favicon.png │ │ │ │ ├── layouts │ │ │ │ │ ├── Default.vue │ │ │ │ │ └── README.md │ │ │ │ ├── main.js │ │ │ │ ├── pages │ │ │ │ │ ├── About.vue │ │ │ │ │ ├── Contact.vue │ │ │ │ │ ├── Index.vue │ │ │ │ │ └── README.md │ │ │ │ └── templates │ │ │ │ │ ├── Post.vue │ │ │ │ │ ├── README.md │ │ │ │ │ └── Tag.vue │ │ │ └── static │ │ │ │ ├── README.md │ │ │ │ └── img │ │ │ │ ├── about-bg.jpg │ │ │ │ ├── contact-bg.jpg │ │ │ │ ├── home-bg.jpg │ │ │ │ ├── post-bg.jpg │ │ │ │ └── post-sample-image.jpg │ │ ├── my-gridsome-site │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── gridsome.config.js │ │ │ ├── gridsome.server.js │ │ │ ├── package.json │ │ │ ├── src │ │ │ │ ├── components │ │ │ │ │ └── README.md │ │ │ │ ├── favicon.png │ │ │ │ ├── layouts │ │ │ │ │ ├── Default.vue │ │ │ │ │ └── README.md │ │ │ │ ├── main.js │ │ │ │ ├── pages │ │ │ │ │ ├── About.vue │ │ │ │ │ ├── Index.vue │ │ │ │ │ └── README.md │ │ │ │ └── templates │ │ │ │ │ └── README.md │ │ │ └── static │ │ │ │ └── README.md │ │ ├── my-project │ │ │ ├── README.md │ │ │ ├── api │ │ │ │ ├── .gitkeep │ │ │ │ ├── contact │ │ │ │ │ ├── config │ │ │ │ │ │ └── routes.json │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── contact.js │ │ │ │ │ ├── models │ │ │ │ │ │ ├── contact.js │ │ │ │ │ │ └── contact.settings.json │ │ │ │ │ └── services │ │ │ │ │ │ └── contact.js │ │ │ │ ├── general │ │ │ │ │ ├── config │ │ │ │ │ │ └── routes.json │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── general.js │ │ │ │ │ ├── models │ │ │ │ │ │ ├── general.js │ │ │ │ │ │ └── general.settings.json │ │ │ │ │ └── services │ │ │ │ │ │ └── general.js │ │ │ │ ├── post │ │ │ │ │ ├── config │ │ │ │ │ │ └── routes.json │ │ │ │ │ ├── controllers │ │ │ │ │ │ └── post.js │ │ │ │ │ ├── models │ │ │ │ │ │ ├── post.js │ │ │ │ │ │ └── post.settings.json │ │ │ │ │ └── services │ │ │ │ │ │ └── post.js │ │ │ │ └── tag │ │ │ │ │ ├── config │ │ │ │ │ └── routes.json │ │ │ │ │ ├── controllers │ │ │ │ │ └── tag.js │ │ │ │ │ ├── models │ │ │ │ │ ├── tag.js │ │ │ │ │ └── tag.settings.json │ │ │ │ │ └── services │ │ │ │ │ └── tag.js │ │ │ ├── build │ │ │ │ ├── 0.4bbd3b9e.chunk.js │ │ │ │ ├── 0.a1c8ec0b.chunk.js │ │ │ │ ├── 03ba7cb710104df27f1c9c46d64bee4e.svg │ │ │ │ ├── 05b53beb21e3ef13d28244545977152d.woff │ │ │ │ ├── 085b1dd8427dbeff10bd55410915a3f6.ttf │ │ │ │ ├── 0fabb6606be4c45acfeedd115d0caca4.eot │ │ │ │ ├── 1.2e36b808.chunk.js │ │ │ │ ├── 1.75957763.chunk.js │ │ │ │ ├── 1a78af4105d4d56e6c34f76dc70bf1bc.ttf │ │ │ │ ├── 2.05e02e4d.chunk.js │ │ │ │ ├── 2.dda98c8d.chunk.js │ │ │ │ ├── 26d289674d9c13cc55f34a5cff7ec343.svg │ │ │ │ ├── 27bd77b9162d388cb8d4c4217c7c5e2a.woff │ │ │ │ ├── 2e1ba5a498b2a46ff0e9130c2cfd3384.svg │ │ │ │ ├── 2e83b03e0d8024cdb30d4ac2e02fcce8.svg │ │ │ │ ├── 3.109fd245.chunk.js │ │ │ │ ├── 3.4639a084.chunk.js │ │ │ │ ├── 33d5f0d956f3fc30bc51f81047a2c47d.woff2 │ │ │ │ ├── 33f80c39ceeee87c63c4ecfaf6430499.svg │ │ │ │ ├── 353e06eff649d349c57886e7b85c1583.svg │ │ │ │ ├── 3996eea080b78f9e7dc1dd56c6c851c2.svg │ │ │ │ ├── 3a3398a6ef60fc64eacf45665958342e.woff2 │ │ │ │ ├── 3b0cd7254b3b6ddb8a313d41573fda8b.ttf │ │ │ │ ├── 3f6f46544e110a51499353fdc9d12bfe.png │ │ │ │ ├── 47ffa3adcd8b08b2ea82d3ed6c448f31.png │ │ │ │ ├── 587bfd5bca999b8d1213603050cb696e.svg │ │ │ │ ├── 5b1b8b856d7a8cb1cb0bae6d0573f2e9.ttf │ │ │ │ ├── 6.53f246a9.chunk.js │ │ │ │ ├── 6.f94ac6ef.chunk.js │ │ │ │ ├── 6301a48360d263198461152504dcd42b.svg │ │ │ │ ├── 674f50d287a8c48dc19ba404d20fe713.eot │ │ │ │ ├── 6a7a177d2278b1a672058817a92c2870.png │ │ │ │ ├── 6d4e78225df0cfd5fe1bf3e8547fefe4.ttf │ │ │ │ ├── 7.6d864f22.chunk.js │ │ │ │ ├── 7.821278bb.chunk.js │ │ │ │ ├── 7078e9a513b8006418c274851e535840.png │ │ │ │ ├── 75a60ac7a1a65ca23365ddab1d9da73e.png │ │ │ │ ├── 781e85bb50c8e8301c30de56b31b1f04.ttf │ │ │ │ ├── 7d8c6651cb69a0c3a2668b522192dec3.png │ │ │ │ ├── 8.0042986c.chunk.js │ │ │ │ ├── 8.df7a6be0.chunk.js │ │ │ │ ├── 89bd2e38475e441a5cd70f663f921d61.eot │ │ │ │ ├── 8b4f872c5de19974857328d06d3fe48f.woff2 │ │ │ │ ├── 9.82a8a835.chunk.js │ │ │ │ ├── 9.c4b5ab69.chunk.js │ │ │ │ ├── 912ec66d7572ff821749319396470bde.svg │ │ │ │ ├── a24612a87a8170fee74de4eb86e3cf02.svg │ │ │ │ ├── a54bddbc1689d05277d2127f58589917.ttf │ │ │ │ ├── ad3a7c0d77e09602f4ab73db3660ffd8.eot │ │ │ │ ├── af7ae505a9eed503f8b8e6982036873e.woff2 │ │ │ │ ├── b06871f281fee6b241d60582ae9369b9.ttf │ │ │ │ ├── bd03a2cc277bbbc338d464e679fe9942.woff2 │ │ │ │ ├── c2b50f4a7d908c8d06f5b05ec135e166.woff │ │ │ │ ├── c500da19d776384ba69573ae6fe274e7.woff2 │ │ │ │ ├── cac68c831145804808381a7032fdc7c2.woff2 │ │ │ │ ├── cc1d824d8f006f0a47c72638f4ce0376.png │ │ │ │ ├── cccb897485813c7c256901dbca54ecf2.woff2 │ │ │ │ ├── ccfdb9dc442be0c629d331e94497428b.svg │ │ │ │ ├── cdbd13088f280c86c5f5621f0fa1b857.svg │ │ │ │ ├── d878b6c29b10beca227e9eef4246111b.woff │ │ │ │ ├── dc0bd022735ed218df547742a1b2f172.woff │ │ │ │ ├── e230ebc80c02d7e610cb4d4a115b74c2.png │ │ │ │ ├── e75dfd904d366a2560c63c23cfc98ef8.svg │ │ │ │ ├── ee09ad7553b8ad3d81150d609d5341a0.woff │ │ │ │ ├── f80bda6afd19534368443a3d0323a140.woff │ │ │ │ ├── fb30313e62e3a932b32e5e1eef0f2ed6.png │ │ │ │ ├── fd508c879644dd6827313d801776d714.png │ │ │ │ ├── fee66e712a8a08eef5805a46892932ad.woff │ │ │ │ ├── index.html │ │ │ │ ├── main.46f894b4.chunk.js │ │ │ │ ├── main.972690b3.chunk.js │ │ │ │ ├── main.fc6842f3.chunk.js │ │ │ │ ├── runtime~main.2429ce77.js │ │ │ │ └── runtime~main.c76ca87d.js │ │ │ ├── config │ │ │ │ ├── database.js │ │ │ │ ├── functions │ │ │ │ │ ├── bootstrap.js │ │ │ │ │ ├── cron.js │ │ │ │ │ └── responses │ │ │ │ │ │ └── 404.js │ │ │ │ └── server.js │ │ │ ├── exports │ │ │ │ └── graphql │ │ │ │ │ └── schema.graphql │ │ │ ├── extensions │ │ │ │ ├── .gitkeep │ │ │ │ └── users-permissions │ │ │ │ │ └── config │ │ │ │ │ └── jwt.js │ │ │ ├── favicon.ico │ │ │ ├── main.sql │ │ │ ├── package.json │ │ │ └── public │ │ │ │ ├── robots.txt │ │ │ │ └── uploads │ │ │ │ ├── .gitkeep │ │ │ │ ├── about_bg_501ff48c31.png │ │ │ │ ├── home_bg_26d13d1f1b.jpg │ │ │ │ ├── large_about_bg_501ff48c31.png │ │ │ │ ├── large_home_bg_26d13d1f1b.jpg │ │ │ │ ├── large_post_bg_64fec39ca4.jpg │ │ │ │ ├── large_post_bg_9933dcc6ca.png │ │ │ │ ├── medium_about_bg_501ff48c31.png │ │ │ │ ├── medium_home_bg_26d13d1f1b.jpg │ │ │ │ ├── medium_post_bg_64fec39ca4.jpg │ │ │ │ ├── medium_post_bg_9933dcc6ca.png │ │ │ │ ├── medium_post_sample_image_5e8b4b2413.png │ │ │ │ ├── post_bg_64fec39ca4.jpg │ │ │ │ ├── post_bg_9933dcc6ca.png │ │ │ │ ├── post_sample_image_5e8b4b2413.png │ │ │ │ ├── small_about_bg_501ff48c31.png │ │ │ │ ├── small_home_bg_26d13d1f1b.jpg │ │ │ │ ├── small_post_bg_64fec39ca4.jpg │ │ │ │ ├── small_post_bg_9933dcc6ca.png │ │ │ │ ├── small_post_sample_image_5e8b4b2413.png │ │ │ │ ├── thumbnail_about_bg_501ff48c31.png │ │ │ │ ├── thumbnail_home_bg_26d13d1f1b.jpg │ │ │ │ ├── thumbnail_post_bg_64fec39ca4.jpg │ │ │ │ ├── thumbnail_post_bg_9933dcc6ca.png │ │ │ │ └── thumbnail_post_sample_image_5e8b4b2413.png │ │ └── vue-ssr │ │ │ ├── .gitignore │ │ │ ├── build │ │ │ ├── setup-dev-server.js │ │ │ ├── webpack.base.config.js │ │ │ ├── webpack.client.config.js │ │ │ └── webpack.server.config.js │ │ │ ├── index.template.html │ │ │ ├── package.json │ │ │ ├── server.js │ │ │ └── src │ │ │ ├── App.vue │ │ │ ├── app.js │ │ │ ├── entry-client.js │ │ │ ├── entry-server.js │ │ │ ├── main.css │ │ │ ├── pages │ │ │ ├── 404.vue │ │ │ ├── About.vue │ │ │ ├── Home.vue │ │ │ └── Posts.vue │ │ │ ├── router │ │ │ └── index.js │ │ │ └── store │ │ │ └── index.js │ └── handouts │ │ └── 2020-10-16 3-4 答疑.pdf ├── 20201030 │ ├── code │ │ ├── index.html │ │ ├── package.json │ │ ├── src │ │ │ ├── index.js │ │ │ └── math.js │ │ └── webpack.config.js │ └── note │ │ └── 笔记.txt └── README.md ├── package.json ├── prepare └── README.md ├── requirements.md └── test ├── README.md ├── test_plain.md └── 期中测试答案.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # For more information about the properties used in 2 | # this file, please see the EditorConfig documentation: 3 | # https://editorconfig.org/ 4 | 5 | root = true 6 | 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_size = 2 11 | indent_style = space 12 | insert_final_newline = true 13 | trim_trailing_whitespace = true 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | 18 | [COMMIT_EDITMSG] 19 | max_line_length = 0 20 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | 1. **Fork** it on GitHub! 4 | 2. **Clone** the fork to your own machine. 5 | 3. **Checkout** your feature branch: `git checkout -b my-awesome-feature` 6 | 4. **Commit** your changes to your own branch: `git commit -am 'Add some feature'` 7 | 5. **Push** your work back up to your fork: `git push -u origin my-awesome-feature` 8 | 6. Submit a **Pull Request** so that we can review your changes. 9 | 10 | > **NOTE**: Be sure to merge the latest from "upstream" before making a pull request! 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/ask_question.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Ask question 3 | about: 向我提出你学习过程中的疑问或者难题 4 | title: "Question: 简明的标题" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | 9 | ## 正在学习的内容 10 | 11 | 12 | 13 | ## 遇到的问题 14 | 15 | 16 | 17 | ## 重现步骤 18 | 19 | 20 | 21 | ## 你目前的状态 22 | 23 | 24 | 25 | ## 额外的描述 26 | 27 | 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: 针对过往内容提出你发现的问题,帮助我提高质量 4 | title: "Bug: 简明的标题" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | 9 | ## 错误内容链接 10 | 11 | 12 | 13 | ## 错误描述 14 | 15 | 16 | 17 | ## 预期结果 18 | 19 | 20 | 21 | ## 额外的描述 22 | 23 | 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: 告诉我你想学习的内容,我将不遗余力 4 | title: "Feature: 简明的标题" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | 9 | ## 想要学习的内容 10 | 11 | 12 | 13 | ## 为什么想要学习这个内容 14 | 15 | 16 | 17 | ## 参考资料 18 | 19 | 20 | 21 | ## 额外的描述 22 | 23 | 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/make_suggestion.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Make suggestion 3 | about: 向我提出你的意见或建议,帮助我提高 4 | title: "Suggestion: 简明的标题" 5 | labels: "" 6 | assignees: "" 7 | --- 8 | 9 | ## 意见或建议 10 | 11 | 12 | 13 | ## 预期结果 14 | 15 | 16 | 17 | ## 额外的描述 18 | 19 | 20 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | yarn.lock 4 | package-lock.json 5 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | registry = https://registry.npm.taobao.org/ 2 | package-lock = false 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 大前端高薪训练营 001 期 2 | 3 | > 大前端高薪训练营 001 期相关资料 4 | 5 | 点我 点我 点我 👉[大前端高薪训练营入营资料](prepare) 6 | 7 | 我们会随着学习计划,同步更新此仓库中对应的相关资料。 8 | 9 | ## Table of Contents 10 | 11 | - 录播部分 12 | - 录播部分代码(移至平台课程资料下载) 13 | - 录播部分讲义 (移至平台课程资料下载) 14 | - 录播学习笔记 (移至平台课程资料下载) 15 | - 直播部分 16 | - [直播内容归档](live) 17 | - 日常部分 18 | - [面试题归档](interviews) 19 | - 随堂测试归档 (移至平台课程资料下载) 20 | - 模块作业归档 (移至平台课程资料下载) 21 | - [作业提交要求](requirements.md) 22 | 23 | ## 意见或建议 24 | 25 | 如果你有什么好的意见和建议,可以随时通过 [Issues](https://github.com/lagoufed/fed-e-001/issues) 提出。 26 | 27 | 还是那句话 Issues 不是贴吧,请勿灌水 😄😄😄。 28 | 29 | ## 版权说明 30 | 31 | © 2020 [拉勾教育](https://edu.lagou.com), 保留一切权利. 32 | -------------------------------------------------------------------------------- /interviews/README.md: -------------------------------------------------------------------------------- 1 | # 面试题归档 2 | 3 | > 日常交流群面试题归档,方便大家后期回顾、复习 4 | -------------------------------------------------------------------------------- /live/20200522/code/04-es2019.js: -------------------------------------------------------------------------------- 1 | // ES2018 2 | // + 数组稳定排序 3 | 4 | const arr = [ 5 | { id: 1, value: 'A' }, 6 | { id: 1, value: 'B' }, 7 | { id: 1, value: 'C' }, 8 | { id: 1, value: 'D' }, 9 | { id: 1, value: 'E' }, 10 | { id: 1, value: 'F' }, 11 | { id: 1, value: 'G' }, 12 | { id: 1, value: 'H' }, 13 | { id: 1, value: 'I' }, 14 | { id: 1, value: 'J' }, 15 | { id: 1, value: 'K' }, 16 | { id: 1, value: 'L' }, 17 | { id: 1, value: 'I' }, 18 | { id: 1, value: 'J' }, 19 | { id: 1, value: 'K' }, 20 | { id: 1, value: 'L' } 21 | ] 22 | 23 | console.log(arr.sort(function (a, b) { 24 | return a.id - b.id 25 | })) 26 | 27 | // + try...catch 参数可省略 -------------------------------------------------------------------------------- /live/20200522/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "20200522", 3 | "version": "0.1.0", 4 | "description": "~", 5 | "author": "zce (https://zce.me/)", 6 | "license": "MIT", 7 | "dependencies": { 8 | "axios": "^0.19.2" 9 | }, 10 | "devDependencies": { 11 | "nodemon": "^2.0.4" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /live/20200603/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200603/README.pdf -------------------------------------------------------------------------------- /live/20200603/code/01-functor.js: -------------------------------------------------------------------------------- 1 | class Functor { 2 | constructor (value) { 3 | this._value = value 4 | } 5 | 6 | map (f) { 7 | return new Functor(f(this._value)) 8 | } 9 | 10 | value (f) { 11 | return f(this._value) 12 | } 13 | } 14 | 15 | // 把美元转换成人民币 '$299.99' --> 16 | const toRMB = s => new Functor(s) 17 | .map(s => s.replace(/\$/, '')) 18 | .map(s => s * 7) 19 | .value(s => s.toFixed(2)) 20 | 21 | 22 | console.log(toRMB('$299.99')) -------------------------------------------------------------------------------- /live/20200603/code/02-folktale.js: -------------------------------------------------------------------------------- 1 | const MayBe = require('folktale/maybe') 2 | 3 | const toRMB = s => MayBe.of(s) 4 | .map(s => s.replace(/\$/, '')) 5 | .map(s => s * 7) 6 | .map(s => s.toFixed(2)) 7 | .getOrElse('nothing') 8 | 9 | console.log(toRMB('$299.99')) -------------------------------------------------------------------------------- /live/20200603/code/03-mybind.js: -------------------------------------------------------------------------------- 1 | // fn.bind(obj, args) 2 | // btn.onclick = (function () { }).bind(obj) 3 | 4 | 5 | Function.prototype.mybind = function (context, ...args) { 6 | return (...rest) => { 7 | return this.call(context, ...args, ...rest) 8 | } 9 | } 10 | 11 | function fn (a, b, c) { 12 | return a + b + c 13 | } 14 | 15 | const func = fn.mybind(this, 1, 2, 3) 16 | 17 | 18 | console.log(func()) 19 | 20 | func = null 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /live/20200603/code/07-scopes.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 24 | 25 | -------------------------------------------------------------------------------- /live/20200603/code/08-闭包.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 27 | 28 | -------------------------------------------------------------------------------- /live/20200603/code/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01-demo", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "dependencies": { 7 | "folktale": "^2.3.2", 8 | "lodash": "^4.17.15" 9 | }, 10 | "devDependencies": {}, 11 | "scripts": { 12 | "test": "echo \"Error: no test specified\" && exit 1" 13 | }, 14 | "keywords": [], 15 | "author": "", 16 | "license": "ISC" 17 | } 18 | -------------------------------------------------------------------------------- /live/20200616/Node.js 介绍.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/Node.js 介绍.pdf -------------------------------------------------------------------------------- /live/20200616/media/image-20200616151612999.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/media/image-20200616151612999.png -------------------------------------------------------------------------------- /live/20200616/media/image-20200616153602938.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/media/image-20200616153602938.png -------------------------------------------------------------------------------- /live/20200616/media/image-20200616153851719.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/media/image-20200616153851719.png -------------------------------------------------------------------------------- /live/20200616/media/image-20200616153934374.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/media/image-20200616153934374.png -------------------------------------------------------------------------------- /live/20200616/media/image-20200616153952489.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/media/image-20200616153952489.png -------------------------------------------------------------------------------- /live/20200616/media/image-20200616170158609.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/media/image-20200616170158609.png -------------------------------------------------------------------------------- /live/20200616/media/resize,m_lfit,w_600,h_800,limit_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200616/media/resize,m_lfit,w_600,h_800,limit_1.png -------------------------------------------------------------------------------- /live/20200623/md2png/.editorconfig: -------------------------------------------------------------------------------- 1 | # For more information about the properties used in 2 | # this file, please see the EditorConfig documentation: 3 | # https://editorconfig.org/ 4 | 5 | root = true 6 | 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | indent_size = 2 11 | indent_style = space 12 | insert_final_newline = true 13 | max_line_length = 80 14 | trim_trailing_whitespace = true 15 | 16 | [*.md] 17 | max_line_length = 0 18 | trim_trailing_whitespace = false 19 | 20 | [COMMIT_EDITMSG] 21 | max_line_length = 0 22 | -------------------------------------------------------------------------------- /live/20200623/md2png/.m2irc: -------------------------------------------------------------------------------- 1 | html: | 2 | 3 | 4 |
${content.trim()}
5 | 6 | -------------------------------------------------------------------------------- /live/20200623/md2png/.md2pngrc: -------------------------------------------------------------------------------- 1 | template: > 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 17 | 18 | 19 | ${fragment} 20 | 21 | 22 | foo: 123 23 | -------------------------------------------------------------------------------- /live/20200623/md2png/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: node_js 4 | 5 | node_js: 6 | - lts/* 7 | 8 | notifications: 9 | email: 10 | on_success: never 11 | on_failure: change 12 | 13 | before_script: 14 | - npm i nyc codecov -g 15 | 16 | script: 17 | - npm run lint 18 | - npm run test 19 | 20 | after_script: 21 | - nyc report --reporter=text-lcov > coverage.lcov && codecov 22 | -------------------------------------------------------------------------------- /live/20200623/md2png/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [0.1.0] - 2020-06-23 4 | 5 | - Initial release 6 | 7 | 8 | -------------------------------------------------------------------------------- /live/20200623/md2png/test/md2png.test.js: -------------------------------------------------------------------------------- 1 | const test = require('ava') 2 | const md2Png = require('..') 3 | 4 | // TODO: Implement module test 5 | test('', t => { 6 | const err = t.throws(() => md2Png(100), TypeError) 7 | t.is(err.message, 'Expected a string, got number') 8 | 9 | t.is(md2Png('w'), 'w@zce.me') 10 | t.is(md2Png('w', { host: 'wedn.net' }), 'w@wedn.net') 11 | }) 12 | -------------------------------------------------------------------------------- /live/20200707/mpa-sample/dist/iphone-12/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | iPhone 12 7 | 8 | 9 |
10 |

iPhone 12

11 |
12 |
13 | 特点 14 |
15 |
16 | 参数 17 |
18 |
19 | 规格 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /live/20200707/mpa-sample/dist/iphone-xs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | iPhone Xs 7 | 8 | 9 |
10 |

iPhone Xs

11 |
12 |
13 | 特点 14 |
15 |
16 | 参数 17 |
18 |
19 | 规格 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /live/20200707/mpa-sample/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "mpa-sample", 3 | "version": "0.1.0", 4 | "description": "", 5 | "main": "webpack.config.js", 6 | "dependencies": {}, 7 | "devDependencies": { 8 | "css-loader": "^3.6.0", 9 | "html-webpack-plugin": "^4.3.0", 10 | "style-loader": "^1.2.1", 11 | "webpack": "^4.43.0", 12 | "webpack-cli": "^3.3.12", 13 | "webpack-dev-server": "^3.11.0" 14 | }, 15 | "scripts": { 16 | "test": "echo \"Error: no test specified\" && exit 1" 17 | }, 18 | "author": "zce (https://zce.me/)", 19 | "license": "MIT" 20 | } 21 | -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/common/request.js: -------------------------------------------------------------------------------- 1 | // 例如 API 请求封装 2 | 3 | import $ from 'jquery' 4 | 5 | export const get = $.get -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/common/utils.js: -------------------------------------------------------------------------------- 1 | import $ from 'jquery' 2 | 3 | $(($) => { 4 | const $body = $('html, body') 5 | 6 | $('[data-scroll-top]').on('click', () => { 7 | $body.animate({ scrollTop: 0 }, 600) 8 | return false 9 | }) 10 | }) -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/iphone-12/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | iPhone 12 7 | 8 | 9 |
10 |

iPhone 12

11 |
12 |
13 | 特点 14 |
15 |
16 | 参数 17 |
18 |
19 | 规格 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/iphone-12/index.js: -------------------------------------------------------------------------------- 1 | import { get } from '../common/request' 2 | 3 | import '../common/utils' 4 | import '../common/normalize.css' 5 | import './style.css' 6 | 7 | get('https://jsonplaceholder.typicode.com/users').then(res => { 8 | console.log(res) 9 | }) -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/iphone-12/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f8f9fb; 3 | } 4 | 5 | .header { 6 | color: rgba(255, 255, 255, .7); 7 | background-color: #24292e; 8 | text-align: center; 9 | } 10 | 11 | .section { 12 | display: flex; 13 | justify-content: center; 14 | align-items: center; 15 | height: 100vh; 16 | } 17 | 18 | .section:nth-of-type(2n) { 19 | background-color: #fff; 20 | } 21 | -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/iphone-xs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | iPhone Xs 7 | 8 | 9 |
10 |

iPhone Xs

11 |
12 |
13 | 特点 14 |
15 |
16 | 参数 17 |
18 |
19 | 规格 20 |
21 | 22 | 23 | -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/iphone-xs/index.js: -------------------------------------------------------------------------------- 1 | import { get } from '../common/request' 2 | 3 | import '../common/utils' 4 | import '../common/normalize.css' 5 | import './style.css' 6 | 7 | get('https://jsonplaceholder.typicode.com/posts').then(res => { 8 | console.log(res) 9 | }) -------------------------------------------------------------------------------- /live/20200707/mpa-sample/src/iphone-xs/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #f8f9fb; 3 | font-family: system-ui; 4 | } 5 | 6 | .header { 7 | padding: 5px; 8 | color: rgba(255, 255, 255, .7); 9 | background-color: #24292e; 10 | text-align: center; 11 | } 12 | 13 | .section { 14 | display: flex; 15 | justify-content: center; 16 | align-items: center; 17 | height: 100vh; 18 | } 19 | 20 | .section:nth-of-type(2n) { 21 | background-color: #fff; 22 | } 23 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base/README.md: -------------------------------------------------------------------------------- 1 | # vue-app-base 2 | 3 | 1. 这是一个使用 Vue CLI 创建出来的 Vue 项目基础结构 4 | 2. 有所不同的是这里我移除掉了 vue-cli-service(包含 webpack 等工具的黑盒工具) 5 | 3. 这里的要求就是直接使用 webpack 以及你所了解的周边工具、Loader、Plugin 还原这个项目的打包任务 6 | 4. 尽可能的使用上所有你了解到的功能和特性 -------------------------------------------------------------------------------- /live/20200707/vue-app-base/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base/dist/img/logo.26bd86.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base/dist/img/logo.26bd86.png -------------------------------------------------------------------------------- /live/20200707/vue-app-base/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vue App Sample 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base/public/favicon.ico -------------------------------------------------------------------------------- /live/20200707/vue-app-base/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 29 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base/src/assets/logo.png -------------------------------------------------------------------------------- /live/20200707/vue-app-base/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | 4 | import './style.less' 5 | 6 | Vue.config.productionTip = false 7 | 8 | new Vue({ 9 | render: h => h(App) 10 | }).$mount('#app') 11 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base/src/style.less: -------------------------------------------------------------------------------- 1 | @bg-color: #f8f9fb; 2 | 3 | body { 4 | background-color: @bg-color; 5 | } -------------------------------------------------------------------------------- /live/20200707/vue-app-base/webpack.dev.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base/webpack.dev.js -------------------------------------------------------------------------------- /live/20200707/vue-app-base/webpack.prod.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base/webpack.prod.js -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/.env: -------------------------------------------------------------------------------- 1 | MY_FOO = bar 2 | MY_BAR = 123 -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/.env.production: -------------------------------------------------------------------------------- 1 | MY_BAR = 456 -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/README.md: -------------------------------------------------------------------------------- 1 | # vue-app-base 2 | 3 | 1. 这是一个使用 Vue CLI 创建出来的 Vue 项目基础结构 4 | 2. 有所不同的是这里我移除掉了 vue-cli-service(包含 webpack 等工具的黑盒工具) 5 | 3. 这里的要求就是直接使用 webpack 以及你所了解的周边工具、Loader、Plugin 还原这个项目的打包任务 6 | 4. 尽可能的使用上所有你了解到的功能和特性 -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/babel-preset-app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/dist/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Vue App 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/dist/logo.26bd86.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base1/dist/logo.26bd86.png -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base1/public/favicon.ico -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/src/App.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 29 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base1/src/assets/logo.png -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import logo from './assets/logo.png' 4 | console.log(logo) 5 | 6 | import './style.less' 7 | 8 | Vue.config.productionTip = false 9 | 10 | new Vue({ 11 | render: h => h(App), 12 | }).$mount('#app') 13 | -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/src/style.less: -------------------------------------------------------------------------------- 1 | @bg-color: #f8f9fb; 2 | 3 | body { 4 | background-color: @bg-color; 5 | } -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/webpack.dev.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base1/webpack.dev.js -------------------------------------------------------------------------------- /live/20200707/vue-app-base1/webpack.prod.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200707/vue-app-base1/webpack.prod.js -------------------------------------------------------------------------------- /live/20200717/code/snabbdom-demo/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | .cache 4 | -------------------------------------------------------------------------------- /live/20200717/code/snabbdom-demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Hero-List 8 | 9 | 10 | 11 |
12 | 13 | 14 | -------------------------------------------------------------------------------- /live/20200717/code/snabbdom-demo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "snabbdom-demo", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "scripts": { 7 | "dev": "parcel index.html --open", 8 | "build": "parcel build index.html" 9 | }, 10 | "dependencies": { 11 | "parcel-bundler": "^1.12.4", 12 | "snabbdom": "^1.0.1" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/.browserslistrc: -------------------------------------------------------------------------------- 1 | > 1% 2 | last 2 versions 3 | not dead 4 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/.editorconfig: -------------------------------------------------------------------------------- 1 | [*.{js,jsx,ts,tsx,vue}] 2 | indent_style = space 3 | indent_size = 2 4 | trim_trailing_whitespace = true 5 | insert_final_newline = true 6 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true 5 | }, 6 | extends: [ 7 | 'plugin:vue/essential', 8 | '@vue/standard' 9 | ], 10 | parserOptions: { 11 | parser: 'babel-eslint' 12 | }, 13 | rules: { 14 | 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 15 | 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/README.md: -------------------------------------------------------------------------------- 1 | # frontend 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 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200717/code/vue-router-hash-demo/public/favicon.ico -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/src/App.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 34 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200717/code/vue-router-hash-demo/src/assets/logo.png -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | 17 | 33 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | Vue.config.productionTip = false 6 | 7 | new Vue({ 8 | router, 9 | render: h => h(App) 10 | }).$mount('#app') 11 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /live/20200717/code/vue-router-hash-demo/src/views/Video.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | insert_final_newline = true 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 9 | 10 | [*.min.js.map] 11 | insert_final_newline = false 12 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/.node-version: -------------------------------------------------------------------------------- 1 | v12.10.0 2 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/.nvmrc: -------------------------------------------------------------------------------- 1 | v12.10.0 2 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - v12.10.0 5 | script: 6 | - npm test 7 | env: 8 | global: 9 | - BROWSER_STACK_USERNAME='snabbdombot1' 10 | - BROWSER_STACK_ACCESS_KEY='Wx2FUSehQLBf3haqHphd' 11 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "eslint.validate": [ 3 | "javascript", 4 | "javascriptreact", 5 | { 6 | "language": "typescript", 7 | "autoFix": true 8 | }, 9 | { 10 | "language": "typescriptreact", 11 | "autoFix": true 12 | } 13 | ], 14 | "eslint.options.ignorePath": ".gitignore", 15 | "liveServer.settings.port": 5501 16 | } 17 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/examples/carousel-svg/README.md: -------------------------------------------------------------------------------- 1 | This carousel example uses `style transform` and `transition` to rotate a group of SVG triangles. 2 | 3 | Also, the color of each triangle changes when you hover or click/tap it. 4 | 5 | I built the build.js using npm and browserify. 6 | 7 | In my local copy of the snabbdom project root I did these preparations: 8 | ``` 9 | npm install --save-dev babelify 10 | npm install --save-dev babel-preset-es2015 11 | echo '{ "presets": ["es2015"] }' > .babelrc 12 | ``` 13 | 14 | I then built like this: 15 | ``` 16 | browserify examples/carousel-svg/script.js -t babelify -o examples/carousel-svg/build.js 17 | ``` 18 | 19 | -- *jk* 20 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/examples/svg/script.js: -------------------------------------------------------------------------------- 1 | var snabbdom = require('../../snabbdom.js'); 2 | var patch = snabbdom.init([ 3 | require('../../modules/attributes').default, 4 | ]); 5 | var h = require('../../h.js').default; 6 | 7 | var vnode; 8 | 9 | window.addEventListener('DOMContentLoaded', () => { 10 | var container = document.getElementById('container'); 11 | var vnode = h('div', [ 12 | h('svg', {attrs: {width: 100, height: 100}}, [ 13 | h('circle', {attrs: {cx: 50, cy: 50, r: 40, stroke: 'green', 'stroke-width': 4, fill: 'yellow'}}) 14 | ]) 15 | ]); 16 | vnode = patch(container, vnode); 17 | }); 18 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200717/snabbdom/logo.png -------------------------------------------------------------------------------- /live/20200717/snabbdom/nodenv: -------------------------------------------------------------------------------- 1 | v12.10.0 2 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/perf/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Snabbdom benchmarks 6 | 7 | 8 | 9 |

See console

10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/src/is.ts: -------------------------------------------------------------------------------- 1 | export const array = Array.isArray; 2 | export function primitive(s: any): s is (string | number) { 3 | return typeof s === 'string' || typeof s === 'number'; 4 | } 5 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/src/jsx-global.d.ts: -------------------------------------------------------------------------------- 1 | import {VNode, VNodeData} from './vnode'; 2 | 3 | declare global { 4 | /** 5 | * opt-in jsx intrinsic global interfaces 6 | * see: https://www.typescriptlang.org/docs/handbook/jsx.html#type-checking 7 | */ 8 | namespace JSX { 9 | type Element = VNode; 10 | interface IntrinsicElements { 11 | [elemName: string]: VNodeData; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /live/20200717/snabbdom/src/modules/module.ts: -------------------------------------------------------------------------------- 1 | import {PreHook, CreateHook, UpdateHook, DestroyHook, RemoveHook, PostHook} from '../hooks'; 2 | 3 | export interface Module { 4 | pre: PreHook; 5 | create: CreateHook; 6 | update: UpdateHook; 7 | destroy: DestroyHook; 8 | remove: RemoveHook; 9 | post: PostHook; 10 | } 11 | -------------------------------------------------------------------------------- /live/20200717/vue/.babelrc.js: -------------------------------------------------------------------------------- 1 | const babelPresetFlowVue = { 2 | plugins: [ 3 | require('@babel/plugin-proposal-class-properties'), 4 | // require('@babel/plugin-syntax-flow'), // not needed, included in transform-flow-strip-types 5 | require('@babel/plugin-transform-flow-strip-types') 6 | ] 7 | } 8 | 9 | module.exports = { 10 | presets: [ 11 | require('@babel/preset-env'), 12 | // require('babel-preset-flow-vue') 13 | babelPresetFlowVue 14 | ], 15 | plugins: [ 16 | require('babel-plugin-transform-vue-jsx'), 17 | require('@babel/plugin-syntax-dynamic-import') 18 | ], 19 | ignore: [ 20 | 'dist/*.js', 21 | 'packages/**/*.js' 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /live/20200717/vue/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | indent_style = space 8 | indent_size = 2 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | insert_final_newline = false 15 | trim_trailing_whitespace = false 16 | -------------------------------------------------------------------------------- /live/20200717/vue/.eslintignore: -------------------------------------------------------------------------------- 1 | flow 2 | dist 3 | packages 4 | -------------------------------------------------------------------------------- /live/20200717/vue/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | parserOptions: { 4 | parser: require.resolve('babel-eslint'), 5 | ecmaVersion: 2018, 6 | sourceType: 'module' 7 | }, 8 | env: { 9 | es6: true, 10 | node: true, 11 | browser: true 12 | }, 13 | plugins: [ 14 | "flowtype" 15 | ], 16 | extends: [ 17 | "eslint:recommended", 18 | "plugin:flowtype/recommended" 19 | ], 20 | globals: { 21 | "__WEEX__": true, 22 | "WXEnvironment": true 23 | }, 24 | rules: { 25 | 'no-console': process.env.NODE_ENV !== 'production' ? 0 : 2, 26 | 'no-useless-escape': 0, 27 | 'no-empty': 0 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /live/20200717/vue/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | *.log 4 | explorations 5 | TODOs.md 6 | dist/*.gz 7 | dist/*.map 8 | dist/vue.common.min.js 9 | test/e2e/reports 10 | test/e2e/screenshots 11 | coverage 12 | RELEASE_NOTE*.md 13 | dist/*.js 14 | packages/vue-server-renderer/basic.js 15 | packages/vue-server-renderer/build.js 16 | packages/vue-server-renderer/server-plugin.js 17 | packages/vue-server-renderer/client-plugin.js 18 | packages/vue-template-compiler/build.js 19 | .vscode 20 | -------------------------------------------------------------------------------- /live/20200717/vue/benchmarks/big-table/demo.css: -------------------------------------------------------------------------------- 1 | form { 2 | margin-bottom: 15px; 3 | } 4 | 5 | td.hidden { 6 | color: #ccc; 7 | } 8 | 9 | table.filtered td.item { 10 | background-color: #FFFFBF; 11 | } 12 | 13 | table.filtered td.item.hidden { 14 | background-color: transparent; 15 | } 16 | -------------------------------------------------------------------------------- /live/20200717/vue/benchmarks/dbmon/app.js: -------------------------------------------------------------------------------- 1 | var app = new Vue({ 2 | el: '#app', 3 | data: { 4 | databases: [] 5 | } 6 | }) 7 | 8 | function loadSamples() { 9 | app.databases = Object.freeze(ENV.generateData().toArray()); 10 | Monitoring.renderRate.ping(); 11 | setTimeout(loadSamples, ENV.timeout); 12 | } 13 | 14 | loadSamples() 15 | -------------------------------------------------------------------------------- /live/20200717/vue/benchmarks/ssr/renderToString.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | process.env.NODE_ENV = 'production' 4 | 5 | const Vue = require('../../dist/vue.runtime.common.js') 6 | const createRenderer = require('../../packages/vue-server-renderer').createRenderer 7 | const renderToString = createRenderer().renderToString 8 | const gridComponent = require('./common.js') 9 | 10 | console.log('--- renderToString --- ') 11 | const self = (global || root) 12 | self.s = self.performance.now() 13 | 14 | renderToString(new Vue(gridComponent), (err, res) => { 15 | if (err) throw err 16 | // console.log(res) 17 | console.log('Complete time: ' + (self.performance.now() - self.s).toFixed(2) + 'ms') 18 | console.log() 19 | }) 20 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/02-debug/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Runtime+Compiler 7 | 8 | 9 |
10 | Hello World 11 |
12 | 13 | 14 | 24 | 25 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/03-initVue/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | initVue 7 | 8 | 9 |
10 |

Hello World

11 | {{ msg }} 12 |
13 | 14 | 15 | 23 | 24 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/04-observe/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | observe 7 | 8 | 9 |
10 |

{{ msg }}

11 | 12 | {{ msg }} 13 | 14 |
15 | 16 | {{ count }} 17 |
18 | 19 | 20 | 29 | 30 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/05-observe-arr/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | observe 7 | 8 | 9 |
10 | {{ arr }} 11 |
12 | 13 | 14 | 27 | 28 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/06-set/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | set 7 | 8 | 9 |
10 | {{ obj.title }} 11 |
12 | {{ obj.name }} 13 |
14 | {{ arr }} 15 |
16 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/14-component/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 |
10 |
11 | 12 | 23 | 24 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/18-test/index.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |
    4 |
  • {{ item }}
  • 5 |
6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/firebase/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Helvetica, Arial, sans-serif; 3 | } 4 | 5 | ul { 6 | padding: 0; 7 | } 8 | 9 | .user { 10 | height: 30px; 11 | line-height: 30px; 12 | padding: 10px; 13 | border-top: 1px solid #eee; 14 | overflow: hidden; 15 | transition: all .25s ease; 16 | } 17 | 18 | .user:last-child { 19 | border-bottom: 1px solid #eee; 20 | } 21 | 22 | .v-enter, .v-leave-to { 23 | height: 0; 24 | padding-top: 0; 25 | padding-bottom: 0; 26 | border-top-width: 0; 27 | border-bottom-width: 0; 28 | } 29 | 30 | .errors { 31 | color: #f00; 32 | } 33 | -------------------------------------------------------------------------------- /live/20200717/vue/examples/markdown/style.css: -------------------------------------------------------------------------------- 1 | html, body, #editor { 2 | margin: 0; 3 | height: 100%; 4 | font-family: 'Helvetica Neue', Arial, sans-serif; 5 | color: #333; 6 | } 7 | 8 | textarea, #editor div { 9 | display: inline-block; 10 | width: 49%; 11 | height: 100%; 12 | vertical-align: top; 13 | -webkit-box-sizing: border-box; 14 | -moz-box-sizing: border-box; 15 | box-sizing: border-box; 16 | padding: 0 20px; 17 | } 18 | 19 | textarea { 20 | border: none; 21 | border-right: 1px solid #ccc; 22 | resize: none; 23 | outline: none; 24 | background-color: #f6f6f6; 25 | font-size: 14px; 26 | font-family: 'Monaco', courier, monospace; 27 | padding: 20px; 28 | } 29 | 30 | code { 31 | color: #f66; 32 | } -------------------------------------------------------------------------------- /live/20200717/vue/examples/svg/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Helvetica Neue, Arial, sans-serif; 3 | } 4 | 5 | polygon { 6 | fill: #42b983; 7 | opacity: .75; 8 | } 9 | 10 | circle { 11 | fill: transparent; 12 | stroke: #999; 13 | } 14 | 15 | text { 16 | font-family: Helvetica Neue, Arial, sans-serif; 17 | font-size: 10px; 18 | fill: #666; 19 | } 20 | 21 | label { 22 | display: inline-block; 23 | margin-left: 10px; 24 | width: 20px; 25 | } 26 | 27 | #raw { 28 | position: absolute; 29 | top: 0; 30 | left: 300px; 31 | } -------------------------------------------------------------------------------- /live/20200717/vue/flow/ssr.js: -------------------------------------------------------------------------------- 1 | declare type ComponentWithCacheContext = { 2 | type: 'ComponentWithCache'; 3 | bufferIndex: number; 4 | buffer: Array; 5 | key: string; 6 | }; 7 | 8 | declare type ElementContext = { 9 | type: 'Element'; 10 | children: Array; 11 | rendered: number; 12 | endTag: string; 13 | total: number; 14 | }; 15 | 16 | declare type ComponentContext = { 17 | type: 'Component'; 18 | prevActive: Component; 19 | }; 20 | 21 | declare type RenderState = ComponentContext | ComponentWithCacheContext | ElementContext; 22 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/vue-server-renderer/README.md: -------------------------------------------------------------------------------- 1 | # vue-server-renderer 2 | 3 | > This package is auto-generated. For pull requests please see [src/platforms/web/entry-server-renderer.js](https://github.com/vuejs/vue/blob/dev/src/platforms/web/entry-server-renderer.js). 4 | 5 | This package offers Node.js server-side rendering for Vue 2.0. 6 | 7 | - [API Reference](https://ssr.vuejs.org/en/api.html) 8 | - [Vue.js Server-Side Rendering Guide](https://ssr.vuejs.org) 9 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/vue-server-renderer/client-plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { WebpackPlugin } from './types/plugin'; 2 | declare const Plugin: WebpackPlugin; 3 | export = Plugin; 4 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/vue-server-renderer/index.js: -------------------------------------------------------------------------------- 1 | try { 2 | var vueVersion = require('vue').version 3 | } catch (e) {} 4 | 5 | var packageName = require('./package.json').name 6 | var packageVersion = require('./package.json').version 7 | if (vueVersion && vueVersion !== packageVersion) { 8 | throw new Error( 9 | '\n\nVue packages version mismatch:\n\n' + 10 | '- vue@' + vueVersion + '\n' + 11 | '- ' + packageName + '@' + packageVersion + '\n\n' + 12 | 'This may cause things to work incorrectly. Make sure to use the same version for both.\n' 13 | ) 14 | } 15 | 16 | if (process.env.NODE_ENV === 'production') { 17 | module.exports = require('./build.prod.js') 18 | } else { 19 | module.exports = require('./build.dev.js') 20 | } 21 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/vue-server-renderer/server-plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { WebpackPlugin } from './types/plugin'; 2 | declare const Plugin: WebpackPlugin; 3 | export = Plugin; 4 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/vue-server-renderer/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Plugin } from 'webpack'; 2 | 3 | interface WebpackPluginOptions { 4 | filename?: string; 5 | } 6 | 7 | export interface WebpackPlugin { 8 | new (options?: WebpackPluginOptions): Plugin; 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/vue-server-renderer/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "strict": true, 7 | "noEmit": true 8 | }, 9 | "compileOnSave": false, 10 | "include": [ 11 | "**/*.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/vue-template-compiler/types/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "strict": true, 7 | "noEmit": true 8 | }, 9 | "compileOnSave": false, 10 | "include": [ 11 | "**/*.ts" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/weex-template-compiler/README.md: -------------------------------------------------------------------------------- 1 | # weex-template-compiler 2 | 3 | > This package is auto-generated. For pull requests please see [src/platforms/weex/entry-compiler.js](https://github.com/vuejs/vue/tree/dev/src/platforms/weex/entry-compiler.js). 4 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/weex-template-compiler/index.js: -------------------------------------------------------------------------------- 1 | try { 2 | var vueVersion = require('weex-vue-framework').version 3 | } catch (e) {} 4 | 5 | var packageName = require('./package.json').name 6 | var packageVersion = require('./package.json').version 7 | if (vueVersion && vueVersion !== packageVersion) { 8 | throw new Error( 9 | '\n\nVue packages version mismatch:\n\n' + 10 | '- vue@' + vueVersion + '\n' + 11 | '- ' + packageName + '@' + packageVersion + '\n\n' + 12 | 'This may cause things to work incorrectly. Make sure to use the same version for both.\n' + 13 | 'If you are using weex-vue-loader, re-installing them should bump ' + packageName + ' to the latest.\n' 14 | ) 15 | } 16 | 17 | module.exports = require('./build') 18 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/weex-template-compiler/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weex-template-compiler", 3 | "version": "2.4.2-weex.1", 4 | "description": "Weex template compiler for Vue 2.0", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vuejs/vue.git" 9 | }, 10 | "keywords": [ 11 | "vue", 12 | "compiler" 13 | ], 14 | "author": "Evan You", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/vuejs/vue/issues" 18 | }, 19 | "homepage": "https://github.com/vuejs/vue/tree/dev/packages/weex-template-compiler#readme", 20 | "dependencies": { 21 | "acorn": "^5.2.1", 22 | "escodegen": "^1.8.1", 23 | "he": "^1.1.0" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/weex-vue-framework/README.md: -------------------------------------------------------------------------------- 1 | # weex-vue-framework 2 | 3 | > This package is auto-generated. For pull requests please see [src/platforms/weex/entry-framework.js](https://github.com/vuejs/vue/blob/dev/src/platforms/weex/entry-framework.js). 4 | -------------------------------------------------------------------------------- /live/20200717/vue/packages/weex-vue-framework/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weex-vue-framework", 3 | "version": "2.4.2-weex.1", 4 | "description": "Vue 2.0 Framework for Weex", 5 | "main": "index.js", 6 | "repository": { 7 | "type": "git", 8 | "url": "git+https://github.com/vuejs/vue.git" 9 | }, 10 | "keywords": [ 11 | "vue", 12 | "compiler" 13 | ], 14 | "author": "Evan You", 15 | "license": "MIT", 16 | "bugs": { 17 | "url": "https://github.com/vuejs/vue/issues" 18 | }, 19 | "homepage": "https://github.com/vuejs/vue/tree/dev/packages/weex-vue-framework#readme" 20 | } 21 | -------------------------------------------------------------------------------- /live/20200717/vue/scripts/alias.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | const resolve = p => path.resolve(__dirname, '../', p) 4 | 5 | module.exports = { 6 | vue: resolve('src/platforms/web/entry-runtime-with-compiler'), 7 | compiler: resolve('src/compiler'), 8 | core: resolve('src/core'), 9 | shared: resolve('src/shared'), 10 | web: resolve('src/platforms/web'), 11 | weex: resolve('src/platforms/weex'), 12 | server: resolve('src/server'), 13 | sfc: resolve('src/sfc') 14 | } 15 | -------------------------------------------------------------------------------- /live/20200717/vue/scripts/feature-flags.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | NEW_SLOT_SYNTAX: true, 3 | VBIND_PROP_SHORTHAND: false 4 | } 5 | -------------------------------------------------------------------------------- /live/20200717/vue/scripts/gen-release-note.js: -------------------------------------------------------------------------------- 1 | const version = process.argv[2] || process.env.VERSION 2 | const cc = require('conventional-changelog') 3 | const file = `./RELEASE_NOTE${version ? `_${version}` : ``}.md` 4 | const fileStream = require('fs').createWriteStream(file) 5 | 6 | cc({ 7 | preset: 'angular', 8 | pkg: { 9 | transform (pkg) { 10 | pkg.version = `v${version}` 11 | return pkg 12 | } 13 | } 14 | }).pipe(fileStream).on('close', () => { 15 | console.log(`Generated release note at ${file}`) 16 | }) 17 | -------------------------------------------------------------------------------- /live/20200717/vue/scripts/git-hooks/commit-msg: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Validate commit log 4 | commit_regex='^Merge.+|(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert|types)(\(.+\))?: .{1,50}' 5 | 6 | if ! grep -iqE "$commit_regex" "$1"; then 7 | echo 8 | echo " Error: proper commit message format is required for automated changelog generation." 9 | echo 10 | echo " - Use \`npm run commit\` to interactively generate a commit message." 11 | echo " - See .github/COMMIT_CONVENTION.md for more details." 12 | echo 13 | exit 1 14 | fi 15 | -------------------------------------------------------------------------------- /live/20200717/vue/scripts/git-hooks/pre-commit: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | files_to_lint=$(git diff --cached --name-only --diff-filter=ACM | grep '\.js$') 4 | 5 | if [ -n "$files_to_lint" ]; then 6 | NODE_ENV=production eslint --quiet $files_to_lint 7 | fi 8 | -------------------------------------------------------------------------------- /live/20200717/vue/src/compiler/directives/bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function bind (el: ASTElement, dir: ASTDirective) { 4 | el.wrapData = (code: string) => { 5 | return `_b(${code},'${el.tag}',${dir.value},${ 6 | dir.modifiers && dir.modifiers.prop ? 'true' : 'false' 7 | }${ 8 | dir.modifiers && dir.modifiers.sync ? ',true' : '' 9 | })` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /live/20200717/vue/src/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import on from './on' 4 | import bind from './bind' 5 | import { noop } from 'shared/util' 6 | 7 | export default { 8 | on, 9 | bind, 10 | cloak: noop 11 | } 12 | -------------------------------------------------------------------------------- /live/20200717/vue/src/compiler/directives/on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export default function on (el: ASTElement, dir: ASTDirective) { 6 | if (process.env.NODE_ENV !== 'production' && dir.modifiers) { 7 | warn(`v-on without argument does not support modifiers.`) 8 | } 9 | el.wrapListeners = (code: string) => `_g(${code},${dir.value})` 10 | } 11 | -------------------------------------------------------------------------------- /live/20200717/vue/src/compiler/parser/entity-decoder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let decoder 4 | 5 | export default { 6 | decode (html: string): string { 7 | decoder = decoder || document.createElement('div') 8 | decoder.innerHTML = html 9 | return decoder.textContent 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/components/index.js: -------------------------------------------------------------------------------- 1 | import KeepAlive from './keep-alive' 2 | 3 | export default { 4 | KeepAlive 5 | } 6 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/global-api/mixin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { mergeOptions } from '../util/index' 4 | 5 | export function initMixin (Vue: GlobalAPI) { 6 | Vue.mixin = function (mixin: Object) { 7 | this.options = mergeOptions(this.options, mixin) 8 | return this 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/instance/render-helpers/resolve-filter.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { identity, resolveAsset } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for resolving filters 7 | */ 8 | export function resolveFilter (id: string): Function { 9 | return resolveAsset(this.$options, 'filters', id, true) || identity 10 | } 11 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from 'shared/util' 4 | export * from './lang' 5 | export * from './env' 6 | export * from './options' 7 | export * from './debug' 8 | export * from './props' 9 | export * from './error' 10 | export * from './next-tick' 11 | export { defineReactive } from '../observer/index' 12 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/util/perf.js: -------------------------------------------------------------------------------- 1 | import { inBrowser } from './env' 2 | 3 | export let mark 4 | export let measure 5 | 6 | if (process.env.NODE_ENV !== 'production') { 7 | const perf = inBrowser && window.performance 8 | /* istanbul ignore if */ 9 | if ( 10 | perf && 11 | perf.mark && 12 | perf.measure && 13 | perf.clearMarks && 14 | perf.clearMeasures 15 | ) { 16 | mark = tag => perf.mark(tag) 17 | measure = (name, startTag, endTag) => { 18 | perf.measure(name, startTag, endTag) 19 | perf.clearMarks(startTag) 20 | perf.clearMarks(endTag) 21 | // perf.clearMeasures(name) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/vdom/helpers/get-first-component-child.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { isDef } from 'shared/util' 4 | import { isAsyncPlaceholder } from './is-async-placeholder' 5 | 6 | export function getFirstComponentChild (children: ?Array): ?VNode { 7 | if (Array.isArray(children)) { 8 | for (let i = 0; i < children.length; i++) { 9 | const c = children[i] 10 | if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { 11 | return c 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/vdom/helpers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from './merge-hook' 4 | export * from './extract-props' 5 | export * from './update-listeners' 6 | export * from './normalize-children' 7 | export * from './resolve-async-component' 8 | export * from './get-first-component-child' 9 | export * from './is-async-placeholder' 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/vdom/helpers/is-async-placeholder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function isAsyncPlaceholder (node: VNode): boolean { 4 | return node.isComment && node.asyncFactory 5 | } 6 | -------------------------------------------------------------------------------- /live/20200717/vue/src/core/vdom/modules/index.js: -------------------------------------------------------------------------------- 1 | import directives from './directives' 2 | import ref from './ref' 3 | 4 | export default [ 5 | ref, 6 | directives 7 | ] 8 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/compiler/directives/html.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function html (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'innerHTML', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import text from './text' 3 | import html from './html' 4 | 5 | export default { 6 | model, 7 | text, 8 | html 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/compiler/directives/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function text (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'textContent', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from './options' 4 | import { createCompiler } from 'compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { compile, compileToFunctions } 9 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import model from './model' 4 | 5 | export default [ 6 | klass, 7 | style, 8 | model 9 | ] 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/compiler/options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isPreTag, 5 | mustUseProp, 6 | isReservedTag, 7 | getTagNamespace 8 | } from '../util/index' 9 | 10 | import modules from './modules/index' 11 | import directives from './directives/index' 12 | import { genStaticKeys } from 'shared/util' 13 | import { isUnaryTag, canBeLeftOpenTag } from './util' 14 | 15 | export const baseOptions: CompilerOptions = { 16 | expectHTML: true, 17 | modules, 18 | directives, 19 | isPreTag, 20 | isUnaryTag, 21 | mustUseProp, 22 | canBeLeftOpenTag, 23 | isReservedTag, 24 | getTagNamespace, 25 | staticKeys: genStaticKeys(modules) 26 | } 27 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/entry-compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { parseComponent } from 'sfc/parser' 4 | export { compile, compileToFunctions } from './compiler/index' 5 | export { ssrCompile, ssrCompileToFunctions } from './server/compiler' 6 | export { generateCodeFrame } from 'compiler/codeframe' 7 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/entry-runtime.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from './runtime/index' 4 | 5 | export default Vue 6 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/entry-server-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import modules from './server/modules/index' 4 | import directives from './server/directives/index' 5 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 6 | import { createBasicRenderer } from 'server/create-basic-renderer' 7 | 8 | export default createBasicRenderer({ 9 | modules, 10 | directives, 11 | isUnaryTag, 12 | canBeLeftOpenTag 13 | }) 14 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Transition from './transition' 2 | import TransitionGroup from './transition-group' 3 | 4 | export default { 5 | Transition, 6 | TransitionGroup 7 | } 8 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import show from './show' 3 | 4 | export default { 5 | model, 6 | show 7 | } 8 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import domProps from './dom-props' 5 | import style from './style' 6 | import transition from './transition' 7 | 8 | export default [ 9 | attrs, 10 | klass, 11 | events, 12 | domProps, 13 | style, 14 | transition 15 | ] 16 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'web/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'web/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ nodeOps, modules }) 13 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/server/compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from '../compiler/options' 4 | import { createCompiler } from 'server/optimizing-compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { 9 | compile as ssrCompile, 10 | compileToFunctions as ssrCompileToFunctions 11 | } 12 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/server/directives/index.js: -------------------------------------------------------------------------------- 1 | import show from './show' 2 | import model from './model' 3 | 4 | export default { 5 | show, 6 | model 7 | } 8 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/server/directives/show.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function show (node: VNodeWithData, dir: VNodeDirective) { 4 | if (!dir.value) { 5 | const style: any = node.data.style || (node.data.style = {}) 6 | if (Array.isArray(style)) { 7 | style.push({ display: 'none' }) 8 | } else { 9 | style.display = 'none' 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/server/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { escape } from '../util' 4 | import { genClassForVnode } from 'web/util/index' 5 | 6 | export default function renderClass (node: VNodeWithData): ?string { 7 | const classList = genClassForVnode(node) 8 | if (classList !== '') { 9 | return ` class="${escape(classList)}"` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/server/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import domProps from './dom-props' 3 | import klass from './class' 4 | import style from './style' 5 | 6 | export default [ 7 | attrs, 8 | domProps, 9 | klass, 10 | style 11 | ] 12 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/util/compat.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { inBrowser } from 'core/util/index' 4 | 5 | // check whether current browser encodes a char inside attribute values 6 | let div 7 | function getShouldDecode (href: boolean): boolean { 8 | div = div || document.createElement('div') 9 | div.innerHTML = href ? `` : `
` 10 | return div.innerHTML.indexOf(' ') > 0 11 | } 12 | 13 | // #3663: IE encodes newlines inside attribute values while other browsers don't 14 | export const shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false 15 | // #6828: chrome encodes content in a[href] 16 | export const shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false 17 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/web/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export * from './attrs' 6 | export * from './class' 7 | export * from './element' 8 | 9 | /** 10 | * Query an element selector if it's not an element already. 11 | */ 12 | export function query (el: string | Element): Element { 13 | if (typeof el === 'string') { 14 | const selected = document.querySelector(el) 15 | if (!selected) { 16 | process.env.NODE_ENV !== 'production' && warn( 17 | 'Cannot find element: ' + el 18 | ) 19 | return document.createElement('div') 20 | } 21 | return selected 22 | } else { 23 | return el 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | 3 | export default { 4 | model 5 | } 6 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import props from './props' 4 | import append from './append' 5 | import recycleList from './recycle-list/index' 6 | 7 | export default [ 8 | recycleList, 9 | klass, 10 | style, 11 | props, 12 | append 13 | ] 14 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/compiler/modules/recycle-list/component-root.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | // mark component root nodes as 6 | export function postTransformComponentRoot (el: ASTElement) { 7 | if (!el.parent) { 8 | // component root 9 | addAttr(el, '@isComponentRoot', 'true') 10 | addAttr(el, '@templateId', '_uid') 11 | addAttr(el, '@componentProps', '$props || {}') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/compiler/modules/recycle-list/component.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | import { RECYCLE_LIST_MARKER } from 'weex/util/index' 5 | 6 | // mark components as inside recycle-list so that we know we need to invoke 7 | // their special @render function instead of render in create-component.js 8 | export function postTransformComponent ( 9 | el: ASTElement, 10 | options: WeexCompilerOptions 11 | ) { 12 | // $flow-disable-line (we know isReservedTag is there) 13 | if (!options.isReservedTag(el.tag) && el.tag !== 'cell-slot') { 14 | addAttr(el, RECYCLE_LIST_MARKER, 'true') 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/compiler/modules/recycle-list/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | function genText (node: ASTNode) { 6 | const value = node.type === 3 7 | ? node.text 8 | : node.type === 2 9 | ? node.tokens.length === 1 10 | ? node.tokens[0] 11 | : node.tokens 12 | : '' 13 | return JSON.stringify(value) 14 | } 15 | 16 | export function postTransformText (el: ASTElement) { 17 | // weex can only contain text, so the parser 18 | // always generates a single child. 19 | if (el.children.length) { 20 | addAttr(el, 'value', genText(el.children[0])) 21 | el.children = [] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/compiler/modules/recycle-list/v-once.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 4 | 5 | function containVOnce (el: ASTElement): boolean { 6 | for (const attr in el.attrsMap) { 7 | if (/^v\-once$/i.test(attr)) { 8 | return true 9 | } 10 | } 11 | return false 12 | } 13 | 14 | export function preTransformVOnce (el: ASTElement) { 15 | if (containVOnce(el)) { 16 | getAndRemoveAttr(el, 'v-once', true) 17 | addRawAttr(el, '[[once]]', true) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/entry-compiler.js: -------------------------------------------------------------------------------- 1 | export { compile } from 'weex/compiler/index' 2 | export { generateCodeFrame } from 'compiler/codeframe' 3 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/entry-runtime-factory.js: -------------------------------------------------------------------------------- 1 | // this entry is built and wrapped with a factory function 2 | // used to generate a fresh copy of Vue for every Weex instance. 3 | 4 | import Vue from './runtime/index' 5 | 6 | exports.Vue = Vue 7 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Richtext from './richtext' 2 | import Transition from './transition' 3 | import TransitionGroup from './transition-group' 4 | 5 | export default { 6 | Richtext, 7 | Transition, 8 | TransitionGroup 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/runtime/components/transition.js: -------------------------------------------------------------------------------- 1 | // reuse same transition component logic from web 2 | export { 3 | transitionProps, 4 | extractTransitionData 5 | } from 'web/runtime/components/transition' 6 | 7 | import Transition from 'web/runtime/components/transition' 8 | 9 | export default Transition 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | } 3 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import style from './style' 5 | import transition from './transition' 6 | 7 | export default [ 8 | attrs, 9 | klass, 10 | events, 11 | style, 12 | transition 13 | ] 14 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'weex/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'weex/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ 13 | nodeOps, 14 | modules, 15 | LONG_LIST_THRESHOLD: 10 16 | }) 17 | -------------------------------------------------------------------------------- /live/20200717/vue/src/platforms/weex/runtime/text-node.js: -------------------------------------------------------------------------------- 1 | let latestNodeId = 1 2 | 3 | export default function TextNode (text) { 4 | this.instanceId = '' 5 | this.nodeId = latestNodeId++ 6 | this.parentNode = null 7 | this.nodeType = 3 8 | this.text = text 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/src/server/optimizing-compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from 'compiler/parser/index' 4 | import { generate } from './codegen' 5 | import { optimize } from './optimizer' 6 | import { createCompilerCreator } from 'compiler/create-compiler' 7 | 8 | export const createCompiler = createCompilerCreator(function baseCompile ( 9 | template: string, 10 | options: CompilerOptions 11 | ): CompiledResult { 12 | const ast = parse(template.trim(), options) 13 | optimize(ast, options) 14 | const code = generate(ast, options) 15 | return { 16 | ast, 17 | render: code.render, 18 | staticRenderFns: code.staticRenderFns 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /live/20200717/vue/src/server/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const isJS = (file: string): boolean => /\.js(\?[^.]+)?$/.test(file) 4 | 5 | export const isCSS = (file: string): boolean => /\.css(\?[^.]+)?$/.test(file) 6 | 7 | export function createPromiseCallback () { 8 | let resolve, reject 9 | const promise: Promise = new Promise((_resolve, _reject) => { 10 | resolve = _resolve 11 | reject = _reject 12 | }) 13 | const cb = (err: Error, res?: string) => { 14 | if (err) return reject(err) 15 | resolve(res || '') 16 | } 17 | return { promise, cb } 18 | } 19 | -------------------------------------------------------------------------------- /live/20200717/vue/src/shared/constants.js: -------------------------------------------------------------------------------- 1 | export const SSR_ATTR = 'data-server-rendered' 2 | 3 | export const ASSET_TYPES = [ 4 | 'component', 5 | 'directive', 6 | 'filter' 7 | ] 8 | 9 | export const LIFECYCLE_HOOKS = [ 10 | 'beforeCreate', 11 | 'created', 12 | 'beforeMount', 13 | 'mounted', 14 | 'beforeUpdate', 15 | 'updated', 16 | 'beforeDestroy', 17 | 'destroyed', 18 | 'activated', 19 | 'deactivated', 20 | 'errorCaptured', 21 | 'serverPrefetch' 22 | ] 23 | -------------------------------------------------------------------------------- /live/20200717/vue/test/e2e/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "indent": 0 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /live/20200717/vue/test/e2e/specs/basic-ssr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
wtf
12 | 13 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /live/20200717/vue/test/e2e/specs/basic-ssr.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'basic SSR': function (browser) { 3 | browser 4 | .url('http://localhost:8080/test/e2e/specs/basic-ssr.html') 5 | .assert.containsText('#result', '
foo
') 6 | .end() 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /live/20200717/vue/test/helpers/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jasmine": true 4 | }, 5 | "globals": { 6 | "waitForUpdate": true 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /live/20200717/vue/test/helpers/classlist.js: -------------------------------------------------------------------------------- 1 | beforeEach(() => { 2 | jasmine.addMatchers({ 3 | // since classList may not be supported in all browsers 4 | toHaveClass: () => { 5 | return { 6 | compare: (el, cls) => { 7 | const pass = el.classList 8 | ? el.classList.contains(cls) 9 | : el.getAttribute('class').split(/\s+/g).indexOf(cls) > -1 10 | return { 11 | pass, 12 | message: `Expected element${pass ? ' ' : ' not '}to have class ${cls}` 13 | } 14 | } 15 | } 16 | } 17 | }) 18 | }) 19 | -------------------------------------------------------------------------------- /live/20200717/vue/test/helpers/test-object-option.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | export default function testObjectOption (name) { 4 | it(`Options ${name}: should warn non object value`, () => { 5 | const options = {} 6 | options[name] = () => {} 7 | new Vue(options) 8 | expect(`Invalid value for option "${name}"`).toHaveBeenWarned() 9 | }) 10 | 11 | it(`Options ${name}: should not warn valid object value`, () => { 12 | const options = {} 13 | options[name] = {} 14 | new Vue(options) 15 | expect(`Invalid value for option "${name}"`).not.toHaveBeenWarned() 16 | }) 17 | } 18 | -------------------------------------------------------------------------------- /live/20200717/vue/test/helpers/to-equal.js: -------------------------------------------------------------------------------- 1 | import { isEqual } from 'lodash' 2 | 3 | beforeEach(() => { 4 | jasmine.addMatchers({ 5 | // override built-in toEqual because it behaves incorrectly 6 | // on Vue-observed arrays in Safari 7 | toEqual: () => { 8 | return { 9 | compare: (a, b) => { 10 | const pass = isEqual(a, b) 11 | return { 12 | pass, 13 | message: `Expected ${a} to equal ${b}` 14 | } 15 | } 16 | } 17 | } 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /live/20200717/vue/test/helpers/trigger-event.js: -------------------------------------------------------------------------------- 1 | window.triggerEvent = function triggerEvent (target, event, process) { 2 | const e = document.createEvent('HTMLEvents') 3 | e.initEvent(event, true, true) 4 | if (event === 'click') { 5 | e.button = 0 6 | } 7 | if (process) process(e) 8 | target.dispatchEvent(e) 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/test/helpers/vdom.js: -------------------------------------------------------------------------------- 1 | import VNode from 'core/vdom/vnode' 2 | 3 | window.createTextVNode = function (text) { 4 | return new VNode(undefined, undefined, undefined, text) 5 | } 6 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jasmine": true 4 | }, 5 | "plugins": ["jasmine"], 6 | "rules": { 7 | "jasmine/no-focused-tests": 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/async-loader.js: -------------------------------------------------------------------------------- 1 | const hash = require('hash-sum') 2 | 3 | module.exports = function (code) { 4 | const id = hash(this.request) // simulating vue-loader module id injection 5 | return code.replace('__MODULE_ID__', id) 6 | } 7 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/app.js: -------------------------------------------------------------------------------- 1 | import Vue from '../../../dist/vue.runtime.common.js' 2 | 3 | export default context => { 4 | return new Promise(resolve => { 5 | context.msg = 'hello' 6 | resolve(new Vue({ 7 | render (h) { 8 | return h('div', context.url) 9 | } 10 | })) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/async-bar.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | beforeCreate () { 3 | this.$vnode.ssrContext._registeredComponents.add('__MODULE_ID__') 4 | }, 5 | render (h) { 6 | return h('div', 'async bar') 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/async-foo.js: -------------------------------------------------------------------------------- 1 | // import image and font 2 | import './test.css' 3 | import font from './test.woff2' 4 | import image from './test.png' 5 | 6 | export default { 7 | beforeCreate () { 8 | this.$vnode.ssrContext._registeredComponents.add('__MODULE_ID__') 9 | }, 10 | render (h) { 11 | return h('div', `async ${font} ${image}`) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/cache-opt-out.js: -------------------------------------------------------------------------------- 1 | import Vue from '../../../dist/vue.runtime.common.js' 2 | 3 | const app = { 4 | name: 'app', 5 | props: ['id'], 6 | serverCacheKey: props => props.id === 1 ? false : props.id, 7 | render (h) { 8 | return h('div', '/test') 9 | } 10 | } 11 | 12 | export default () => { 13 | return Promise.resolve(new Vue({ 14 | render: h => h(app, { props: { id: 1 }}) 15 | })) 16 | } 17 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/cache.js: -------------------------------------------------------------------------------- 1 | import Vue from '../../../dist/vue.runtime.common.js' 2 | 3 | const app = { 4 | name: 'app', 5 | props: ['id'], 6 | serverCacheKey: props => props.id, 7 | render (h) { 8 | return h('div', '/test') 9 | } 10 | } 11 | 12 | export default () => { 13 | return Promise.resolve(new Vue({ 14 | render: h => h(app, { props: { id: 1 }}) 15 | })) 16 | } 17 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/error.js: -------------------------------------------------------------------------------- 1 | throw new Error('foo') 2 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/promise-rejection.js: -------------------------------------------------------------------------------- 1 | export default () => { 2 | return Promise.reject(new Error('foo')) 3 | } 4 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/split.js: -------------------------------------------------------------------------------- 1 | import Vue from '../../../dist/vue.runtime.common.js' 2 | 3 | // async component! 4 | const Foo = () => import('./async-foo') 5 | const Bar = () => import('./async-bar') // eslint-disable-line 6 | 7 | export default context => { 8 | return new Promise(resolve => { 9 | context.msg = 'hello' 10 | const vm = new Vue({ 11 | render (h) { 12 | return h('div', [ 13 | context.url, 14 | h(Foo) 15 | ]) 16 | } 17 | }) 18 | 19 | // simulate router.onReady 20 | Foo().then(comp => { 21 | // resolve now to make the render sync 22 | Foo.resolved = Vue.extend(comp.default) 23 | resolve(vm) 24 | }) 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/test.css: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200717/vue/test/ssr/fixtures/test.css -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200717/vue/test/ssr/fixtures/test.png -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/fixtures/test.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200717/vue/test/ssr/fixtures/test.woff2 -------------------------------------------------------------------------------- /live/20200717/vue/test/ssr/jasmine.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | spec_dir: 'test/ssr', 3 | spec_files: [ 4 | '*.spec.js' 5 | ], 6 | helpers: [ 7 | require.resolve('@babel/register'), 8 | '../helpers/to-have-been-warned.js' 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jasmine": true 4 | }, 5 | "globals": { 6 | "waitForUpdate": true, 7 | "triggerEvent": true, 8 | "createTextVNode": true 9 | }, 10 | "plugins": ["jasmine"], 11 | "rules": { 12 | "jasmine/no-focused-tests": 2, 13 | "no-unused-vars": 0 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/features/directives/cloak.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | describe('Directive v-cloak', () => { 4 | it('should be removed after compile', () => { 5 | const el = document.createElement('div') 6 | el.setAttribute('v-cloak', '') 7 | const vm = new Vue({ el }) 8 | expect(vm.$el.hasAttribute('v-cloak')).toBe(false) 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/features/directives/model-file.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | describe('Directive v-model file', () => { 4 | it('warn to use @change instead', () => { 5 | new Vue({ 6 | data: { 7 | file: '' 8 | }, 9 | template: '' 10 | }).$mount() 11 | expect('Use a v-on:change listener instead').toHaveBeenWarned() 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/features/global-api/compile.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | describe('Global API: compile', () => { 4 | it('should compile render functions', () => { 5 | const res = Vue.compile('
{{ msg }}
') 6 | const vm = new Vue({ 7 | data: { 8 | msg: 'hello' 9 | }, 10 | render: res.render, 11 | staticRenderFns: res.staticRenderFns 12 | }).$mount() 13 | expect(vm.$el.innerHTML).toContain('hello') 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/features/instance/init.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | describe('Initialization', () => { 4 | it('without new', () => { 5 | try { Vue() } catch (e) {} 6 | expect('Vue is a constructor and should be called with the `new` keyword').toHaveBeenWarned() 7 | }) 8 | 9 | it('with new', () => { 10 | expect(new Vue() instanceof Vue).toBe(true) 11 | }) 12 | }) 13 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/features/options/comments.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | describe('Comments', () => { 4 | it('comments should be kept', () => { 5 | const vm = new Vue({ 6 | comments: true, 7 | data () { 8 | return { 9 | foo: 1 10 | } 11 | }, 12 | template: '
node1{{foo}}
' 13 | }).$mount() 14 | expect(vm.$el.innerHTML).toEqual('node11') 15 | }) 16 | }) 17 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/index.js: -------------------------------------------------------------------------------- 1 | require('es6-promise/auto') 2 | 3 | // import all helpers 4 | const helpersContext = require.context('../helpers', true) 5 | helpersContext.keys().forEach(helpersContext) 6 | 7 | // require all test files 8 | const testsContext = require.context('./', true, /\.spec$/) 9 | testsContext.keys().forEach(testsContext) 10 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/karma.dev.config.js: -------------------------------------------------------------------------------- 1 | const base = require('./karma.base.config.js') 2 | 3 | process.env.CHROME_BIN = require('puppeteer').executablePath() 4 | 5 | module.exports = function (config) { 6 | config.set(Object.assign(base, { 7 | browsers: ['ChromeHeadless'], 8 | reporters: ['progress'], 9 | plugins: base.plugins.concat([ 10 | 'karma-chrome-launcher' 11 | ]) 12 | })) 13 | } 14 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/karma.unit.config.js: -------------------------------------------------------------------------------- 1 | const base = require('./karma.base.config.js') 2 | 3 | module.exports = function (config) { 4 | config.set(Object.assign(base, { 5 | browsers: ['Chrome', 'Firefox', 'Safari'], 6 | reporters: ['progress'], 7 | singleRun: true, 8 | plugins: base.plugins.concat([ 9 | 'karma-chrome-launcher', 10 | 'karma-firefox-launcher', 11 | 'karma-safari-launcher' 12 | ]) 13 | })) 14 | } 15 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/modules/server-compiler/compiler-options.spec.js: -------------------------------------------------------------------------------- 1 | import { ssrCompile } from 'web/server/compiler' 2 | 3 | describe('ssrCompile options', () => { 4 | it('comments', () => { 5 | const compiled = ssrCompile(` 6 |
7 | 8 |
9 | `, { comments: true }) 10 | 11 | expect(compiled.render).toContain('') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /live/20200717/vue/test/unit/modules/server-compiler/optimizer.spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200717/vue/test/unit/modules/server-compiler/optimizer.spec.js -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jasmine": true 4 | }, 5 | "plugins": ["jasmine"], 6 | "rules": { 7 | "jasmine/no-focused-tests": 2 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/event/click.after.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'div', 3 | event: ['click'], 4 | children: [{ 5 | type: 'text', 6 | attr: { 7 | value: '43' 8 | } 9 | }] 10 | }) 11 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/event/click.before.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'div', 3 | event: ['click'], 4 | children: [{ 5 | type: 'text', 6 | attr: { 7 | value: '42' 8 | } 9 | }] 10 | }) 11 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/event/click.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 21 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/attrs.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 23 | 24 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/classname.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'recycle-list', 3 | attr: { 4 | append: 'tree', 5 | listData: [ 6 | { type: 'A', color: 'red' }, 7 | { type: 'A', color: 'blue' } 8 | ], 9 | switch: 'type', 10 | alias: 'item' 11 | }, 12 | children: [{ 13 | type: 'cell-slot', 14 | attr: { append: 'tree', case: 'A' }, 15 | style: { 16 | backgroundColor: '#FF6600' 17 | }, 18 | children: [{ 19 | type: 'text', 20 | attr: { 21 | // not supported yet 22 | // classList: ['text', { '@binding': 'item.color' }], 23 | value: 'content' 24 | } 25 | }] 26 | }] 27 | }) 28 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/banner.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 20 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/editor.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 18 | 19 | 32 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/footer.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 19 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/stateful-lifecycle.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'recycle-list', 3 | attr: { 4 | append: 'tree', 5 | listData: [ 6 | { type: 'X' }, 7 | { type: 'X' } 8 | ], 9 | switch: 'type', 10 | alias: 'item' 11 | }, 12 | children: [{ 13 | type: 'cell-slot', 14 | attr: { append: 'tree', case: 'X' }, 15 | children: [{ 16 | type: 'div', 17 | attr: { 18 | '@isComponentRoot': true, 19 | '@componentProps': {} 20 | }, 21 | children: [{ 22 | type: 'text', 23 | attr: { 24 | value: { '@binding': 'number' } 25 | } 26 | }] 27 | }] 28 | }] 29 | }) 30 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/stateful-lifecycle.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 22 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/stateful-v-model.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 22 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/stateful.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 23 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/stateless-with-props.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 23 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/components/stateless.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 23 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/inline-style.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'recycle-list', 3 | attr: { 4 | append: 'tree', 5 | listData: [ 6 | { type: 'A', color: '#606060' }, 7 | { type: 'A', color: '#E5E5E5' } 8 | ], 9 | switch: 'type', 10 | alias: 'item' 11 | }, 12 | children: [{ 13 | type: 'cell-slot', 14 | attr: { append: 'tree', case: 'A' }, 15 | style: { 16 | backgroundColor: '#FF6600' 17 | }, 18 | children: [{ 19 | type: 'text', 20 | style: { 21 | fontSize: '100px', 22 | color: { '@binding': 'item.color' } 23 | }, 24 | attr: { 25 | value: 'content' 26 | } 27 | }] 28 | }] 29 | }) 30 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/inline-style.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | 22 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/text-node.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | 24 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-else-if.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | 24 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-else.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'recycle-list', 3 | attr: { 4 | append: 'tree', 5 | listData: [ 6 | { type: 'A' }, 7 | { type: 'A' } 8 | ], 9 | switch: 'type', 10 | alias: 'item' 11 | }, 12 | children: [{ 13 | type: 'cell-slot', 14 | attr: { append: 'tree', case: 'A' }, 15 | children: [{ 16 | type: 'image', 17 | attr: { 18 | '[[match]]': 'item.source', 19 | src: { '@binding': 'item.source' } 20 | } 21 | }, { 22 | type: 'image', 23 | attr: { 24 | '[[match]]': '!(item.source)', 25 | src: { '@binding': 'item.placeholder' } 26 | } 27 | }] 28 | }] 29 | }) 30 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-else.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 22 | 23 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-for-iterator.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 24 | 25 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-for.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 23 | 24 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-if.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'recycle-list', 3 | attr: { 4 | append: 'tree', 5 | listData: [ 6 | { type: 'A' }, 7 | { type: 'A' } 8 | ], 9 | switch: 'type', 10 | alias: 'item' 11 | }, 12 | children: [{ 13 | type: 'cell-slot', 14 | attr: { append: 'tree', case: 'A' }, 15 | children: [{ 16 | type: 'image', 17 | attr: { 18 | '[[match]]': 'item.source', 19 | src: { '@binding': 'item.source' } 20 | } 21 | }, { 22 | type: 'text', 23 | attr: { 24 | '[[match]]': '!item.source', 25 | value: 'Title' 26 | } 27 | }] 28 | }] 29 | }) 30 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-if.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 22 | 23 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-on.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'recycle-list', 3 | attr: { 4 | append: 'tree', 5 | listData: [ 6 | { type: 'A' }, 7 | { type: 'A' } 8 | ], 9 | switch: 'type', 10 | alias: 'item' 11 | }, 12 | children: [{ 13 | type: 'cell-slot', 14 | attr: { append: 'tree', case: 'A' }, 15 | children: [{ 16 | type: 'text', 17 | event: ['click', 'longpress'], 18 | attr: { value: 'A' } 19 | }, { 20 | type: 'text', 21 | event: ['touchend'], 22 | attr: { value: 'B' } 23 | }] 24 | }] 25 | }) 26 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-on.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 26 | 27 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-once.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'recycle-list', 3 | attr: { 4 | append: 'tree', 5 | listData: [ 6 | { type: 'A' }, 7 | { type: 'A' } 8 | ], 9 | alias: 'item' 10 | }, 11 | children: [{ 12 | type: 'cell-slot', 13 | attr: { append: 'tree' }, 14 | children: [{ 15 | type: 'text', 16 | attr: { 17 | '[[once]]': true, 18 | value: { '@binding': 'item.type' } 19 | } 20 | }] 21 | }] 22 | }) 23 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/recycle-list/v-once.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 21 | 22 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/render/class.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'div', 3 | children: [{ 4 | type: 'div', 5 | classList: ['box', 'box1'] 6 | }, { 7 | type: 'div', 8 | classList: ['box', 'box2'] 9 | }, { 10 | type: 'div', 11 | classList: ['box', 'box3'] 12 | }, { 13 | type: 'div', 14 | classList: ['box', 'box4'] 15 | }, { 16 | type: 'div', 17 | classList: ['box', 'box5'] 18 | }] 19 | }) 20 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/render/sample.vdom.js: -------------------------------------------------------------------------------- 1 | ({ 2 | type: 'div', 3 | style: { 4 | justifyContent: 'center' 5 | }, 6 | children: [{ 7 | type: 'text', 8 | attr: { 9 | value: 'Yo' 10 | }, 11 | classList: ['freestyle'] 12 | }] 13 | }) 14 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/cases/render/sample.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 24 | -------------------------------------------------------------------------------- /live/20200717/vue/test/weex/jasmine.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | spec_dir: 'test/weex', 3 | spec_files: [ 4 | '**/*[sS]pec.js' 5 | ], 6 | helpers: [ 7 | require.resolve('@babel/register') 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /live/20200717/vue/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue as _Vue } from "./vue"; 2 | 3 | export type PluginFunction = (Vue: typeof _Vue, options?: T) => void; 4 | 5 | export interface PluginObject { 6 | install: PluginFunction; 7 | [key: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /live/20200717/vue/types/test/es-module.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | data() { 3 | return {} 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /live/20200717/vue/types/test/plugin-test.ts: -------------------------------------------------------------------------------- 1 | import Vue from "../index"; 2 | import { PluginFunction, PluginObject } from "../index"; 3 | 4 | class Option { 5 | prefix: string = ""; 6 | suffix: string = ""; 7 | } 8 | 9 | const plugin: PluginObject
9 | render (h) { 10 | return h('a', { domProps: { href: '#' + this.to } }, [this.$slots.default]) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /live/20200724/code/src/my-vue-router/components/view.js: -------------------------------------------------------------------------------- 1 | export default { 2 | render (h) { 3 | // 当前匹配到的路由对象 4 | const route = this.$route 5 | // console.log(route) 6 | // /music/pop 2 7 | let depth = 0 8 | // 记录当前组件为 RouterView 9 | this.routerView = true 10 | 11 | let parent = this.$parent 12 | while (parent) { 13 | if (parent.routerView) { 14 | depth++ 15 | } 16 | parent = parent.$parent 17 | } 18 | 19 | const record = route.matched[depth] 20 | if (!record) { 21 | return h() 22 | } 23 | const component = record.component 24 | return h(component) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /live/20200724/code/src/my-vue-router/history/base.js: -------------------------------------------------------------------------------- 1 | import createRoute from '../util/route' 2 | export default class History { 3 | constructor (router) { 4 | this.router = router 5 | // { path: '/', matched: [] } 6 | this.current = createRoute(null, '/') 7 | 8 | // 这个回调函数,是在hashhistory 中赋值,作用是更改 vue实例上的 _route 9 | this.cb = null 10 | } 11 | 12 | listen (cb) { 13 | this.cb = cb 14 | } 15 | 16 | // 跳转到其他位置,最终会渲染路由对应的组件 17 | transitionTo (path, onComplete) { 18 | // 重新改变 current 19 | this.current = this.router.matcher.match(path) 20 | 21 | // 调用 cb 22 | this.cb && this.cb(this.current) 23 | 24 | // console.log(this.current) 25 | onComplete && onComplete() 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /live/20200724/code/src/my-vue-router/history/hash.js: -------------------------------------------------------------------------------- 1 | import History from './base' 2 | export default class HashHistory extends History { 3 | constructor (router) { 4 | super(router) 5 | // 确保 首次 访问地址为 #/ 6 | ensureSlash() 7 | } 8 | 9 | // 获取当前的路由地址 10 | getCurrentLocation () { 11 | return window.location.hash.slice(1) 12 | } 13 | 14 | // 监听hashchange 监听路由地址的变化 15 | setUpListener () { 16 | window.addEventListener('hashchange', () => { 17 | this.transitionTo(this.getCurrentLocation()) 18 | }) 19 | } 20 | } 21 | 22 | function ensureSlash () { 23 | // 判断当前是否有 hash 24 | if (window.location.hash) { 25 | return 26 | } 27 | // www.baidu.com/#/ 28 | window.location.hash = '/' 29 | } 30 | -------------------------------------------------------------------------------- /live/20200724/code/src/my-vue-router/history/html5.js: -------------------------------------------------------------------------------- 1 | import History from './base' 2 | export default class HTML5History extends History { 3 | } 4 | -------------------------------------------------------------------------------- /live/20200724/code/src/my-vue-router/util/route.js: -------------------------------------------------------------------------------- 1 | export default function createRoute (record, path) { 2 | // 根据path 匹配到的所有的record 放到 matched 数组中 3 | // 如果path 是子路由的话,record 会有 parent 属性 4 | // 此时应该把 parent -> record 5 | // matched --> [parentRecord, childRecord] 6 | const matched = [] 7 | while (record) { 8 | matched.unshift(record) 9 | record = record.parent 10 | } 11 | return { 12 | path, 13 | matched 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /live/20200724/code/src/views/About.vue: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /live/20200724/code/src/views/Home.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 19 | -------------------------------------------------------------------------------- /live/20200724/code/src/views/music/Index.vue: -------------------------------------------------------------------------------- 1 | 10 | 11 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /live/20200724/code/src/views/music/Pop.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /live/20200724/code/src/views/music/Rock.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /live/20200724/handouts/README.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200724/handouts/README.pdf -------------------------------------------------------------------------------- /live/20200811/assets/image-20200811160053800.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200811/assets/image-20200811160053800.png -------------------------------------------------------------------------------- /live/20200811/astdemo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "astdemo", 3 | "version": "1.0.0", 4 | "main": "index.js", 5 | "license": "MIT", 6 | "devDependencies": { 7 | "@babel/core": "^7.11.1", 8 | "@babel/preset-env": "^7.11.0", 9 | "escodegen": "^2.0.0", 10 | "esprima": "^4.0.1", 11 | "estraverse": "^5.2.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /live/20200908/code/01/index.js: -------------------------------------------------------------------------------- 1 | // 案例代码 2 | const man = { 3 | name:'jscoder', 4 | age:22 5 | } 6 | 7 | //补全代码 8 | const proxy = new Proxy(man, { 9 | // 参数1:源对象 10 | // 参数2:被访问的属性名 11 | get (target, property) { 12 | if (!target[property]) { 13 | throw new Error(`Property "${property}" does not exist`) 14 | } 15 | return target[property] 16 | } 17 | }) 18 | 19 | console.log(proxy.name) // "jscoder" 20 | console.log(proxy.age) // 22 21 | 22 | console.log(proxy.location) // Property "$(property)" does not exist 23 | -------------------------------------------------------------------------------- /live/20200908/code/01/index2.js: -------------------------------------------------------------------------------- 1 | // 案例代码 2 | const man = { 3 | name:'jscoder', 4 | age:22 5 | } 6 | 7 | //补全代码 8 | const proxy = new Proxy(man, { 9 | // target: 被代理的目标对象 10 | // property:访问的属性名称 11 | get (target, property) { 12 | if (!target[property]) { 13 | throw new Error(`Property "${property}" does not exist`) 14 | } 15 | return target[property] 16 | } 17 | }) 18 | 19 | console.log(proxy.name) //"jscoder" 20 | console.log(proxy.age) //22 21 | 22 | // console.log(proxy.location) //Property "$(property)" does not exist 23 | // console.log(proxy.abc) 24 | -------------------------------------------------------------------------------- /live/20200908/code/02/type和interface/index.ts: -------------------------------------------------------------------------------- 1 | interface User { 2 | name: string 3 | age: number 4 | } 5 | -------------------------------------------------------------------------------- /live/20200908/code/03/login.js: -------------------------------------------------------------------------------- 1 | async function login () { 2 | // 接口请求异常 异常 3 | // 用户名错误、密码错误、用户不存在、500 4 | // 前提条件:接口把所以的异常都通过 HTTP 状态码来返回 5 | // 尤其是在使用 axios 请求库的时候,它会把所有 超出 200-300 范围的状态码都定义为异常,也就是:4xx、5xxx 这些都会触发异常 6 | try { 7 | const data = await ajax({ 8 | url: '', 9 | method: '', 10 | data: { 11 | username: 'xxx', 12 | password: 'xxx' 13 | } 14 | }) 15 | } catch (err) { 16 | if (err === 用户名) { 17 | console.log('xxx') 18 | } else if (err === 密码错误) { 19 | console.log('xxx') 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /live/20200908/code/04/index.js: -------------------------------------------------------------------------------- 1 | // 异步任务(宏任务),放到下一次事件循环 2 | setTimeout(_ => console.log(4)) 3 | 4 | new Promise(resolve => { // 同步执行 5 | resolve() 6 | console.log(1) 7 | }).then(_ => { // 异步执行(微任务),放到本次事件循环的尾部 8 | console.log(3) 9 | }) 10 | 11 | console.log(2) // 同步执行 12 | 13 | // 1 2 3 4 14 | -------------------------------------------------------------------------------- /live/20200908/code/05/index.js: -------------------------------------------------------------------------------- 1 | function red () { 2 | console.log('red') 3 | } 4 | 5 | function green () { 6 | console.log('green') 7 | } 8 | 9 | function yellow () { 10 | console.log('yellow') 11 | } 12 | 13 | function wait (cb, time) { 14 | return new Promise(resolve => { 15 | setTimeout(() => { 16 | cb() 17 | resolve() 18 | }, time) 19 | }) 20 | } 21 | 22 | function main () { 23 | wait(red, 3000) 24 | .then(() => { 25 | return wait(yellow, 2000) 26 | }) 27 | .then(() => { 28 | return wait(green, 1000) 29 | }) 30 | .then(() => { 31 | main() 32 | }) 33 | } 34 | 35 | main() 36 | -------------------------------------------------------------------------------- /live/20200908/code/08/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "08", 3 | "private": true, 4 | "version": "1.0.0", 5 | "author": "lipengzhou ", 6 | "license": "MIT", 7 | "dependencies": { 8 | "vue": "^2.6.11" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /live/20200908/note/期中测试题(上).pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200908/note/期中测试题(上).pdf -------------------------------------------------------------------------------- /live/20200917/101-node-deploy/lib/commander.js: -------------------------------------------------------------------------------- 1 | // commander.js 2 | 3 | // run linux shell 4 | function runCommand (ssh, command, path) { 5 | return new Promise((resolve, reject) => { 6 | ssh.execCommand(command, { 7 | cwd: path 8 | }).then((res) => { 9 | if (res.stderr) { 10 | reject(console.error('发生错误:' + res.stderr)) 11 | process.exit() 12 | } else { 13 | resolve(console.log(command + ' 执行完成!')) 14 | } 15 | }) 16 | .catch((err) => { 17 | reject(console.error('6-执行命令错误', command, err)) 18 | }) 19 | }) 20 | } 21 | 22 | module.exports = runCommand 23 | -------------------------------------------------------------------------------- /live/20200917/101-node-deploy/lib/ssh.js: -------------------------------------------------------------------------------- 1 | node_ssh = require('node-ssh') 2 | ssh = new node_ssh() 3 | runCommand = require('./commander') 4 | 5 | function connectServe (sshInfo) { 6 | return new Promise((resolve, reject) => { 7 | ssh.connect({ ...sshInfo }).then(async () => { 8 | resolve(ssh) 9 | }).catch((err) => { 10 | reject(console.error('3-' + sshInfo.host + ' 连接失败', err)) 11 | }) 12 | }) 13 | } 14 | 15 | module.exports = connectServe 16 | -------------------------------------------------------------------------------- /live/20200917/101-node-deploy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "deploy", 3 | "version": "1.0.0", 4 | "description": "", 5 | "bin": "app.js", 6 | "main": "index.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "dependencies": { 14 | "archiver": "^3.1.1", 15 | "i": "^0.3.6", 16 | "inquirer": "^7.0.3", 17 | "node-ssh": "^7.0.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /live/20200917/assets/image-20200917113125348.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200917/assets/image-20200917113125348.png -------------------------------------------------------------------------------- /live/20200917/assets/image-20200917144721581.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200917/assets/image-20200917144721581.png -------------------------------------------------------------------------------- /live/20200917/assets/image-20200917144747017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200917/assets/image-20200917144747017.png -------------------------------------------------------------------------------- /live/20200917/assets/image-20200917144819689.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200917/assets/image-20200917144819689.png -------------------------------------------------------------------------------- /live/20200927/.dockerignore: -------------------------------------------------------------------------------- 1 | # Dependency directory 2 | # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git 3 | node_modules 4 | .DS_Store 5 | dist 6 | 7 | # node-waf configuration 8 | .lock-wscript 9 | 10 | # Compiled binary addons (http://nodejs.org/api/addons.html) 11 | build/Release 12 | .dockerignore 13 | Dockerfile 14 | *docker-compose* 15 | 16 | # Logs 17 | logs 18 | *.log 19 | 20 | # Runtime data 21 | .idea 22 | .vscode 23 | *.suo 24 | *.ntvs* 25 | *.njsproj 26 | *.sln 27 | *.sw* 28 | pids 29 | *.pid 30 | *.seed 31 | .git 32 | .hg 33 | .svn 34 | -------------------------------------------------------------------------------- /live/20200927/Dockerfile: -------------------------------------------------------------------------------- 1 | # build stage 2 | FROM node:lts-alpine as build-stage 3 | WORKDIR /app 4 | COPY . . 5 | RUN npm install 6 | RUN npm run build 7 | 8 | # production stage 9 | FROM nginx:stable-alpine as production-stage 10 | COPY --from=build-stage /app/dist /usr/share/nginx/html 11 | EXPOSE 80 12 | CMD ["nginx", "-g", "daemon off;"] 13 | -------------------------------------------------------------------------------- /live/20200927/assets/image-1601197546129.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200927/assets/image-1601197546129.png -------------------------------------------------------------------------------- /live/20200927/assets/image-1601203657864.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200927/assets/image-1601203657864.png -------------------------------------------------------------------------------- /live/20200927/assets/image-1601203670308.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200927/assets/image-1601203670308.png -------------------------------------------------------------------------------- /live/20200927/assets/image-1601203676459.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200927/assets/image-1601203676459.png -------------------------------------------------------------------------------- /live/20200927/assets/image-20200927184708875.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200927/assets/image-20200927184708875.png -------------------------------------------------------------------------------- /live/20200927/assets/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20200927/assets/image.png -------------------------------------------------------------------------------- /live/20201017/code/api/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "api", 3 | "private": true, 4 | "version": "1.0.0", 5 | "author": "lipengzhou ", 6 | "license": "MIT", 7 | "dependencies": { 8 | "json-server": "^0.16.2" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/.env.development: -------------------------------------------------------------------------------- 1 | GRIDSOME_API_URL="http://127.0.0.1:1337" 2 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/.env.production: -------------------------------------------------------------------------------- 1 | GRIDSOME_API_URL="" 2 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/README.md: -------------------------------------------------------------------------------- 1 | # Default starter for Gridsome 2 | 3 | This is the project you get when you run `gridsome create new-project`. 4 | 5 | ### 1. Install Gridsome CLI tool if you don't have 6 | 7 | `npm install --global @gridsome/cli` 8 | 9 | ### 2. Create a Gridsome project 10 | 11 | 1. `gridsome create my-gridsome-site` to install default starter 12 | 2. `cd my-gridsome-site` to open the folder 13 | 3. `gridsome develop` to start a local dev server at `http://localhost:8080` 14 | 4. Happy coding 🎉🙌 15 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/content/blog/article1.md: -------------------------------------------------------------------------------- 1 | # article 1 2 | 3 | - 1 4 | - 2 5 | - 3 6 | - 4 7 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/content/blog/article2.md: -------------------------------------------------------------------------------- 1 | # article 2 2 | 3 | - dsa 4 | - dsad 5 | - d 6 | - sadd 7 | 8 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/content/blog/foo/abc.md: -------------------------------------------------------------------------------- 1 | # abc 2 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/gridsome.server.js: -------------------------------------------------------------------------------- 1 | // Server API makes it possible to hook into various parts of Gridsome 2 | // on server-side and add custom data to the GraphQL data layer. 3 | // Learn more: https://gridsome.org/docs/server-api/ 4 | 5 | // Changes here require a server restart. 6 | // To restart press CTRL + C in terminal and run `gridsome develop` 7 | 8 | module.exports = function (api) { 9 | api.loadSource(({ addCollection }) => { 10 | // Use the Data Store API here: https://gridsome.org/docs/data-store-api/ 11 | }) 12 | 13 | api.createPages(({ createPage }) => { 14 | // Use the Pages API here: https://gridsome.org/docs/pages-api/ 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blog-with-gridsome", 3 | "private": true, 4 | "scripts": { 5 | "build": "gridsome build", 6 | "develop": "gridsome develop", 7 | "explore": "gridsome explore" 8 | }, 9 | "dependencies": { 10 | "@fortawesome/fontawesome-free": "^5.14.0", 11 | "@gridsome/source-filesystem": "^0.6.2", 12 | "@gridsome/source-strapi": "^0.2.0", 13 | "@gridsome/transformer-remark": "^0.6.1", 14 | "axios": "^0.20.0", 15 | "bootstrap": "^4.5.2", 16 | "gridsome": "^0.7.0", 17 | "markdown-it": "^11.0.0" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/.temp/config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | "trailingSlash": true, 3 | "pathPrefix": "", 4 | "titleTemplate": "%s - Gridsome", 5 | "siteUrl": "", 6 | "version": "0.7.19", 7 | "catchLinks": true 8 | } -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/.temp/constants.js: -------------------------------------------------------------------------------- 1 | export const NOT_FOUND_NAME = "404" 2 | export const NOT_FOUND_PATH = "/404" 3 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/.temp/now.js: -------------------------------------------------------------------------------- 1 | export default 1602835189413 -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/.temp/plugins-client.js: -------------------------------------------------------------------------------- 1 | 2 | export default [ 3 | ] 4 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/.temp/plugins-server.js: -------------------------------------------------------------------------------- 1 | 2 | export default [ 3 | ] 4 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/components/README.md: -------------------------------------------------------------------------------- 1 | Add components that will be imported to Pages and Layouts to this folder. 2 | Learn more about components here: https://gridsome.org/docs/components/ 3 | 4 | You can delete this file. 5 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/blog-width-gridsome/src/favicon.png -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/layouts/README.md: -------------------------------------------------------------------------------- 1 | Layout components are used to wrap pages and templates. Layouts should contain components like headers, footers or sidebars that will be used across the site. 2 | 3 | Learn more about Layouts: https://gridsome.org/docs/layouts/ 4 | 5 | You can delete this file. 6 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/main.js: -------------------------------------------------------------------------------- 1 | // This is the main.js file. Import global CSS and scripts here. 2 | // The Client API can be used here. Learn more: gridsome.org/docs/client-api 3 | 4 | import 'bootstrap/dist/css/bootstrap.min.css' 5 | import '@fortawesome/fontawesome-free/css/all.min.css' 6 | 7 | import './assets/css/index.css' 8 | 9 | import DefaultLayout from '~/layouts/Default.vue' 10 | 11 | export default function (Vue, { router, head, isClient }) { 12 | Vue.mixin({ 13 | data () { 14 | return { 15 | GRIDSOME_API_URL: process.env.GRIDSOME_API_URL 16 | } 17 | } 18 | }) 19 | // Set default layout as a global component 20 | Vue.component('Layout', DefaultLayout) 21 | } 22 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/pages/README.md: -------------------------------------------------------------------------------- 1 | Pages are usually used for normal pages or for listing items from a GraphQL collection. 2 | Add .vue files here to create pages. For example **About.vue** will be **site.com/about**. 3 | Learn more about pages: https://gridsome.org/docs/pages/ 4 | 5 | You can delete this file. 6 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/src/templates/README.md: -------------------------------------------------------------------------------- 1 | Templates for **GraphQL collections** should be added here. 2 | To create a template for a collection called `WordPressPost` 3 | create a file named `WordPressPost.vue` in this folder. 4 | 5 | Learn more: https://gridsome.org/docs/templates/ 6 | 7 | You can delete this file. 8 | -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/static/README.md: -------------------------------------------------------------------------------- 1 | Add static files here. Files in this directory will be copied directly to `dist` folder during build. For example, /static/robots.txt will be located at https://yoursite.com/robots.txt. 2 | 3 | This file should be deleted. -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/static/img/about-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/blog-width-gridsome/static/img/about-bg.jpg -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/static/img/contact-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/blog-width-gridsome/static/img/contact-bg.jpg -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/static/img/home-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/blog-width-gridsome/static/img/home-bg.jpg -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/static/img/post-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/blog-width-gridsome/static/img/post-bg.jpg -------------------------------------------------------------------------------- /live/20201017/code/blog-width-gridsome/static/img/post-sample-image.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/blog-width-gridsome/static/img/post-sample-image.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/.gitignore: -------------------------------------------------------------------------------- 1 | *.log 2 | .cache 3 | .DS_Store 4 | src/.temp 5 | node_modules 6 | dist 7 | .env 8 | .env.* 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/README.md: -------------------------------------------------------------------------------- 1 | # Default starter for Gridsome 2 | 3 | This is the project you get when you run `gridsome create new-project`. 4 | 5 | ### 1. Install Gridsome CLI tool if you don't have 6 | 7 | `npm install --global @gridsome/cli` 8 | 9 | ### 2. Create a Gridsome project 10 | 11 | 1. `gridsome create my-gridsome-site` to install default starter 12 | 2. `cd my-gridsome-site` to open the folder 13 | 3. `gridsome develop` to start a local dev server at `http://localhost:8080` 14 | 4. Happy coding 🎉🙌 15 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/gridsome.config.js: -------------------------------------------------------------------------------- 1 | // This is where project configuration and plugin options are located. 2 | // Learn more: https://gridsome.org/docs/config 3 | 4 | // Changes here require a server restart. 5 | // To restart press CTRL + C in terminal and run `gridsome develop` 6 | 7 | module.exports = { 8 | siteName: 'Gridsome', 9 | plugins: [] 10 | } 11 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "my-gridsome-site", 3 | "private": true, 4 | "scripts": { 5 | "build": "gridsome build", 6 | "develop": "gridsome develop", 7 | "explore": "gridsome explore" 8 | }, 9 | "dependencies": { 10 | "axios": "^0.20.0", 11 | "gridsome": "^0.7.0" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/src/components/README.md: -------------------------------------------------------------------------------- 1 | Add components that will be imported to Pages and Layouts to this folder. 2 | Learn more about components here: https://gridsome.org/docs/components/ 3 | 4 | You can delete this file. 5 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/src/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-gridsome-site/src/favicon.png -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/src/layouts/README.md: -------------------------------------------------------------------------------- 1 | Layout components are used to wrap pages and templates. Layouts should contain components like headers, footers or sidebars that will be used across the site. 2 | 3 | Learn more about Layouts: https://gridsome.org/docs/layouts/ 4 | 5 | You can delete this file. 6 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/src/main.js: -------------------------------------------------------------------------------- 1 | // This is the main.js file. Import global CSS and scripts here. 2 | // The Client API can be used here. Learn more: gridsome.org/docs/client-api 3 | 4 | import DefaultLayout from '~/layouts/Default.vue' 5 | 6 | export default function (Vue, { router, head, isClient }) { 7 | // Set default layout as a global component 8 | Vue.component('Layout', DefaultLayout) 9 | } 10 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/src/pages/About.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 15 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/src/pages/README.md: -------------------------------------------------------------------------------- 1 | Pages are usually used for normal pages or for listing items from a GraphQL collection. 2 | Add .vue files here to create pages. For example **About.vue** will be **site.com/about**. 3 | Learn more about pages: https://gridsome.org/docs/pages/ 4 | 5 | You can delete this file. 6 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/src/templates/README.md: -------------------------------------------------------------------------------- 1 | Templates for **GraphQL collections** should be added here. 2 | To create a template for a collection called `WordPressPost` 3 | create a file named `WordPressPost.vue` in this folder. 4 | 5 | Learn more: https://gridsome.org/docs/templates/ 6 | 7 | You can delete this file. 8 | -------------------------------------------------------------------------------- /live/20201017/code/my-gridsome-site/static/README.md: -------------------------------------------------------------------------------- 1 | Add static files here. Files in this directory will be copied directly to `dist` folder during build. For example, /static/robots.txt will be located at https://yoursite.com/robots.txt. 2 | 3 | This file should be deleted. -------------------------------------------------------------------------------- /live/20201017/code/my-project/README.md: -------------------------------------------------------------------------------- 1 | # Strapi application 2 | 3 | A quick description of your strapi application 4 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/api/.gitkeep -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/contact/controllers/contact.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers) 5 | * to customize this controller 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/contact/models/contact.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks) 5 | * to customize this model 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/contact/models/contact.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "collectionType", 3 | "collectionName": "contacts", 4 | "info": { 5 | "name": "contact" 6 | }, 7 | "options": { 8 | "increments": true, 9 | "timestamps": true 10 | }, 11 | "attributes": { 12 | "name": { 13 | "type": "string" 14 | }, 15 | "email": { 16 | "type": "string" 17 | }, 18 | "phone": { 19 | "type": "string" 20 | }, 21 | "message": { 22 | "type": "text" 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/contact/services/contact.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services) 5 | * to customize this service 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/general/config/routes.json: -------------------------------------------------------------------------------- 1 | { 2 | "routes": [ 3 | { 4 | "method": "GET", 5 | "path": "/general", 6 | "handler": "general.find", 7 | "config": { 8 | "policies": [] 9 | } 10 | }, 11 | { 12 | "method": "PUT", 13 | "path": "/general", 14 | "handler": "general.update", 15 | "config": { 16 | "policies": [] 17 | } 18 | }, 19 | { 20 | "method": "DELETE", 21 | "path": "/general", 22 | "handler": "general.delete", 23 | "config": { 24 | "policies": [] 25 | } 26 | } 27 | ] 28 | } 29 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/general/controllers/general.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers) 5 | * to customize this controller 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/general/models/general.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks) 5 | * to customize this model 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/general/models/general.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "singleType", 3 | "collectionName": "generals", 4 | "info": { 5 | "name": "general" 6 | }, 7 | "options": { 8 | "increments": true, 9 | "timestamps": true 10 | }, 11 | "attributes": { 12 | "title": { 13 | "type": "string" 14 | }, 15 | "subtitle": { 16 | "type": "string" 17 | }, 18 | "cover": { 19 | "model": "file", 20 | "via": "related", 21 | "allowedTypes": [ 22 | "images" 23 | ], 24 | "plugin": "upload", 25 | "required": false 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/general/services/general.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services) 5 | * to customize this service 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/post/controllers/post.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers) 5 | * to customize this controller 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/post/models/post.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks) 5 | * to customize this model 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/post/services/post.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services) 5 | * to customize this service 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/tag/controllers/tag.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/controllers.html#core-controllers) 5 | * to customize this controller 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/tag/models/tag.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/models.html#lifecycle-hooks) 5 | * to customize this model 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/tag/models/tag.settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "kind": "collectionType", 3 | "collectionName": "tags", 4 | "info": { 5 | "name": "tag" 6 | }, 7 | "options": { 8 | "increments": true, 9 | "timestamps": true 10 | }, 11 | "attributes": { 12 | "title": { 13 | "type": "string" 14 | }, 15 | "posts": { 16 | "collection": "post", 17 | "via": "tags", 18 | "dominant": true 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/api/tag/services/tag.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Read the documentation (https://strapi.io/documentation/v3.x/concepts/services.html#core-services) 5 | * to customize this service 6 | */ 7 | 8 | module.exports = {}; 9 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/05b53beb21e3ef13d28244545977152d.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/05b53beb21e3ef13d28244545977152d.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/085b1dd8427dbeff10bd55410915a3f6.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/085b1dd8427dbeff10bd55410915a3f6.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/0fabb6606be4c45acfeedd115d0caca4.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/0fabb6606be4c45acfeedd115d0caca4.eot -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/1a78af4105d4d56e6c34f76dc70bf1bc.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/1a78af4105d4d56e6c34f76dc70bf1bc.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/27bd77b9162d388cb8d4c4217c7c5e2a.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/27bd77b9162d388cb8d4c4217c7c5e2a.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/2e1ba5a498b2a46ff0e9130c2cfd3384.svg: -------------------------------------------------------------------------------- 1 | ✉️ -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/2e83b03e0d8024cdb30d4ac2e02fcce8.svg: -------------------------------------------------------------------------------- 1 | 🏭 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/33d5f0d956f3fc30bc51f81047a2c47d.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/33d5f0d956f3fc30bc51f81047a2c47d.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/33f80c39ceeee87c63c4ecfaf6430499.svg: -------------------------------------------------------------------------------- 1 | 🔐 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/353e06eff649d349c57886e7b85c1583.svg: -------------------------------------------------------------------------------- 1 | ☁️⬆︎ -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/3996eea080b78f9e7dc1dd56c6c851c2.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/3a3398a6ef60fc64eacf45665958342e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/3a3398a6ef60fc64eacf45665958342e.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/3b0cd7254b3b6ddb8a313d41573fda8b.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/3b0cd7254b3b6ddb8a313d41573fda8b.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/3f6f46544e110a51499353fdc9d12bfe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/3f6f46544e110a51499353fdc9d12bfe.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/47ffa3adcd8b08b2ea82d3ed6c448f31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/47ffa3adcd8b08b2ea82d3ed6c448f31.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/587bfd5bca999b8d1213603050cb696e.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/5b1b8b856d7a8cb1cb0bae6d0573f2e9.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/5b1b8b856d7a8cb1cb0bae6d0573f2e9.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/674f50d287a8c48dc19ba404d20fe713.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/674f50d287a8c48dc19ba404d20fe713.eot -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/6a7a177d2278b1a672058817a92c2870.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/6a7a177d2278b1a672058817a92c2870.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/6d4e78225df0cfd5fe1bf3e8547fefe4.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/6d4e78225df0cfd5fe1bf3e8547fefe4.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/7078e9a513b8006418c274851e535840.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/7078e9a513b8006418c274851e535840.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/75a60ac7a1a65ca23365ddab1d9da73e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/75a60ac7a1a65ca23365ddab1d9da73e.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/781e85bb50c8e8301c30de56b31b1f04.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/781e85bb50c8e8301c30de56b31b1f04.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/7d8c6651cb69a0c3a2668b522192dec3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/7d8c6651cb69a0c3a2668b522192dec3.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/89bd2e38475e441a5cd70f663f921d61.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/89bd2e38475e441a5cd70f663f921d61.eot -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/8b4f872c5de19974857328d06d3fe48f.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/8b4f872c5de19974857328d06d3fe48f.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/a54bddbc1689d05277d2127f58589917.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/a54bddbc1689d05277d2127f58589917.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/ad3a7c0d77e09602f4ab73db3660ffd8.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/ad3a7c0d77e09602f4ab73db3660ffd8.eot -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/af7ae505a9eed503f8b8e6982036873e.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/af7ae505a9eed503f8b8e6982036873e.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/b06871f281fee6b241d60582ae9369b9.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/b06871f281fee6b241d60582ae9369b9.ttf -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/bd03a2cc277bbbc338d464e679fe9942.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/bd03a2cc277bbbc338d464e679fe9942.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/c2b50f4a7d908c8d06f5b05ec135e166.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/c2b50f4a7d908c8d06f5b05ec135e166.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/c500da19d776384ba69573ae6fe274e7.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/c500da19d776384ba69573ae6fe274e7.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/cac68c831145804808381a7032fdc7c2.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/cac68c831145804808381a7032fdc7c2.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/cc1d824d8f006f0a47c72638f4ce0376.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/cc1d824d8f006f0a47c72638f4ce0376.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/cccb897485813c7c256901dbca54ecf2.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/cccb897485813c7c256901dbca54ecf2.woff2 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/cdbd13088f280c86c5f5621f0fa1b857.svg: -------------------------------------------------------------------------------- 1 | 📖 -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/d878b6c29b10beca227e9eef4246111b.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/d878b6c29b10beca227e9eef4246111b.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/dc0bd022735ed218df547742a1b2f172.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/dc0bd022735ed218df547742a1b2f172.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/e230ebc80c02d7e610cb4d4a115b74c2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/e230ebc80c02d7e610cb4d4a115b74c2.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/ee09ad7553b8ad3d81150d609d5341a0.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/ee09ad7553b8ad3d81150d609d5341a0.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/f80bda6afd19534368443a3d0323a140.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/f80bda6afd19534368443a3d0323a140.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/fb30313e62e3a932b32e5e1eef0f2ed6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/fb30313e62e3a932b32e5e1eef0f2ed6.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/fd508c879644dd6827313d801776d714.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/fd508c879644dd6827313d801776d714.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/build/fee66e712a8a08eef5805a46892932ad.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/build/fee66e712a8a08eef5805a46892932ad.woff -------------------------------------------------------------------------------- /live/20201017/code/my-project/config/functions/bootstrap.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * An asynchronous bootstrap function that runs before 5 | * your application gets started. 6 | * 7 | * This gives you an opportunity to set up your data model, 8 | * run jobs, or perform some special logic. 9 | * 10 | * See more details here: https://strapi.io/documentation/v3.x/concepts/configurations.html#bootstrap 11 | */ 12 | 13 | module.exports = () => {}; 14 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/config/functions/cron.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Cron config that gives you an opportunity 5 | * to run scheduled jobs. 6 | * 7 | * The cron format consists of: 8 | * [SECOND (optional)] [MINUTE] [HOUR] [DAY OF MONTH] [MONTH OF YEAR] [DAY OF WEEK] 9 | * 10 | * See more details here: https://strapi.io/documentation/v3.x/concepts/configurations.html#cron-tasks 11 | */ 12 | 13 | module.exports = { 14 | /** 15 | * Simple example. 16 | * Every monday at 1am. 17 | */ 18 | // '0 1 * * 1': () => { 19 | // 20 | // } 21 | }; 22 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/config/functions/responses/404.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | module.exports = async (/* ctx */) => { 4 | // return ctx.notFound('My custom message 404'); 5 | }; 6 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/config/server.js: -------------------------------------------------------------------------------- 1 | module.exports = ({ env }) => ({ 2 | host: env('HOST', '0.0.0.0'), 3 | port: env.int('PORT', 1337), 4 | admin: { 5 | auth: { 6 | secret: env('ADMIN_JWT_SECRET', 'aad4b8b77879718d7ee4b5c83eebe779'), 7 | }, 8 | }, 9 | }); 10 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/extensions/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/extensions/.gitkeep -------------------------------------------------------------------------------- /live/20201017/code/my-project/extensions/users-permissions/config/jwt.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | jwtSecret: process.env.JWT_SECRET || 'f9c6f57a-4c80-4c3b-ab97-fe1514cf849e' 3 | }; -------------------------------------------------------------------------------- /live/20201017/code/my-project/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/favicon.ico -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/robots.txt: -------------------------------------------------------------------------------- 1 | # To prevent search engines from seeing the site altogether, uncomment the next two lines: 2 | # User-Agent: * 3 | # Disallow: / 4 | -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/.gitkeep -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/about_bg_501ff48c31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/about_bg_501ff48c31.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/home_bg_26d13d1f1b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/home_bg_26d13d1f1b.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/large_about_bg_501ff48c31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/large_about_bg_501ff48c31.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/large_home_bg_26d13d1f1b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/large_home_bg_26d13d1f1b.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/large_post_bg_64fec39ca4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/large_post_bg_64fec39ca4.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/large_post_bg_9933dcc6ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/large_post_bg_9933dcc6ca.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/medium_about_bg_501ff48c31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/medium_about_bg_501ff48c31.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/medium_home_bg_26d13d1f1b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/medium_home_bg_26d13d1f1b.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/medium_post_bg_64fec39ca4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/medium_post_bg_64fec39ca4.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/medium_post_bg_9933dcc6ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/medium_post_bg_9933dcc6ca.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/medium_post_sample_image_5e8b4b2413.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/medium_post_sample_image_5e8b4b2413.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/post_bg_64fec39ca4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/post_bg_64fec39ca4.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/post_bg_9933dcc6ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/post_bg_9933dcc6ca.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/post_sample_image_5e8b4b2413.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/post_sample_image_5e8b4b2413.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/small_about_bg_501ff48c31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/small_about_bg_501ff48c31.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/small_home_bg_26d13d1f1b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/small_home_bg_26d13d1f1b.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/small_post_bg_64fec39ca4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/small_post_bg_64fec39ca4.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/small_post_bg_9933dcc6ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/small_post_bg_9933dcc6ca.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/small_post_sample_image_5e8b4b2413.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/small_post_sample_image_5e8b4b2413.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/thumbnail_about_bg_501ff48c31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/thumbnail_about_bg_501ff48c31.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/thumbnail_home_bg_26d13d1f1b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/thumbnail_home_bg_26d13d1f1b.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/thumbnail_post_bg_64fec39ca4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/thumbnail_post_bg_64fec39ca4.jpg -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/thumbnail_post_bg_9933dcc6ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/thumbnail_post_bg_9933dcc6ca.png -------------------------------------------------------------------------------- /live/20201017/code/my-project/public/uploads/thumbnail_post_sample_image_5e8b4b2413.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/code/my-project/public/uploads/thumbnail_post_sample_image_5e8b4b2413.png -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | dist 3 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/index.template.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {{{ meta.inject().title.text() }}} 8 | {{{ meta.inject().meta.text() }}} 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/App.vue: -------------------------------------------------------------------------------- 1 | 19 | 20 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/app.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 通用启动入口 3 | */ 4 | import Vue from 'vue' 5 | import App from './App.vue' 6 | import { createRouter } from './router/' 7 | import VueMeta from 'vue-meta' 8 | import { createStore } from './store' 9 | 10 | Vue.use(VueMeta) 11 | 12 | Vue.mixin({ 13 | metaInfo: { 14 | titleTemplate: '%s - 拉勾教育' 15 | } 16 | }) 17 | 18 | // 导出一个工厂函数,用于创建新的 19 | // 应用程序、router 和 store 实例 20 | export function createApp () { 21 | const router = createRouter() 22 | const store = createStore() 23 | const app = new Vue({ 24 | router, // 把路由挂载到 Vue 根实例中 25 | store, // 把容器挂载到 Vue 根实例中 26 | // 根实例简单的渲染应用程序组件。 27 | render: h => h(App) 28 | }) 29 | return { app, router, store } 30 | } 31 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/entry-client.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 客户端入口 3 | */ 4 | import { createApp } from './app' 5 | 6 | // 客户端特定引导逻辑…… 7 | 8 | const { app, router, store } = createApp() 9 | 10 | if (window.__INITIAL_STATE__) { 11 | store.replaceState(window.__INITIAL_STATE__) 12 | } 13 | 14 | router.onReady(() => { 15 | app.$mount('#app') 16 | }) 17 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #f40; 3 | font-size: 20px; 4 | } 5 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/pages/404.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 12 | 13 | 16 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/pages/About.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | 19 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/pages/Home.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 15 | 16 | 19 | -------------------------------------------------------------------------------- /live/20201017/code/vue-ssr/src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | import axios from 'axios' 4 | 5 | Vue.use(Vuex) 6 | 7 | export const createStore = () => { 8 | return new Vuex.Store({ 9 | state: () => ({ 10 | posts: [] 11 | }), 12 | 13 | mutations: { 14 | setPosts (state, data) { 15 | state.posts = data 16 | } 17 | }, 18 | 19 | actions: { 20 | // 在服务端渲染期间务必让 action 返回一个 Promise 21 | async getPosts ({ commit }) { 22 | // return new Promise() 23 | const { data } = await axios.get('https://cnodejs.org/api/v1/topics') 24 | console.log(data) 25 | commit('setPosts', data.data) 26 | } 27 | } 28 | }) 29 | } 30 | -------------------------------------------------------------------------------- /live/20201017/handouts/2020-10-16 3-4 答疑.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lagoufed/fed-e-001/d7caa2a37deb86bca6f5220f93218543de7c75f1/live/20201017/handouts/2020-10-16 3-4 答疑.pdf -------------------------------------------------------------------------------- /live/20201030/code/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Document 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /live/20201030/code/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01-webpack-tree-shaking", 3 | "private": true, 4 | "version": "1.0.0", 5 | "author": "lipengzhou ", 6 | "license": "MIT", 7 | "scripts": { 8 | "build": "webpack" 9 | }, 10 | "devDependencies": { 11 | "webpack": "^5.3.2", 12 | "webpack-cli": "^4.1.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /live/20201030/code/src/index.js: -------------------------------------------------------------------------------- 1 | // 这里我仅仅加载了模块中的 square 成员 2 | import { square } from './math.js' 3 | 4 | const ret = square(10) 5 | 6 | console.log(ret) 7 | -------------------------------------------------------------------------------- /live/20201030/code/src/math.js: -------------------------------------------------------------------------------- 1 | const a = 123 2 | 3 | export function square(x) { 4 | console.log('square start') 5 | return x * x 6 | 7 | console.log('seuare end') 8 | } 9 | 10 | export function cube(x) { 11 | console.log('cube') 12 | return x * x * x 13 | } 14 | -------------------------------------------------------------------------------- /live/20201030/code/webpack.config.js: -------------------------------------------------------------------------------- 1 | // @ts-check 2 | const path = require('path') 3 | 4 | /** 5 | * @type {import('webpack').Configuration} 6 | */ 7 | module.exports = { 8 | entry: './src/index.js', 9 | mode: 'none', // production 模式下自动开启摇树功能 10 | output: { 11 | path: path.join(__dirname, 'dist'), 12 | filename: 'bundle.js' 13 | }, 14 | optimization: { 15 | usedExports: true, // 1. 标记未引用的成员 2. 不导出未引用的成员 16 | // webpack 基于 ES2015 中的模块规则:import、export 17 | minimize: true // 去除未使用到的代码 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /live/20201030/note/笔记.txt: -------------------------------------------------------------------------------- 1 | https://www.yuque.com/docs/share/c905b439-8853-4e8d-a3cf-690ba3261615?# 《20201030-面试测试题(下)》 2 | 3 | https://www.yuque.com/docs/share/667cf610-44c3-4a0e-95c9-e563edb920d1?# 《20200908-面试测试题(上)》 -------------------------------------------------------------------------------- /live/README.md: -------------------------------------------------------------------------------- 1 | # 直播内容归档 2 | 3 | > 直播课程相关资料归档,每次直播的资料都会按照日期归档于此 4 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | # 八月测试成绩公布啦 2 | ## 成绩地址 3 | 4 | https://shimo.im/sheets/CwqVg83CrYJtpWdx/MODOC 5 | 6 | ## 考试题参考答案 7 | 8 | [答案地址](./期中测试答案.md) 9 | 10 | -------------------------------------------------------------------------------- /test/test_plain.md: -------------------------------------------------------------------------------- 1 | 模拟测试地址 2 | - https://ks.wjx.top/jq/88913176.aspx 3 | 4 | 关于答案你能复制的问题 5 | 6 | - https://gitee.com/lagoufed/fed-e-001/blob/master/explain/%E5%85%B3%E4%BA%8E%E4%B8%8D%E8%83%BD%E7%B2%98%E8%B4%B4%E7%AD%94%E6%A1%88%E7%9A%84%E8%A7%A3%E5%86%B3%E5%8A%9E%E6%B3%95.md 7 | 8 | 面试题分享地址 9 | 10 | - https://github.com/lagoufed/interview/issues --------------------------------------------------------------------------------