fix predeploy cmd

This commit is contained in:
afc163 2016-05-23 20:13:43 +08:00
parent dd33cb8f60
commit 3b89533001
2 changed files with 1 additions and 15 deletions

View File

@ -120,7 +120,7 @@
"clean": "antd-tools run clean", "clean": "antd-tools run clean",
"start": "antd-tools run start", "start": "antd-tools run start",
"site": "antd-tools run site", "site": "antd-tools run site",
"pre-deploy": "node ./scripts/predeploy", "pre-deploy": "cp CNAME _site && rsync -R components/*/demo/*.json _site",
"deploy": "antd-tools run update-self && antd-tools run deploy", "deploy": "antd-tools run update-self && antd-tools run deploy",
"just-deploy": "antd-tools run just-deploy", "just-deploy": "antd-tools run just-deploy",
"lint": "npm run srclint && npm run demolint && npm run lesshint", "lint": "npm run srclint && npm run demolint && npm run lesshint",

View File

@ -1,14 +0,0 @@
#!/usr/bin/env node
/* eslint-disable */
'use strict';
// Copy CNAME and components into _site before site deploy
const fs = require('fs');
const path = require('path');
const execSync = require('child_process').execSync;
if(fs.existsSync(path.join(process.cwd(), '_site'))) {
execSync('cp CNAME _site');
execSync('rsync -R components/**/*.json _site');
}