選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

readme.md 808 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #Browsersync - Server example
  2. ## Installation/Usage:
  3. To try this example, follow these 4 simple steps.
  4. **Step 1**: Clone this entire repo
  5. ```bash
  6. $ git clone https://github.com/Browsersync/recipes.git bs-recipes
  7. ```
  8. **Step 2**: Move into the directory containing this example
  9. ```bash
  10. $ cd bs-recipes/recipes/server
  11. ```
  12. **Step 3**: Install dependencies
  13. ```bash
  14. $ npm install
  15. ```
  16. **Step 4**: Run the example
  17. ```bash
  18. $ npm start
  19. ```
  20. ### Additional Info:
  21. To see the live-updating and CSS injecting, simply perform changes to either `index.html` or `css/main.css`
  22. ### Preview of `app.js`:
  23. ```js
  24. /**
  25. * Require Browsersync
  26. */
  27. var browserSync = require('browser-sync');
  28. /**
  29. * Run Browsersync with server config
  30. */
  31. browserSync({
  32. server: "app",
  33. files: ["app/*.html", "app/css/*.css"]
  34. });
  35. ```