Skip to content

Commit

Permalink
Log a message when loading a plugin (#448)
Browse files Browse the repository at this point in the history
Fixes #323
  • Loading branch information
giuseppeg authored May 12, 2018
1 parent 051d0d1 commit a55c821
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,8 @@ export const combinePlugins = plugins => {
}
}

log('Loading plugin from path: ' + plugin)

// eslint-disable-next-line import/no-dynamic-require
let p = require(plugin)
if (p.default) {
Expand Down Expand Up @@ -638,3 +640,7 @@ export const setStateOptions = state => {
})
}
}

export function log(message) {
console.log('[styled-jsx] ' + message)
}
2 changes: 1 addition & 1 deletion src/stylesheet-registry.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import hashString from 'string-hash'
import DefaultStyleSheet from './lib/stylesheet'

const sanitize = rule => rule.replace(/\/style/ig, '\\/style')
const sanitize = rule => rule.replace(/\/style/gi, '\\/style')
export default class StyleSheetRegistry {
constructor({
styleSheet = null,
Expand Down

0 comments on commit a55c821

Please sign in to comment.