Git Product home page Git Product logo

rp-app's Introduction

rp-app

This repo/moduel is now archived and will not be updated! please find another alternative :(

ICON IMG ICON IMG


Fixes

  • At the @latest version, some bugs are fixed: This package is now available for windows/linux/mac platforms.

Usage

This package gives you a nice react app development tool combining with php for the back-end.

You can simply test and debug in php live dev server.

This project uses the following technos:

  • rp-app-core
    • webpack
    • babel
    • node-php-server
    • nodemon
    • ...

This is just the beginning of the project! So if there was some bugs, just mention it. We'll try to fix it.


Special Notice

You can not use inline php codes in react files directly.

But you can use php in the index.php (index file) or use ajax/fetch requests to php files.

Browser auto opening, might not work on some devices. So you must yourself, open the browser and submit the address localhost:4000 : that is because of an error not handled in the package opn. (they'll fix it as soon as possible)

Install

Install the package by npm or yarn.

Note that you must have already installed yarn by: npm i -g yarn.

npm i -g rp-app

OR

yarn global add rp-app

Create And Run

You can create an app with the command bellow ( `dir` is the directory name, you wanna be created! ) :

rp-app create <dir>

Then, run the app on the dev server by:

cd <dir>
npm start

Congrats !

Now, your default browser is going to be opened at this address: http://localhost:4000

You can change the default contents by changing the files mentioned at the hierarchy section


Hierarchy Of App

------ .babelrc

------ webpack.config.js

------ nodemon.json

------ package.json

------ [node_modules]

------ [public]

---------------|

--------------- index.php

--------------- favicon.ico

--------------- [reloader]

------ [scripts]

------ [src]

------------|

------------ [assets]

------------ [components]


Some Notes

Note That: You can change configs of the dev server in scripts folder.

Note That: This rp-app creator just packs for development purposes. For now (v 0.0.x) there is no build options for production mode. But you can configure that, by manipulating scripts folder.

Note That: You can see the hirearchy of files (core files) in rp-app-core package. This package contains core files for this app creator!


Note That: This server can be auto reloaded just on one tab. So please pay attention that there not to be more than one tab opened on the browser.

Note That: Each auto-refreshing time is something between 6 ~ 10 seconds. So if you want it not to be refreshed automatically, just remove the script beneath the index.php file: <script src="./reloader/reloader.js"></script>

Licence

This package is under Apache-2.0 LICENCE

rp-app's People

Contributors

alirezakay avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rp-app's Issues

Create app with npx doesn't working

Greetings, npx doesn't working when I want create app. I getting this error on the windows:

path of rp-app: C:\Users\Derid\AppData\Roaming\npm\node_modules\rp-app\cli.js

[rp-app-cli] is running...
Creating directory `x` And Initializing
Please wait
It might take several minutes!

{ Error: Command failed: mkdir x && cd ./x && npm install rp-app-core --no-save --prefix ./ && cp -rf ./node_modules/rp-app-core/. ./ &&  rm -rf ./node_modules/rp-app-core
A subdirectory or file x already exists.

    at ChildProcess.exithandler (child_process.js:275:12)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Socket.stream.socket.on (internal/child_process.js:346:11)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at Pipe._handle.close [as _onclose] (net.js:557:12)
  killed: false,
  code: 1,
  signal: null,
  cmd: 'mkdir x && cd ./x && npm install rp-app-core --no-save --prefix ./ && cp -rf ./node_modules/rp-app-core/. ./ &&  rm -rf ./node_modules/rp-app-core' }

Please fix this, I wanna use Your work/app.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.