A batteries-included Mobile-First Angular 4+ and Angular Material 2 Seed Project
Demo Site: https://now-knyiccctgf.now.sh/home
Looking for a full-stack solution? Check out Minimal MEAN for full-stack, dockerized, TypeScript development setup.
Run the following command to pull the Docker image:
docker pull duluca/angular4-material2-starter
- Pre-installed Material 2, icons and theme
- Pre-installed Angular Flex Layout
- Pre-wired router, new HttpClient and Forms
- StandardJS compliant with prettier integration
- Suggested VS Code extensions & settings are packed in
- Easy cloud deployment with Zeit Now
- npm scripts for Docker
- npm scripts for AWS
- Minimal Node Web Server v8.4 for Production Publishing
To avoid issues that aries from maintaining varying versions of Angular CLI and TypeScript across multiple projects, it is highly recommended that you do not globally install
@angular/cli
andtypescript
.
After cloning the repository, run the following commands:
npm install
-- installs the app's dependenciesnpm start
-- serves the Angular app with live reloading for development purposes
Angular and Material releases are more frequent. Since the switchover to semver, it is now safe(r) to rapidly update your own code from one minor release to another, i.e. 4.2.2 to 4.4.3.
npm run update:check
-- displays a list of available safe (minor) and risky (major) updatesnpm run update:run
-- updates package.json and run npm install in safe modenpm run update:all
-- updates package.json and run npm install in risky mode
Note: No matter which mode you run, always pay attention to CLI messages about incompatibilities. i.e. There may be a new TypeScript version like
2.5.3
, but Angular CLI may request a version range of>=2.1.0 <2.4.0
. In that case heed the warning and executenpm install typescript@'>=2.1.0 <2.4.0'
to rollback the update to that particular package.
npm run docker:build
to build the Docker imagenpm run docker:debug
to test the Docker image
- Build and publish your Docker image
- Install now-cli by executing
npm install -g now
- Navigate to this project's
now
folder:cd now
- Update the
Dockerfile
to pull from your image - Execute
now --public --docker
- Voila, your project is publish on the web!
Below instruction have not been tested on a Windows environment
- Create
.env
file and setAWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- Sample
.env
file:
AWS_ACCESS_KEY_ID=your_own_key_id AWS_SECRET_ACCESS_KEY=your_own_secret_key
- Sample
- Install AWS CLI
- Mac:
brew install awscli
- Mac:
- Log in to AWS CLI with your credentials
- Run
aws configure
- You'll need your Access Key ID and Secret Access Key
- Default region name: us-east-1
- Run
npm run aws:release
to configure Docker with aws, publish your latest image build and release it on ECS