Skip to content

Commit

Permalink
chore(): update dependencies (#29)
Browse files Browse the repository at this point in the history
* chore(): update dependencies for angular and dev tools

* chore(): update dependencies for commit hooks

* chore(): update templates and readme

* chore(): update serve port info

* chore(): update serve host info, default page, and remaining dependencies

* chore(): update copyright
  • Loading branch information
fyodorio authored Oct 3, 2022
1 parent 813a7fc commit 61b2436
Show file tree
Hide file tree
Showing 15 changed files with 1,637 additions and 3,579 deletions.
350 changes: 178 additions & 172 deletions .eslintrc

Large diffs are not rendered by default.

39 changes: 21 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)
[![coc-badge](https://img.shields.io/badge/codeof-conduct-ff69b4.svg?style=flat-square)](https://github.com/fyodorio/ng-hotrod/blob/master/.github/CODE_OF_CONDUCT.md)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![GitHub license](https://img.shields.io/github/license/loenko/ng-hotrod.svg)](https://github.com/fyodorio/ng-hotrod/blob/master/LICENSE)
[![GitHub license](https://img.shields.io/github/license/loenko/ng-hotrod.svg)](https://github.com/fyodorio/ng-hotrod/blob/master/LICENSE)

### Modern starter for AngularJS + Angular Material

Expand All @@ -13,27 +13,30 @@
#### [Demo](https://ng-hotrod.netlify.app)

#### Includes
* [AngularJS](https://angularjs.org/) (1.8.2) with component-based architecture
* [Angular Material](https://material.angularjs.org/latest/)
* [Sass](https://sass-lang.com/)
* [Vite](https://vitejs.dev/) (as modern zero-config Webpack alternative)
* [ESLint](https://eslint.org/)
* [Prettier](https://prettier.io/) for code formatting
* [hygen](https://www.hygen.io/) for code scaffolding
* [husky](https://github.com/typicode/husky) for pre-commit hooks

- [AngularJS](https://angularjs.org/) (1.8.3) with component-based architecture
- [Angular Material](https://material.angularjs.org/latest/)
- [Sass](https://sass-lang.com/)
- [Vite](https://vitejs.dev/) (as modern zero-config Webpack alternative)
- [ESLint](https://eslint.org/)
- [Prettier](https://prettier.io/) for code formatting
- [hygen](https://www.hygen.io/) for code scaffolding
- [husky](https://github.com/typicode/husky) for pre-commit hooks

#### Scripts
* `npm install` - install all the dependencies
* `npm start` - serve with hot reload at `localhost:1234`
* `npm run build` - build bundled version in `dist` folder
* `npm run lint` - lint code in `app` folder by ESLint with included config
* `npm run format` - format code with Prettier
* `npx hygen component new --name new-component --path relative/path/inside/of/src/app/folder` - generate folder with default component code files
* `npx hygen service new --name new-service --path relative/path/inside/of/src/app/folder` - generate folder with default service code files

- `npm install` - install all the dependencies
- `npm start` - serve with hot reload at `http://127.0.0.1:5173`
- `npm run build` - build bundled version in `dist` folder
- `npm run lint` - lint code in `app` folder by ESLint with included config
- `npm run format` - format code with Prettier
- `npx hygen component new --name new-component --path relative/path/inside/of/app/folder` - generate folder with default component code files (run from root folder!)
- `npx hygen service new --name new-service --path relative/path/inside/of/app/folder` - generate folder with default service code files (run from root folder!)

#### Contributing

Thank you for your interest in contributing to ng-hotrod! There are many ways to contribute to this project. Get started [here](https://github.com/loenko/ng-hotrod/blob/master/.github/CONTRIBUTING.md).

#### Credits
* This starter is inspired by [Angular Class' NG6 Starter](https://github.com/gdi2290/NG6-starter) and [angular-starter-es6-webpack](https://github.com/TheLarkInn/angular-starter-es6-webpack)
* ESLint [config](https://github.com/vorant/eslint-codestyle) is developed by [Anton Voroshilov](https://github.com/vorant)

This starter is inspired by [Angular Class' NG6 Starter](https://github.com/gdi2290/NG6-starter) and [angular-starter-es6-webpack](https://github.com/TheLarkInn/angular-starter-es6-webpack)
8 changes: 4 additions & 4 deletions _templates/component/new/component.ejs.t
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.component.js
to: app/<%=path%>/<%=name%>/<%=name%>.component.js
---
'use strict';

Expand All @@ -8,9 +8,9 @@ import controller from './<%=name%>.controller';
import './<%=name%>.scss';

const <%=h.changeCase.camel(name)%>Component = {
bindings: {},
template,
controller
bindings: {},
template,
controller,
};

export default <%=h.changeCase.camel(name)%>Component;
10 changes: 5 additions & 5 deletions _templates/component/new/controller.ejs.t
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.controller.js
to: app/<%=path%>/<%=name%>/<%=name%>.controller.js
---
'use strict';

class <%=h.changeCase.pascal(name)%>Controller {
/* @ngInject */
constructor() {
this.name = '<%=name%>';
}
/* @ngInject */
constructor() {
this.name = '<%=name%>';
}
}

export default <%=h.changeCase.pascal(name)%>Controller;
2 changes: 1 addition & 1 deletion _templates/component/new/html.ejs.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.html
to: app/<%=path%>/<%=name%>/<%=name%>.html
---
<div class="<%=name%>">{{ $ctrl.name }}</div>
9 changes: 4 additions & 5 deletions _templates/component/new/module.ejs.t
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.module.js
to: app/<%=path%>/<%=name%>/<%=name%>.module.js
---
'use strict';

import <%=h.changeCase.camel(name)%>Component from './<%=name%>.component';

const <%=h.changeCase.camel(name)%>Module = angular.module('<%=h.changeCase.camel(name)%>', [])
const <%=h.changeCase.camel(name)%>Module = angular
.module('<%=h.changeCase.camel(name)%>', [])

.component('<%=h.changeCase.camel(name)%>', <%=h.changeCase.camel(name)%>Component)

.name;
.component('<%=h.changeCase.camel(name)%>', <%=h.changeCase.camel(name)%>Component).name;

export default <%=h.changeCase.camel(name)%>Module;
2 changes: 1 addition & 1 deletion _templates/component/new/scss.ejs.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.scss
to: app/<%=path%>/<%=name%>/<%=name%>.scss
---
.<%=name%> {}
2 changes: 1 addition & 1 deletion _templates/component/new/test.spec.ejs.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.spec.js
to: app/<%=path%>/<%=name%>/<%=name%>.spec.js
---
9 changes: 4 additions & 5 deletions _templates/service/new/module.ejs.t
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.module.js
to: app/<%=path%>/<%=name%>/<%=name%>.module.js
---
'use strict';

import <%=h.changeCase.pascal(name)%>Service from './<%=name%>.service';

const <%=h.changeCase.camel(name)%>Module = angular.module('<%=h.changeCase.camel(name)%>', [])
const <%=h.changeCase.camel(name)%>Module = angular
.module('<%=h.changeCase.camel(name)%>', [])

.service('<%=h.changeCase.pascal(name)%>', <%=h.changeCase.pascal(name)%>Service)

.name;
.service('<%=h.changeCase.pascal(name)%>', <%=h.changeCase.pascal(name)%>Service).name;

export default <%=h.changeCase.camel(name)%>Module;
10 changes: 5 additions & 5 deletions _templates/service/new/service.ejs.t
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.service.js
to: app/<%=path%>/<%=name%>/<%=name%>.service.js
---
class <%=h.changeCase.pascal(name)%>Service {
/* @ngInject */
constructor() {
this.name = '<%=name%>';
}
/* @ngInject */
constructor() {
this.name = '<%=name%>';
}
}

export default <%=h.changeCase.pascal(name)%>Service;
2 changes: 1 addition & 1 deletion _templates/service/new/test.spec.ejs.t
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
to: src/app/<%=path%>/<%=name%>/<%=name%>.spec.js
to: app/<%=path%>/<%=name%>/<%=name%>.spec.js
---
2 changes: 1 addition & 1 deletion app/app.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ export const AppComponent = {
template: `
<navbar></navbar>
<page-home></page-home>
<md-toolbar layout="column" layout-align="center center">Copyright © 2021 fyodor.io</md-toolbar>
<md-toolbar layout="column" layout-align="center center">Copyright © 2018-2022 fyodor.io</md-toolbar>
`,
};
4 changes: 2 additions & 2 deletions app/components/page-home/page-home.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ const pageHomeComponent = {
bindings: {},
template: `
<md-content class="page-home">
<h2 class="md-display-1">Modern starter for AngularJS + Angular Material</h2>
<h2 class="md-display-1">Modern starter for AngularJS + Angular Material + Vite</h2>
<img
class="hero-img"
src="https://res.cloudinary.com/fyodorio/image/upload/v1611994660/my-logos/hotrod-logo_rhkfxy.jpg"
alt="ng-hotrod">
<h3 class="md-title">FEATURING:</h3>
<div layout="column" layout-align="center center">
<ul class="md-headline" layout="column" layout-align="start start">
<li><a href="https://angularjs.org/">AngularJS</a> (1.8.2)</li>
<li><a href="https://angularjs.org/">AngularJS</a> (1.8.3)</li>
<li><a href="https://material.angularjs.org/latest/">Angular Material</a></li>
<li><a href="https://sass-lang.com/">Sass</a></li>
<li><a href="https://vitejs.dev/">Vite</a></li>
Expand Down
Loading

0 comments on commit 61b2436

Please sign in to comment.