Scaffold a headless Drupal backend, Angular app client, and Behat tests
Hedley is a yeoman generator that scaffolds a headless Drupal backend, Angular app client, and Behat tests. Its a great starting point for learning and developing fully decoupled websites, that follow best practices, and includes automatic testing using Behat.
To install generator-hedley from npm, run:
npm install -g generator-hedleyAs we generate not only a Web app but also add behat and other scripts make sure to create a project directory.
mkdir my-hedley-project
cd my-hedley-projectFinally, initiate the generator:
yo hedleyYou can scaffold a new app with no user interaction, for example:
yo hedley --skip-install --project-name=skeleton --github-repo=https://github.com/Foo/skeleton --db=skeleton --db-user=root --db-pass=root --drupal-url=http://localhost/skeleton/www
Integrated into hedley an automated scripts for "Pantheon’s Cloud Integration", The scripts are initiated through pantheon.yml and do the following:
- Sanitization for the DEV database when cloned from TEST or LIVE environments (Basically replaces all domains in user's emails to
@test). - Revert all features, The features will be reverted on each deploy to the DEV.
You can add or remove operations by editing pantheon.yml file in the root of the project.
In order to develop generator-hedley and provide pull requests the following steps should be taken:
- Git clone your fork locally.
npm installinside the new directorynpm link- This makes your local system sync with the changes you makemkdir skeleton- Inside the new directory, initiate
yo hedley, and make sure to keep the default project name toskeleton cp sync_hedley.example.sh sync_hedley.sh- Edit
sync_hedley.shand point the theGENERATOR_FOLDERvariable to the place wheregenerator-hedleyis located - From now on, you may easily sync back your changes back to the forked
generator-hedleyby executing./sync_hedley.sh
MIT