Browse Source

site: to be compatibled with old browsers

pull/1363/head
Benjy Cui 9 years ago
parent
commit
2728ea4fa1
  1. 3
      package.json
  2. 2
      scripts/build-common.js
  3. 2
      scripts/build-demos-list.js
  4. 2
      site/common/lib.js

3
package.json

@ -90,6 +90,7 @@
"dora-plugin-hmr": "^0.5.0",
"dora-plugin-webpack": "^0.6.2",
"enquire.js": "^2.1.1",
"es6-shim": "^0.35.0",
"eslint": "^2.2.0",
"eslint-config-airbnb": "^6.0.1",
"eslint-plugin-babel": "^3.0.0",
@ -178,4 +179,4 @@
"path": "./node_modules/cz-conventional-changelog"
}
}
}
}

2
scripts/build-common.js

@ -12,7 +12,7 @@ module.exports = function buildCommon(dirs, outputFile) {
let content = 'module.exports = {';
mds.forEach((fileName) => {
const requirePath = path.relative(path.dirname(outputFile), fileName);
content += `\n '${fileName}': require('antd-md!${requirePath}'),`;
content += `\n '${fileName}': require('babel!antd-md!${requirePath}'),`;
});
content += '\n};';

2
scripts/build-demos-list.js

@ -24,7 +24,7 @@ module.exports = function buildDemosList(dirs, outputPath) {
content += `\n '${key}': [`;
groupedDemos[key].forEach((fileName) => {
const requirePath = path.relative(path.dirname(outputPath), fileName)
content += `\n require('antd-md?demo!${requirePath}'),`;
content += `\n require('babel!antd-md?demo!${requirePath}'),`;
});
content += '\n ],'
});

2
site/common/lib.js

@ -14,3 +14,5 @@ import './styles/mock-browser.less';
import './styles/colors.less';
import './styles/motion.less';
import './styles/responsive.less';
import 'es6-shim';

Loading…
Cancel
Save