如何在Lerna中重命名软件包?

时间:2020-05-23 21:48:07

标签: javascript lerna

我可以简单地重命名文件夹吗?我没有在manual中看到任何特定的命令。

当前文件夹结构:

import React, { Component } from "react";
import { Button, Modal, ModalBody, Form, FormGroup,Label,Input} from "reactstrap";
import ClickButton from './ClickButton';

class Header extends Component {
  constructor(props) {

    super(props);

    this.state = {

      modal: false

    };
  }
  toggle = () => {

    this.setState({

      modal: !this.state.modal

    });

  }
  render() {
    return (
      <div>
        <Modal isOpen={this.state.modal}>
          <ModalBody>
          <Form>
      <FormGroup>
        <Label for="exampleEmail">Name</Label>
        <Input type="email" name="email" id="exampleEmail" placeholder="Enter Name" />
      </FormGroup>
            </Form>

          </ModalBody>
          <Button onClick={this.toggle}>Close</Button>
        </Modal>
          <Button onClick={this.toggle}>ModalComponent</Button>

          <ClickButton toggleModal={this.toggle} />

      </div>
    );
  }
}

export default Header;

/ | +-- package.json +-- lerna.json +-- packages/ | +-- dep1 +-- dep2 +-- app 的内容:

package.json

{ "name": "splitting", "version": "0.0.1", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "author": "", "license": "ISC", "dependencies": { "lerna": "^3.20.2" } } 的内容:

lerna.json

{ "packages": [ "packages/*" ], "version": "independent" } 内容中的文件package.json

packages/app/

0 个答案:

没有答案