Skip to content

Commit f719f1b

Browse files
committed
chore(deps): Update dependency kkt to v6.11.0
1 parent e0f02fd commit f719f1b

File tree

5 files changed

+34
-39
lines changed

5 files changed

+34
-39
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
node_modules
22
lib
3+
cjs
4+
esm
35
build
46
npm-debug.log*
57
package-lock.json

.kktrc.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
import path from 'path';
2-
import webpack, {Configuration} from 'webpack';
2+
import webpack, { Configuration } from 'webpack';
33
import { LoaderConfOptions } from 'kkt';
44
import lessModules from '@kkt/less-modules';
55
import rawModules from '@kkt/raw-modules';
66
import scopePluginOptions from '@kkt/scope-plugin-options';
77
import pkg from './package.json';
88

9-
export default (conf: Configuration, env: string, options: LoaderConfOptions) => {
9+
export default (conf: Configuration, env: 'production' | 'development', options: LoaderConfOptions) => {
10+
conf = lessModules(conf, env, options);
1011
conf = rawModules(conf, env, { ...options });
1112
conf = scopePluginOptions(conf, env, {
1213
...options,
1314
allowedFiles: [
14-
path.resolve(process.cwd(), 'README.md')
15+
path.resolve(process.cwd(), 'README.md'),
16+
path.resolve(process.cwd(), 'src'),
1517
]
1618
});
17-
conf = lessModules(conf, env, options);
19+
// conf.resolve!.alias = { '@uiw/react-monacoeditor': process.cwd() };
1820
// Get the project version.
1921
conf.plugins!.push(new webpack.DefinePlugin({
2022
VERSION: JSON.stringify(pkg.version),
2123
}));
24+
if (env === 'production') {
25+
conf.output = { ...conf.output, publicPath: './' };
26+
}
2227
return conf;
2328
}

package.json

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
"name": "@uiw/react-codepen",
33
"version": "1.0.1",
44
"description": "A React component is provided that allows you to programmatically generate codepen projects from code samples on the fly.",
5-
"main": "lib/cjs/index.js",
6-
"module": "lib/esm/index.js",
7-
"typings": "lib/esm/index.d.ts",
5+
"main": "cjs/index.js",
6+
"module": "esm/index.js",
87
"homepage": "https://uiwjs.github.io/react-codepen",
98
"scripts": {
109
"prepare": "npm run build",
@@ -25,18 +24,18 @@
2524
"@babel/runtime": ">=7.10.0"
2625
},
2726
"devDependencies": {
28-
"@kkt/less-modules": "6.8.2",
29-
"@kkt/raw-modules": "6.8.2",
30-
"@kkt/scope-plugin-options": "6.8.2",
31-
"@types/react": "17.0.3",
32-
"@types/react-dom": "17.0.3",
33-
"@uiw/react-github-corners": "1.2.0",
34-
"@uiw/react-markdown-preview": "2.1.1",
35-
"compile-less-cli": "1.7.0",
27+
"@kkt/less-modules": "6.11.0",
28+
"@kkt/raw-modules": "6.11.0",
29+
"@kkt/scope-plugin-options": "6.11.0",
30+
"@types/react": "17.0.20",
31+
"@types/react-dom": "17.0.9",
32+
"@uiw/react-github-corners": "1.5.1",
33+
"@uiw/react-markdown-preview": "3.3.1",
34+
"compile-less-cli": "1.8.8",
3635
"react": "17.0.2",
3736
"react-dom": "17.0.2",
38-
"kkt": "6.8.2",
39-
"tsbb": "3.1.4"
37+
"kkt": "6.11.0",
38+
"tsbb": "3.1.5"
4039
},
4140
"eslintConfig": {
4241
"extends": [
@@ -55,5 +54,8 @@
5554
"last 1 firefox version",
5655
"last 1 safari version"
5756
]
57+
},
58+
"dependencies": {
59+
"@babel/runtime": "^7.15.4"
5860
}
5961
}

src/tsconfig.json

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
11
{
2+
"extends": "../tsconfig",
3+
"include": ["../src"],
24
"compilerOptions": {
3-
"target": "es5",
4-
"lib": [
5-
"dom",
6-
"dom.iterable",
7-
"esnext"
8-
],
9-
"allowJs": true,
10-
"skipLibCheck": true,
11-
"esModuleInterop": true,
12-
"allowSyntheticDefaultImports": true,
13-
"strict": true,
14-
"forceConsistentCasingInFileNames": true,
15-
"module": "esnext",
16-
"moduleResolution": "node",
17-
"resolveJsonModule": true,
18-
"isolatedModules": true,
19-
"declaration": true,
205
"baseUrl": ".",
21-
"jsx": "react-jsx"
22-
},
23-
"include": ["../src"]
24-
}
6+
"outDir": "../cjs",
7+
"emitDeclarationOnly": true,
8+
"noEmit": false
9+
}
10+
}

tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
"noEmit": true
2424
},
2525
"include": [
26-
"website"
26+
"website", ".kktrc.ts"
2727
]
2828
}

0 commit comments

Comments
 (0)