some daily

1. General background-color div element covers only the border, and its margin is determined by the color of the background color of the outer element.

2. When set border-box, width = border + padding + real size

3. Give a div element div after setting :: after, after the contents of the content will be displayed inside the div, :: after

4. Create a folder inside the cmd md folder name and then cd

5. Create WebPACK generally recommended to create topical use npm i webpack webpack-cli -S -D

6. webpack -v can view the global version of webpack, npx webpack -v can view the local version created webpack

7. Install the specified version webpack:
npm info webpack // View webpack history Ads
npm i [email protected] webpack -D-cli
8. NPX webpack --config ./webpackconfig.js (to change the default webpack.config. js package file)

9. webpack package file entry is a file entry, output file is packaged after infos

10. package.json disposed in the bundle: webpack can use npm run bundle in cmd

11. loader is executed in the order, from the back of the

12. postcss-loader vendor prefix

13. plugin solve the actual demand, loader solve the problem can not be resolved

14. After using webpack-dev-server, packaged files are stored in memory, you can not see

15. mock data, we use express to create a file server and starts, while the reference data file server in our project file, in which case there will be a cross-domain problem, webpack the proxy can be a temporary solution Cross-domain issues

16. During the FBI, the front and rear ends of the splitter, direct access to the data will be cross-domain, on the line we use nginx Use forward, during development, webpack can handle it

17. -D is the abbreviation --save -dev, so that the installation of the package name and version number will exist inside this package.json of devDependencies

18. devServer hot set to true, the embodiment is set to true hotOnly hot update to all js. hmr css module for better support for js module, can be achieved by means of heat on modle.hot js update, you need to be updated every method

19. Use es6 .babel-profile version is way low in global variables inject come, windows.promise cause global objects contaminated plugin-transform-runtime compared to not cause global pollution

Tree shaking 21. The:
sideeffects:
false (whether the module is loaded conduct a simple judgment in the use of import)
.bablerc file additional option is to propose options babel-loader to write in the file, reducing webpack.config. js file body
is not designed for modular side effects may be used, when packaged unused module will not be packaged (even if the module side effects, e.g. console.log (1)), whereas if there is added similar ( "* .css") then packed when these files are no longer detected usedExports: to true
1. DevTools: development environment recommended: devtool: "cheap-module- eval-source-map"; online environment recommended: devtool: "cheap-module-source -map"

2. Preload: loaded synchronously with the parent chuck, and immediately after completion of loading request Prefetch: browser idle time to load, you can freely request in the future

3. In the es, function a () {} export a; this expression is wrong export must be an interface that can not be fixed value, may be the following manner
export function a () {} // or function a () {} {a} Export
4. anonymous function of this window is always directed, pointing to the object in order to make run-time, this must be saved down, further use

The dynamic binding data v-model data must be declared in the
Created () {this.foo.abc = "AA"}
6. The arrows added function {} return statement must be written

7. Number.isInteger (value) determines whether a given number is an integer

8. The bidirectional input of binding: (value inherited from the parent sub-assembly component, subassembly value when the value changes, to notify the parent components, the parent received value changes, changes its value) to achieve the value in the dynamic subassembly bind and listen for input events to achieve a dynamic binding and receiving sub-assemblies value in the parent assembly on

9. github [email protected] how to upload local files to github

1. Open gitbash, into the project folder below

2.git init generated local git management in the current directory of the project (local will be more of a .git folder)

3. git add. Add all the files on the items to the warehouse, if you want to add a specified file, simply put. Into this particular file name

4.git commit -m "first commit" Indicates notes for this submission, the contents inside double quotes can be changed according to individual needs

5.git remote add origin https: ...... (github repository address) will be associated with the local warehouse to the top github

6.git push -u origin master code uploaded to the github repository

Guess you like

Origin www.cnblogs.com/yinping/p/11318783.html