build: rename some files

This commit is contained in:
07akioni 2020-02-13 22:22:04 +08:00
parent e2174712bb
commit 96f3d41824
9 changed files with 37 additions and 5 deletions

View File

@ -0,0 +1,31 @@
const sass = require('node-sass')
const path = require('path')
function createStyleScheme (css) {
return css
.replace(':export', 'export default')
.replace(/:\s/g, `: '`)
.replace(/;/g, `',`)
}
module.exports = function naiveSCSSExportVariable () {
return {
name: 'naive-scss-export-variable',
resolveId (source, importer) {
if (source.endsWith('.scss')) {
return path.resolve(path.dirname(importer), source)
}
return null
},
load (id) {
if (id.endsWith('.scss')) {
const css = sass.renderSync({
file: id,
outputStyle: 'expanded'
}).css.toString()
const styleScheme = createStyleScheme(css)
return styleScheme
}
}
}
}

View File

@ -9,7 +9,7 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin')
const webpackConfig = {
mode: 'development',
entry: './demo/indexUsingCss.js',
entry: './demo/deploymentIndex.js',
output: {
path: path.resolve(process.cwd()),
publicPath: '/',

View File

@ -9,7 +9,7 @@ const VueLoaderPlugin = require('vue-loader/lib/plugin')
const webpackConfig = {
mode: 'development',
entry: './demo/index.js',
entry: './demo/devIndex',
output: {
path: path.resolve(process.cwd()),
publicPath: '/',

View File

@ -10,7 +10,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin')
const webpackConfig = {
mode: 'production',
entry: './demo/indexUsingCss.js',
entry: './demo/deploymentIndex.js',
output: {
path: path.resolve(__dirname, '..', 'doc', 'dist'),
publicPath: '/',

View File

@ -8,7 +8,7 @@
<template v-slot:activator>
<n-button>退出游戏</n-button>
</template>
我看 B 站的时候,听说有些冲钱也是找罪受。
我看 B 站的时候,听说有些游戏冲钱也是找罪受。
</n-popconfirm>
```
```js

View File

@ -2,7 +2,7 @@ const vue = require('rollup-plugin-vue')
const resolve = require('@rollup/plugin-node-resolve')
const strip = require('@rollup/plugin-strip')
const { terser } = require('rollup-plugin-terser')
const naiveSCSSVariable = require('./build/naiveScssVarPlugin')
const naiveSCSSVariable = require('./build/naiveSCSSVarPlugin')
function externalValidator (ids) {
return id => ids.some(identifier => id.startsWith(identifier))

View File

@ -144,6 +144,7 @@ Previously, it would not work with single quotes:
31. BaseLoading 代替 Log 里的 Spin
32. Modal 内部组件的卸载方式
33. Anchor 的另一种模式,追踪内容按照的是中间范围而不是自身大小
34. bug md-loader alert 内的 code 不显示
```