Skip to content

Commit 5b30c1f

Browse files
committed
Merge branch 'master' of github.com:uiwjs/react-codemirror
2 parents b951963 + dc578fb commit 5b30c1f

File tree

6 files changed

+34
-21421
lines changed

6 files changed

+34
-21421
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: GitHub Actions Build and Deploy @uiw/react-codemirror
1+
name: Build & Deploy
22
on:
33
push:
44
branches:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ build
33
lib
44
!src/lib
55
npm-debug.log*
6+
package-lock.json
67
.DS_Store
78
.cache
89
.rdoc-dist

.kktrc.js

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
import path from 'path';
2+
import webpack from 'webpack';
3+
import lessModules from '@kkt/less-modules';
4+
import rawModules from '@kkt/raw-modules';
5+
import scopePluginOptions from '@kkt/scope-plugin-options';
6+
import pkg from './package.json';
27

3-
export const loaderOneOf = [
4-
require.resolve('@kkt/loader-less'),
5-
require.resolve('@kkt/loader-raw')
6-
];
7-
8-
export const moduleScopePluginOpts = [
9-
path.resolve(process.cwd(), 'README.md')
10-
];
11-
12-
export default (conf, opts, webpack) => {
13-
const pkg = require(path.resolve(process.cwd(), 'package.json'));
14-
8+
export default (conf, env, options) => {
9+
conf = rawModules(conf, env, { ...options });
10+
conf = scopePluginOptions(conf, env, {
11+
...options,
12+
allowedFiles: [
13+
path.resolve(process.cwd(), 'README.md')
14+
]
15+
});
16+
conf = lessModules(conf, env, options);
1517
// Get the project version.
16-
conf.plugins.push(
17-
new webpack.DefinePlugin({
18-
VERSION: JSON.stringify(pkg.version),
19-
})
20-
);
18+
conf.plugins.push(new webpack.DefinePlugin({
19+
VERSION: JSON.stringify(pkg.version),
20+
}));
2121
conf.output = { ...conf.output, publicPath: './' }
2222
return conf;
2323
}

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
react-codemirror
22
===
3+
4+
![Build & Deploy](https://github.com/uiwjs/react-codemirror/workflows/Build%20&%20Deploy/badge.svg)
5+
36
CodeMirror component for React. demo @[uiwjs.github.io/react-codemirror/](https://uiwjs.github.io/react-codemirror/)
47

58
<a href="https://uiwjs.github.io/react-codemirror/"><img src="https://raw.githubusercontent.com/uiwjs/react-codemirror/master/react-codemirror.png" /></a>

0 commit comments

Comments
 (0)