项目原始demo,不改动
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

19 lines
498 B

  1. var resolveName = require('../../utils/names.js').property;
  2. var handlers = {
  3. 'font': require('./property/font.js'),
  4. 'font-weight': require('./property/font-weight.js'),
  5. 'background': require('./property/background.js')
  6. };
  7. module.exports = function compressValue(node) {
  8. if (!this.declaration) {
  9. return;
  10. }
  11. var property = resolveName(this.declaration.property.name);
  12. if (handlers.hasOwnProperty(property.name)) {
  13. handlers[property.name](node);
  14. }
  15. };