$ cnpm install singlepage-js -g
Singlepage.js is a pure Javascript portal platform for building modular Web applications.
Visit https://www.singlepagejs.com for full documentation.
Singlepage.js is a pure Javascript portal platform for building modular Web applications. The platform is composed of three components:
Install singlepage-js
globally.
npm install -g singlepage-js
Global installation of singlepage-js provides the singlepage
command that can be used to generate application boilerplate and serve your application.
# Create app boilerplate
singlepage create myapp
# Change to myapp directory and start serving boilerplate application
cd myapp
singlepage serve
Open a Web browser and access your application on http://localhost:8080.
Click on the Login button on the top right corner. Use admin/admin as your username/password. The Login button will be replaced by a button that shows current user information. Click on the button and select Turn on Edit Mode
. This will show editing commands in the same dropdown. It also shows a gear icon and a drag icon on each portal window (component). The following is a quick summary of supported edit operations:
Add
button next to it. Select the component you want to add from the select dropdown and click Add
to add that component to the columnPage Manager
option from the top portal menu and click on "New Folder" buttonUse build
command to create your distribution. The distribution is created in the dist
folder under your application directory. You can use spstart.js
script in the bin
directory to run the server.
cd myapp
singlepage build
node ./dist/bin/spstart.js
You can simply copy the dist directory to your production environment to deploy it. Additional steps such as installing node and running npm install
may be needed depending on your hosting provider and your method of deployment.
Copyright 2014 - 2016 © taobao.org |