定制 ephect-io/create-app 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ephect-io/create-app

Composer 安装命令:

composer require ephect-io/create-app

包简介

Effective!

README 文档

README

Ephect

Create-App

This is a quick start to help you create a working Ephect project.

This repository is not intended to be cloned. Instead, follow the instructions below.

Requirements

Since Ephect is an hybrid environment, you need both PHP and NodeJS installed.

It's highly recommended to use the last versions.

Ephect is compatible with PHP 8.3 and NodeJS LTS 20.12.0.

Create a basic Ephect application project

Open a terminal and type:

composer create-project ephect-io/create-app my-project

Move to my-project directory.

You will see an app directory in which you will find the standard structure of an Ephect application:

    app
    ├── Assets
    │   ├── css
    │   │   ├── app.css
    │   │   ├── index.css
    │   ├── img
    │   │   └── salamandra.png
    │   ├── .htaccess
    │   ├── bootstrap.php
    │   ├── favicon.ico
    │   ├── index.php
    │   └── web.config
    ├── Commands
    │   └── Hello.php
    ├── Components
    │   ├── Additionals
    │   │   ├── Footer.phtml
    │   │   ├── Header.phtml
    │   │   ├── HeaderAndFooter.phtml
    │   │   └── Mother.phtml
    │   └── Home
    │       ├── Com.phtml
    │       └── Dummy.phtml
    ├── JavaScripts
    │   └── index.js
    ├── Pages
    │   └── Home.phtml
    ├── App.phtml
    └── Switcher.phtml

the public directory is not empty but its files are later overwritten by assets files:

    public
    ├── bootstrap.php
    ├── favicon.ico
    └── index.php

Build the application

First, install all needed modules.

npm install

To run the application without setting up a web server, you need to serve the application in a separate terminal.

Open another terminal, move to your project directory and type:

php use serve

Come back to the first terminal and type

npm run dev

You should see something like this:

> create-app@0.7.0 dev
> run-script-os

> create-app@0.7.0 dev:darwin:linux
> bash scripts/dev.sh all

Running webpack...
asset app.min.js 2.32 KiB [emitted] (name: main)
runtime modules 274 bytes 1 module
./app/JavaScripts/index.js 212 bytes [built] [code generated]
webpack 5.91.0 compiled successfully in 257 ms

Publishing assets...
app/Assets/css -> public/css
app/Assets/css/app.css -> public/css/app.css
app/Assets/css/index.css -> public/css/index.css
app/Assets/css/setup.css -> public/css/setup.css
app/Assets/img -> public/img
app/Assets/img/css -> public/img/css
app/Assets/img/css/app.css -> public/img/css/app.css
app/Assets/img/css/index.css -> public/img/css/index.css
app/Assets/img/css/setup.css -> public/img/css/setup.css
app/Assets/img/salamandra.png -> public/img/salamandra.png

Sharing modules...
node_modules/human-writes/dist/web/human-writes.min.js -> public/modules/human-writes.min.js

Building the app...
Compiling App ... 021ms
Compiling Home, querying http://localhost:8000/ ... 017ms

It's a simple page with 2 children components; the first passes values to the second with useState hook.

You will find the generated application in the directory cache.

Nota bene

While this sample works well enough in the PHP embedded server, consider setting up a dedicated web server for your project.

Find more information in the Documentation repository https://github.com/ephect-io/documentation.

统计信息

  • 总下载量: 106
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PowerShell

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2021-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固