Browse Source

remove completely, #567

pull/653/head
afc163 9 years ago
parent
commit
69dc8e5fc4
  1. 2
      index.js
  2. 1
      scripts/demo.js
  3. 3
      scripts/prenpm.js

2
index.js

@ -1,7 +1,5 @@
import React from 'react';
require('./style/index.less');
const antd = {
Affix: require('./components/affix'),
Datepicker: require('./components/datepicker'),

1
scripts/demo.js

@ -32,6 +32,7 @@ window.React = React;
window.ReactDOM = ReactDOM;
window['object-assign'] = require('object-assign');
window['classnames'] = require('classnames');
require('./importCss');
antd.Datepicker.locale = {
en_US: require('../components/datepicker/locale/en_US'),

3
scripts/prenpm.js

@ -6,8 +6,7 @@ var pkg = require('../package');
var originalIndex = fs.readFileSync(path.join(cwd, 'lib/index.js'), 'utf-8');
var newIndex = originalIndex
.replace(/\/components\//g, '/')
.replace(/require\(\'\.\/package.json\'\)/g, "require('./package')")
.replace("require('./style/index.less')", "");
.replace(/require\(\'\.\/package.json\'\)/g, "require('./package')");
fs.writeFileSync(path.join(cwd, 'lib/index.js'), newIndex, 'utf-8');
fs.writeFileSync(
path.join(cwd, 'lib/package.js'),

Loading…
Cancel
Save