Skip to content

A starter for a project with AngularJS (1.x), Bootstrap (4.x) and Font Awesome (4.x) powered by Symfony (4.x) with Webpack Encore.

License

Notifications You must be signed in to change notification settings

ducrot/starter-symfony-angularjs

Repository files navigation

starter-symfony-angularjs

A starter for a project with AngularJS (1.x), Bootstrap (4.x) and Font Awesome (4.x) powered by Symfony (4.x) with Webpack Encore.

  • Best practice Symfony installation with Flex and Webpack Encore support.
  • ES6, and ES7 support with Babel.
  • Add AngularJS DI with annotations (/* @ngInject */).
  • Source maps included in development builds.
  • Versioning in production builds.
  • Stylesheets with Autoprefixer and SASS (not required, regular css is supported too).

Quick start

Clone/Download the repo then use app.js inside assets/app.js as your starting point.

# clone the repo
$ git clone https://github.com/ducrot/starter-symfony-angularjs.git my-app

# change directory to your app
$ cd my-app

# install the dependencies with composer and yarn
$ composer install
$ yarn install

# Compile assets
$ yarn run encore dev

# start the server
$ php bin/console server:run

Go to https://localhost:8000 in your browser.

Getting Started

Dependencies

What you need to run this app:

  • composer, node and yarn
  • Ensure you're running Node (>=v8.x and <=v14.x) and Yarn (1.x+)

Installing

  • fork this repo
  • clone your fork
  • composer install and yarn install to install all dependencies

Developing

After you have installed all dependencies you can now start developing with:

  • yarn run encore dev --watch

Assets are automatically recompiled when files change.

Start a local webserver in a second shell with

  • php bin/console server:run

and open your browser with https://localhost:8000.

Production

To build your application, run:

  • yarn run encore production

Webpack Encore limitations

Webpack Encore has limitation in the area of HMR. See: Using webpack-dev-server and HMR.

Credits

License

MIT License

About

A starter for a project with AngularJS (1.x), Bootstrap (4.x) and Font Awesome (4.x) powered by Symfony (4.x) with Webpack Encore.

Resources

License

Stars

Watchers

Forks

Packages

No packages published