npm publish --registry http://ubuntu-17:4873 # --forceIn the Mydemo project we add referencesyarn add myHammer --registry http://ubuntu-17:4873Modify the index.js following:const myGreeting = require('myGreeting');const {base64} = require('myHammer');(function () { let greeting = myGreeting('Rattz'); console.log(base64.encode(greeting));})();Run up$ node index.jsSGVsbG8gUmF0dHo=About Tree ShakingMention a little bit about the tree Shaking, which simply says that tree Shaking can effectiv
special annotations. For example:
/* Lines under different dpr */. g-dpr-1. g-border-1px {border-width: 1px! Important;/* no */}. g-dpr-2. g-border-1px {border-width: 0.5px! Important;/* no */}Vuex
In single-page application development, the "Vuex" responsible for status management is also necessary. The installation is also very simple:
npm install vuex --save
However, in some browsers of earlier versions, such exceptions may occur:
Error: [vuex] vuex requires a Promise polyfill in this browse
acceptance after completion3. The designer proposes to revise the opinion, according to the opinion changes4. Complete component development, write examples and documentation for the website* * How to manage multi-component projects * *At the beginning of development, we were thinking about how to reduce the coupling of components to ensure that the components can work independently. The goal is to ensure that components can rely on other components, have users load only a few of them, and even
var outputdir = path. resolve (_ dirname, 'built'); // place the compilation result var webContextRoot = '/myreact/'; // actual application access path, the default value is the actual access path of the '/' // antd icon font file. Use the less-load variable replacement function var Td_fonticon = webContextRoot + 'Assets/antd_fonticon/iconfont '; var hasValue = function (item) {return item! = Null;}; return {// context: path. resolve (_ dirname), devtool: 'source-map', devServer: {host: '0. 0.0
"postcss-px2rem" to deal with this value. For example:/* 不同dpr下的细线 */.g-dpr-1 .g-border-1px { border-width: 1px !important; /*no*/ } .g-dpr-2 .g-border-1px { border-width: 0.5px !important; /*no*/ }VuexIn a single page application development, the "vuex" responsible for managing the state is also essential. The installation is also very simple:npm install vuex --saveHowever, when used in real time, in some low-version system browsers, such exceptions may occur:Error: [Vuex] Vuex requires a Pr
. After you have downloaded and installed eclipse, download and install the Eclipse Chinese pack.Steps to read
2After entering the official Eclipse website, you will need to find the official Eclipse Chinese package, click on the projects link to find the Chinese bag project.
3You can see the search box and the "List of PROJECTS" button in the PROJECTS project page, where the "List of PROJECTS" button lists all the sub-items that eclipse provides, and you can find the Language Pack item
many articles, it is said that the change in the script in the App.vue file of msg text in the browser will immediately render effect, but in fact I did not appear in the demo of this effect, Google a lot, found the answer, Yuda said: "Data is the initial value, However, the current state is retained when the hot update is in.
At this point, about the basic end of the Webpack+vue, although simple, but because in the process also encountered some pits, so summed up, on the study of Vue, this is
use Facebook's create-react-app scaffolding to quickly build a react development environment (Ant.design,redux ...). )
The "scaffolding" in the programming field refers to a kind of tool that can quickly build a "skeleton" of the project scaffolding. For example, most react projects have src,public,webpack profiles, and so on, and the SRC directory contains components directories, and so on. Each time you create a new project, these fixed file directories are created manually. The role of scaff
Loader priority needs to be noted for two points, with the test configuration priority: Multiple loader are configured under the same test, and priority loader is placed after the configuration array, as for less processing:
{
test:/\.less$/, use
: [
' Style-loader ',
' css-loader ', '
postcss-loader
', ' Less-loader '
]
}
Different test priority: such as the processing of JS files requires two test configuration, using Eslint-loader and
is the ultimate asynchronous solution and the future). It is OK with other types of data, but it is executed directly, not asynchronously.
Second, the execution of const result = Readfileasync () Returns a Promise object, and the return ' done ' in the above code is directly received by the following then function
Result.then (data => {
console.log (data) /Done
})
Third, from the readability of the code will, async-await more easy to read the introduction, but also more in line with the s
For more information about ProjectBabel, see InstallCoreinitEX: UPDATEbabel_nodeSETnod_title 'board', nod_pid2, nod_sid2, nod_uid1, nod_level2, nod_he knows about the Babel of the Project.
After installing the Project Babel, you can see:
Install Core init
EX: UPDATE babel_node SET nod_title = 'board', nod_pid = 2, nod_sid = 2, nod_uid = 1, nod_level = 2, nod_header = 'Hello World! ', Nod_footer = 'This is
prior to reading this article, it is recommended to have a preliminary understanding of Webpack and Vuejs, through Webpack's official website and Vuejs's Chinese official website to understand canWebsite Main directory://Some files are not necessarily listed, pay attention to observeVue-wepack -src--components --js ---app.js --css-dist -package.json -webpack.config.js-index.htmlpackage.json//Note that there will be some extra loader bags, this explanation does not necessarily
1. Configure the environment: in the Webstorm console (1) cnpm install--save-dev Gulp (2) cnpm install--save-dev Gulp-webpack(3) cnpm install Babel-loader babel-core babel-preset-es2017--save-dev2. Directory structure: (The build folder is automatically generated after all files have been configured in Webstorm console after input gulp)3.gulpfile File configurati
Node. js are not supported yet. Fortunately, babel already supports async transform, so we can introduce babel when using it. Before we start, we need to introduce the following package, which contains the async/await compilation file we need in preset-stage-3.
Install the following package on both Browser and Node. js.
$ npm install babel-core --save$ npm insta
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.