GithubHelp home page GithubHelp logo

xp-lib-browsersync's Introduction

lib-browsersync

Listen for node events (creating, updating and deleting) from Enonic XP and trigger a browsersync reload if server is running with dev flag

Usage

Deploy to your your Enonic XP installation.

Then start the server with the dev flag (Enonic XP Development mode)

You will quite obviously also need to have browsersync up and running.

Example

Install Browsersync from npm using: npm install -g browser-sync

Start Browsersync proxying Enonic. browser-sync start --proxy 'localhost:8080'

Navigate to your project page or preview with something like this: http://localhost:3000/admin/portal/preview/draft/sitename

Do a change on the content and Browsersync will perform a reload of the page.

Pro tip

Make Browsersync watch files aswell, it will then hotreload resources that it can and otherwise perform a full reload keeping the scroll position. This works great when chaning templates!

This example listens for changes in your projects assets directory, schemas, controllers and templates (Freemarker):

browser-sync start --proxy 'localhost:8080' --files 'src/**/assets/**/*.css' 'src/**/assets/**/*.js' 'src/**/*.ftl' 'src/**/*.xml' 'src/**/*.js'

xp-lib-browsersync's People

Contributors

edwardgronroos avatar

Stargazers

Bobby Westberg avatar

Watchers

Christian Westgaard avatar Andre Sollie avatar James Cloos avatar Mats Erikstad avatar Tommy Paulsen avatar

xp-lib-browsersync's Issues

JitPack?

I basically tried to do this:
https://jitpack.io/private#tineikt/xp-lib-browsersync:-SNAPSHOT

Just replace the "compile" with "include" and I end up with this:

> Could not resolve all dependencies for configuration ':includeCopy'.
   > Could not resolve com.github.tineikt:xp-lib-browsersync:-SNAPSHOT.
     Required by:
         com.enonic.starter:starter-babel:1.1.0
      > Could not resolve com.github.tineikt:xp-lib-browsersync:-SNAPSHOT.
         > Unable to load Maven meta-data from https://jitpack.io/com/github/tineikt/xp-lib-browsersync/-SNAPSHOT/maven-metadata.xml.
            > Could not GET 'https://jitpack.io/com/github/tineikt/xp-lib-browsersync/-SNAPSHOT/maven-metadata.xml'. Received status code 524 from server: Origin Time-out

Could not get unknown property 'nexusUser' for Credentials [username: null]

xp-lib-browsersync (master) $ ./gradlew
Starting a Gradle Daemon (subsequent builds will be faster)
Download http://repo.enonic.com/public/com/enonic/xp/gradle-plugin/6.9.1/gradle-plugin-6.9.1.pom
Download http://repo.enonic.com/public/com/enonic/xp/gradle-plugin/6.9.1/gradle-plugin-6.9.1.jar

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/cwe/github/tineikt/xp-lib-browsersync/build.gradle' line: 50

* What went wrong:
A problem occurred configuring root project 'xp-lib-browsersync'.
> Exception thrown while executing model rule: PublishingPlugin.Rules#publishing(ExtensionContainer)
   > Could not get unknown property 'nexusUser' for Credentials [username: null] of type org.gradle.api.internal.artifacts.repositories.DefaultPasswordCredentials_Decorated.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 6.121 secs

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.