Skip to content

Commit

Permalink
use lib directly in build/plotcss.js
Browse files Browse the repository at this point in the history
  • Loading branch information
etpinard committed Aug 10, 2016
1 parent fb9c5f4 commit 0981630
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions build/plotcss.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

var Plotly = require('../src/plotly');
var Lib = require('../src/lib');
var rules = {
"X,X div": "font-family:'Open Sans', verdana, arial, sans-serif;margin:0;padding:0;",
"X input,X button": "font-family:'Open Sans', verdana, arial, sans-serif;",
Expand Down Expand Up @@ -58,5 +58,5 @@ for(var selector in rules) {
var fullSelector = selector.replace(/^,/,' ,')
.replace(/X/g, '.js-plotly-plot .plotly')
.replace(/Y/g, '.plotly-notifier');
Plotly.Lib.addStyleRule(fullSelector, rules[selector]);
Lib.addStyleRule(fullSelector, rules[selector]);
}
4 changes: 2 additions & 2 deletions tasks/util/pull_css.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ module.exports = function pullCSS(data, pathOut) {
var outStr = [
'\'use strict\';',
'',
'var Plotly = require(\'../src/plotly\');',
'var Lib = require(\'../src/lib\');',
'var rules = ' + rulesStr + ';',
'',
'for(var selector in rules) {',
' var fullSelector = selector.replace(/^,/,\' ,\')',
' .replace(/X/g, \'.js-plotly-plot .plotly\')',
' .replace(/Y/g, \'.plotly-notifier\');',
' Plotly.Lib.addStyleRule(fullSelector, rules[selector]);',
' Lib.addStyleRule(fullSelector, rules[selector]);',
'}',
''
].join('\n');
Expand Down

0 comments on commit 0981630

Please sign in to comment.