Add simple way to test (#12)
parent
ff60cf8b84
commit
900e817512
|
@ -1 +1,3 @@
|
|||
/node_modules/
|
||||
/test/node_modules/
|
||||
/test/dist/*.js
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
/test/
|
File diff suppressed because it is too large
Load Diff
|
@ -24,6 +24,13 @@
|
|||
"homepage": "https://github.com/Microsoft/monaco-editor-webpack-plugin#readme",
|
||||
"peerDependencies": {
|
||||
"webpack": "^4.5.0",
|
||||
"monaco-editor": "^0.12.0"
|
||||
"monaco-editor": "^0.13.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"css-loader": "^0.28.11",
|
||||
"monaco-editor": "^0.13.1",
|
||||
"style-loader": "^0.21.0",
|
||||
"webpack": "^4.6.0",
|
||||
"webpack-cli": "^2.0.14"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container" style="width:800px;height:600px;border:1px solid #ccc"></div>
|
||||
<script type="text/javascript" src="app.js"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,7 @@
|
|||
|
||||
import * as monaco from 'monaco-editor';
|
||||
|
||||
monaco.editor.create(document.getElementById('container'), {
|
||||
value: 'console.log("Hello, world")',
|
||||
language: 'javascript'
|
||||
});
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "monaco-webpack-test",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "../node_modules/.bin/webpack --config webpack.config.js"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
const MonacoWebpackPlugin = require('../index.js');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = {
|
||||
mode: 'development',
|
||||
entry: './index.js',
|
||||
output: {
|
||||
path: path.resolve(__dirname, 'dist'),
|
||||
filename: 'app.js'
|
||||
},
|
||||
module: {
|
||||
rules: [{
|
||||
test: /\.css$/,
|
||||
use: ['style-loader', 'css-loader']
|
||||
}]
|
||||
},
|
||||
plugins: [
|
||||
new MonacoWebpackPlugin()
|
||||
]
|
||||
};
|
Loading…
Reference in New Issue