1 Star 0 Fork 0

animalcoder/Vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
quickstart.js 873 Bytes
一键复制 编辑 原始数据 按行查看 历史
animalcoder 提交于 2020-03-17 14:52 +08:00 . Vueinit
/*
* This example targets Node 4 and up.
*/
const cssnano = require('cssnano');
/*
* Add your CSS code here.
*/
const css = `
h1 {
color: #ff0000;
font-weight: bold;
}
`;
/*
* Add any PostCSS options here. For example to enable sourcemaps, see:
* https://github.com/postcss/postcss/blob/master/site/source-maps.md
*
* Or for an inline sourcemap, uncomment the options below.
*/
const postcssOpts = {
// from: 'app.css',
// to: 'app.min.css',
// map: {inline: true},
};
/*
* Add your choice of preset. Note that for any value other
* than 'default', you will need to install the appropriate
* preset separately.
*/
const cssnanoOpts = {
preset: 'default',
};
/*
* Compress the CSS asynchronously and log it to the console.
*/
cssnano.process(css, postcssOpts, cssnanoOpts).then(result => {
console.log(result.css);
});
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/animalcoder/Vue.git
git@gitee.com:animalcoder/Vue.git
animalcoder
Vue
Vue
master

搜索帮助