auto commit
This commit is contained in:
parent
de57a355b9
commit
65149c88e1
@ -4,3 +4,4 @@ this.c = 'c';
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
d: 'd',
|
d: 'd',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -3,3 +3,4 @@ export { count };
|
|||||||
export function increase() {
|
export function increase() {
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,3 +10,4 @@
|
|||||||
<script src="./index.js" type="module"></script>
|
<script src="./index.js" type="module"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@ -5,3 +5,4 @@ increase();
|
|||||||
console.log(count);
|
console.log(count);
|
||||||
console.log(counter.count);
|
console.log(counter.count);
|
||||||
console.log(c);
|
console.log(c);
|
||||||
|
|
||||||
|
|||||||
@ -1,2 +1,3 @@
|
|||||||
const m = require('./1');
|
const m = require('./1');
|
||||||
console.log(m);
|
console.log(m);
|
||||||
|
|
||||||
|
|||||||
@ -134,3 +134,4 @@ console.log(a); // 2
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
console.log(123);
|
console.log(123);
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
console.log(123);
|
console.log(123);
|
||||||
|
|
||||||
|
|||||||
@ -44,3 +44,4 @@ npm init @命名空间 # 等效于 npx @命名空间/create
|
|||||||
npm init @命名空间/包名 # 等效于 npx @命名空间/create-包名
|
npm init @命名空间/包名 # 等效于 npx @命名空间/create-包名
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: 'airbnb',
|
extends: 'airbnb',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -3,3 +3,4 @@ let a = 1;
|
|||||||
if (a === 1) {
|
if (a === 1) {
|
||||||
a *= 2;
|
a *= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,3 +3,4 @@ module.exports = {
|
|||||||
eqeqeq: 'error',
|
eqeqeq: 'error',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -2,3 +2,4 @@ var a = 1;
|
|||||||
|
|
||||||
if (a == 1) {
|
if (a == 1) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,3 +15,4 @@ module.exports = {
|
|||||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -22,3 +22,4 @@ npm run lint
|
|||||||
|
|
||||||
### Customize configuration
|
### Customize configuration
|
||||||
See [Configuration Reference](https://cli.vuejs.org/config/).
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
||||||
|
|
||||||
|
|||||||
@ -3,3 +3,4 @@ module.exports = {
|
|||||||
'@vue/cli-plugin-babel/preset',
|
'@vue/cli-plugin-babel/preset',
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -15,3 +15,4 @@
|
|||||||
<!-- built files will be auto injected -->
|
<!-- built files will be auto injected -->
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
||||||
|
|||||||
@ -26,3 +26,4 @@ export default {
|
|||||||
margin-top: 60px;
|
margin-top: 60px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -56,3 +56,4 @@ a {
|
|||||||
color: #42b983;
|
color: #42b983;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -6,3 +6,4 @@ Vue.config.productionTip = false;
|
|||||||
new Vue({
|
new Vue({
|
||||||
render: (h) => h(App),
|
render: (h) => h(App),
|
||||||
}).$mount('#app');
|
}).$mount('#app');
|
||||||
|
|
||||||
|
|||||||
@ -25,3 +25,4 @@ webpack的版本会不断更新,但它的核心原理是不变的,因此,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
1
05. webpack scope hoisting/demo/dist/main.js
vendored
1
05. webpack scope hoisting/demo/dist/main.js
vendored
@ -62,3 +62,4 @@
|
|||||||
for (let e = 1; e < 20; e++) console.log(n(1, 10));
|
for (let e = 1; e < 20; e++) console.log(n(1, 10));
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
@ -3,3 +3,4 @@ import { getRandom } from './module';
|
|||||||
for (let i = 1; i < 20; i++) {
|
for (let i = 1; i < 20; i++) {
|
||||||
console.log(getRandom(1, 10));
|
console.log(getRandom(1, 10));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2,3 +2,4 @@ export function getRandom(min, max) {
|
|||||||
const n = Math.random() * (max - min);
|
const n = Math.random() * (max - min);
|
||||||
return Math.floor(n) + min;
|
return Math.floor(n) + min;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
devtool: 'none',
|
devtool: 'none',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -220,3 +220,4 @@
|
|||||||
/******/
|
/******/
|
||||||
})();
|
})();
|
||||||
//# sourceMappingURL=main.js.map
|
//# sourceMappingURL=main.js.map
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
const resp = await fetch("http://www.baidu.com");
|
const resp = await fetch("http://www.baidu.com");
|
||||||
const jsonBody = await resp.json();
|
const jsonBody = await resp.json();
|
||||||
export default jsonBody;
|
export default jsonBody;
|
||||||
|
|
||||||
|
|||||||
@ -6,3 +6,4 @@ module.exports = {
|
|||||||
topLevelAwait: true,
|
topLevelAwait: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
1
06. webpack5更新了什么/打包体积优化/dist/index2.js
vendored
1
06. webpack5更新了什么/打包体积优化/dist/index2.js
vendored
@ -3,3 +3,4 @@
|
|||||||
console.log('f1'), console.log('f4');
|
console.log('f1'), console.log('f4');
|
||||||
})();
|
})();
|
||||||
//# sourceMappingURL=index2.js.map
|
//# sourceMappingURL=index2.js.map
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
console.log("index1.js没有依赖其他模块,也没有导出任何东西");
|
console.log("index1.js没有依赖其他模块,也没有导出任何东西");
|
||||||
|
|
||||||
|
|||||||
@ -2,3 +2,4 @@ import { f1 } from './modules/a';
|
|||||||
import * as bFuncs from './modules/b';
|
import * as bFuncs from './modules/b';
|
||||||
f1();
|
f1();
|
||||||
bFuncs.f4();
|
bFuncs.f4();
|
||||||
|
|
||||||
|
|||||||
@ -7,3 +7,4 @@ export function f2() {
|
|||||||
console.log('f2');
|
console.log('f2');
|
||||||
f3();
|
f3();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,3 +5,4 @@ export function f3() {
|
|||||||
export function f4() {
|
export function f4() {
|
||||||
console.log("f4");
|
console.log("f4");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,3 +6,4 @@ module.exports = {
|
|||||||
index2: "./src/index2.js",
|
index2: "./src/index2.js",
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
console.log(_, moment);
|
console.log(_, moment);
|
||||||
|
|
||||||
|
|||||||
@ -10,3 +10,4 @@ module.exports = {
|
|||||||
// 更多配置参考:https://webpack.docschina.org/configuration/other-options/#cache
|
// 更多配置参考:https://webpack.docschina.org/configuration/other-options/#cache
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
1
06. webpack5更新了什么/清除输出目录/dist/main.js
vendored
1
06. webpack5更新了什么/清除输出目录/dist/main.js
vendored
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -0,0 +1 @@
|
|||||||
|
|
||||||
@ -4,3 +4,4 @@ module.exports = {
|
|||||||
clean: true,
|
clean: true,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -7,3 +7,4 @@ console.log('big-pic.png', bigPic);
|
|||||||
console.log('small-pic.jpg', smallPic);
|
console.log('small-pic.jpg', smallPic);
|
||||||
console.log('yueyunpeng.gif', yueyunpeng);
|
console.log('yueyunpeng.gif', yueyunpeng);
|
||||||
console.log('raw.txt', raw);
|
console.log('raw.txt', raw);
|
||||||
|
|
||||||
|
|||||||
@ -42,3 +42,4 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
1
08. 模块联邦/demo/active/src/bootstrap.js
vendored
1
08. 模块联邦/demo/active/src/bootstrap.js
vendored
@ -10,3 +10,4 @@ now($('<div>').appendTo(document.body));
|
|||||||
|
|
||||||
// 活动页中有一个新闻列表
|
// 活动页中有一个新闻列表
|
||||||
news($('<div>').appendTo(document.body));
|
news($('<div>').appendTo(document.body));
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
import('./bootstrap');
|
import('./bootstrap');
|
||||||
|
|
||||||
|
|||||||
@ -8,3 +8,4 @@ export default function (container) {
|
|||||||
}
|
}
|
||||||
ul.html(html);
|
ul.html(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -42,3 +42,4 @@ module.exports = {
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
1
08. 模块联邦/demo/home/src/bootstrap.js
vendored
1
08. 模块联邦/demo/home/src/bootstrap.js
vendored
@ -10,3 +10,4 @@ now($('<div>').appendTo(document.body));
|
|||||||
|
|
||||||
// 新闻列表
|
// 新闻列表
|
||||||
news($('<div>').appendTo(document.body));
|
news($('<div>').appendTo(document.body));
|
||||||
|
|
||||||
|
|||||||
@ -1 +1,2 @@
|
|||||||
import('./bootstrap');
|
import('./bootstrap');
|
||||||
|
|
||||||
|
|||||||
@ -6,3 +6,4 @@ export default function (container) {
|
|||||||
p.text(new Date().toLocaleString());
|
p.text(new Date().toLocaleString());
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -41,3 +41,4 @@ module.exports = {
|
|||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -294,3 +294,4 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -681,3 +681,4 @@
|
|||||||
> 2. npm 检查缓存中是否有相同的模块,如果有,直接从缓存中读取安装
|
> 2. npm 检查缓存中是否有相同的模块,如果有,直接从缓存中读取安装
|
||||||
> 3. 如果本地和缓存中均不存在,npm 会从 registry 指定的地址下载安装包,然后将其写入到本地的 node_modules 目录中,同时缓存起来。
|
> 3. 如果本地和缓存中均不存在,npm 会从 registry 指定的地址下载安装包,然后将其写入到本地的 node_modules 目录中,同时缓存起来。
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -88,3 +88,4 @@
|
|||||||
40. 什么是 babel,有什么作用?
|
40. 什么是 babel,有什么作用?
|
||||||
|
|
||||||
41. 解释一下 npm 模块安装机制是什么?
|
41. 解释一下 npm 模块安装机制是什么?
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user