Development

Youplay template is developer-friendly and contains source files + gulp tasks.

Make sure, that we will not help you with any troubles that you faced with source builds, so if you don’t have any experience with npm, gulp and webpack, please first learn more about these tools. These sources only for developers.

Requirements

Getting started

  • Unzip downloaded template and open /youplay/ folder
  • Install packages npm install
  • Start development npm run dev
  • Prepare for deploy npm run deploy

Configure

All build configurations placed in package.json. Configurations for HTML files places in /src/html/data/global.json

Troubleshooting

Sometimes, when you run dev the task, you will only see a white screen in your browser preview. In most cases, this is easily resolved when you install PHP in your system. But sometimes it is not working, and you need to customize the browserSync task manually. To customize it, follow these steps:

  1. Open gulpfile.babel.js file in your code/text editor
  2. Find this code part:
$.connectPhp.server(gulpConfig.php, () => {
    browserSync(gulpConfig.browserSync);
});
  1. And change it to this one:
browserSync.init({
    server: {
        baseDir: gulpConfig.php.base,
        open: true,
        notify: false,
    },
});
Was this page helpful?