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).
Clone/Download the repo then use
app.js
insideassets/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 http://localhost:8000 in your browser.
What you need to run this app:
composer
,node
andyarn
- Ensure you're running Node (>=
v8.x
and <=v14.x
) and Yarn (1.x
+)
fork
this repoclone
your forkcomposer install
andyarn install
to install all dependencies
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 http://localhost:8000
.
To build your application, run:
yarn run encore production
Webpack Encore has limitation in the area of HMR. See: Using webpack-dev-server and HMR.
- The ACME logo was created by Acme Logos - Professional Placeholder Logos.
- The basis of this readme and some ideas were taken from preboot/angularjs-webpack.
- The fundamentals and best practices are taken from angular-tips.com.