File tree Expand file tree Collapse file tree 4 files changed +71
-549
lines changed Expand file tree Collapse file tree 4 files changed +71
-549
lines changed Original file line number Diff line number Diff line change 7
7
"license" : " MIT" ,
8
8
"private" : true ,
9
9
"scripts" : {
10
- "build" : " rimraf dist && make-dir dist && cpy manifest.json dist && webpack"
10
+ "build" : " webpack"
11
11
},
12
12
"devDependencies" : {
13
- "cpy-cli" : " ^4.1.0" ,
14
- "make-dir-cli" : " ^3.0.0" ,
15
- "rimraf" : " ^3.0.2" ,
13
+ "copy-webpack-plugin" : " ^11.0.0" ,
16
14
"sass" : " ^1.51.0" ,
17
15
"sass-loader" : " ^12.6.0" ,
18
16
"ts-loader" : " ^9.3.0" ,
24
22
"function-plot" : " ^1.22.8" ,
25
23
"obsidian" : " ^0.11.13"
26
24
}
27
- }
25
+ }
Original file line number Diff line number Diff line change @@ -31,13 +31,13 @@ export default class ObsidianFunctionPlot extends Plugin {
31
31
// styles
32
32
el . classList . add ( 'functionplot' )
33
33
// parse yaml for bounds and functions to plot
34
-
34
+
35
35
const header = ( source . match ( / - { 3 } [ ^ ] + - { 3 } / ) || [ null ] ) [ 0 ]
36
36
const functions = ( header ? source . substring ( header . length ) : source )
37
37
. split ( '\n' )
38
38
. map ( line => line . trim ( ) )
39
39
. filter ( line => line . length > 0 )
40
-
40
+
41
41
const config : HeaderOptions = Object . assign (
42
42
{ } ,
43
43
DEFAULT_HEADER_OPTIONS ,
@@ -58,7 +58,7 @@ export default class ObsidianFunctionPlot extends Plugin {
58
58
domain : [ config . bounds [ 2 ] , config . bounds [ 3 ] ] ,
59
59
label : config . yLabel
60
60
} ,
61
- data : functions . map ( line => { return { "fn" : line . split ( '=' ) [ 1 ] . trim ( ) } } )
61
+ data : functions . map ( line => { return { fn : line . split ( '=' ) [ 1 ] . trim ( ) , graphType : 'polyline' } } )
62
62
}
63
63
// render
64
64
functionPlot ( fPlotOptions )
Original file line number Diff line number Diff line change 1
1
const { join } = require ( 'path' ) ;
2
+ const CopyPlugin = require ( 'copy-webpack-plugin' ) ;
2
3
3
4
module . exports = {
4
5
mode : "production" ,
@@ -23,6 +24,11 @@ module.exports = {
23
24
}
24
25
] ,
25
26
} ,
27
+ plugins : [
28
+ new CopyPlugin ( {
29
+ patterns : [ 'manifest.json' ]
30
+ } )
31
+ ] ,
26
32
resolve : {
27
33
extensions : [ '.ts' , '.js' ] ,
28
34
} ,
@@ -31,6 +37,7 @@ module.exports = {
31
37
} ,
32
38
output : {
33
39
path : join ( __dirname , "dist/" ) ,
40
+ clean : true ,
34
41
filename : 'main.js' ,
35
42
libraryTarget : 'commonjs'
36
43
}
You can’t perform that action at this time.
0 commit comments