Use
gulp
to build multi-page webapp.
This project has been deprecated. Please use SSR(React
or Vue
) instead.
##install
npm install
gulp build
node index.js
then visit http://localhost:3000 view document source code, you will find it.
edit build/conf.js
file, and configure your tasks.
when you are developing your app
- edit settings.js, change
debug = true
- run the following command
nodemon index.js
gulp dev
it will do the following things
- concat each page styles and scripts
- inject them into html
when you are preparing to publish your app
- edit settings.js, change
debug = false
- run the following command
gulp build
it will do the following things
- concat each page styles and scripts
- compress style and script and rename each file with hash suffix.
- inject them into html.
you can also build single page with the page task, for example:
index page for development
gulp index-dev
index page for production
gulp index-build