mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
31 lines
862 B
JavaScript
31 lines
862 B
JavaScript
const setupPackage = require('./setup-package');
|
|
const path = require('path');
|
|
const fse = require('fs-extra');
|
|
const shell = require('./utils').shell;
|
|
const step = require('./utils').step;
|
|
const error = require('./utils').error;
|
|
const libRoot = path.join(__dirname, '../lib');
|
|
const rootDir = path.join(__dirname, '../');
|
|
|
|
const buildPkg = step('build pkg...', () => shell(`yarn build`));
|
|
|
|
const printPkg = step('print pkg...', () => {
|
|
const genPkgJson = fse
|
|
.readFileSync(`${libRoot}/package.json`)
|
|
.toString('utf-8');
|
|
console.log(JSON.parse(genPkgJson));
|
|
});
|
|
|
|
const copyFromRoot = (file) =>
|
|
fse.copySync(`${rootDir}/${file}`, `${libRoot}/${file}`, { overwrite: true });
|
|
|
|
Promise.resolve(true)
|
|
.then(buildPkg)
|
|
.then(() => {
|
|
setupPackage();
|
|
printPkg();
|
|
copyFromRoot('README.md');
|
|
copyFromRoot('LICENSE');
|
|
})
|
|
.catch(error);
|