Skip to content

Commit

Permalink
Merge pull request #1102 from ggd543/feat/stylus
Browse files Browse the repository at this point in the history
feat: add support stylus
  • Loading branch information
yuanyan authored Jun 20, 2019
2 parents d1e86de + c78bbe0 commit 1be0328
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/babel-plugin-transform-jsx-stylesheet/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const GET_STYLE_FUNC_NAME = '_getStyle';
const MERGE_STYLES_FUNC_NAME = '_mergeStyles';
const GET_CLS_NAME_FUNC_NAME = '_getClassName';
const NAME_SUFFIX = 'StyleSheet';
const cssSuffixs = ['.css', '.scss', '.sass', '.less'];
const cssSuffixs = ['.css', '.scss', '.sass', '.less', '.styl'];

export default function({ types: t, template }) {
const mergeStylesFunctionTemplate = template(`
Expand Down Expand Up @@ -51,7 +51,7 @@ function ${GET_CLS_NAME_FUNC_NAME}() {
}
`);
const getStyleFunctionTemplete = template(`
function ${GET_STYLE_FUNC_NAME}(classNameExpression) {
function ${GET_STYLE_FUNC_NAME}(classNameExpression) {
var cache = ${STYLE_SHEET_NAME}.__cache || (${STYLE_SHEET_NAME}.__cache = {});
var className = ${GET_CLS_NAME_FUNC_NAME}(classNameExpression);
var classNameArr = className.split(/\\s+/);
Expand Down

0 comments on commit 1be0328

Please sign in to comment.