Skip to content

Commit 25270b3

Browse files
committed
chore(): switch to vite
1 parent b22de2c commit 25270b3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+5066
-185
lines changed

.babelrc

Lines changed: 0 additions & 8 deletions
This file was deleted.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ node_modules
99
*.log
1010
dist/
1111
yarn.lock
12-
package-lock.json

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
#### [Demo](https://fyodorio.github.io/ng-hotrod/)
1414

1515
#### Includes
16-
* [AngularJS](https://angularjs.org/) (1.8.2)
16+
* [AngularJS](https://angularjs.org/) (1.8.2) with component-based architecture
1717
* [Angular Material](https://material.angularjs.org/latest/)
1818
* [Sass](https://sass-lang.com/)
19-
* [Babel](https://babeljs.io/) (latest ECMAScript + DI annotation plugin)
20-
* [Parcel](https://parceljs.org/) (as modern zero-config Webpack alternative)
19+
* [Vite](https://vitejs.dev/) (as modern zero-config Webpack alternative)
2120
* [ESLint](https://eslint.org/)
2221
* [Prettier](https://prettier.io/) for code formatting
2322
* [hygen](https://www.hygen.io/) for code scaffolding

app/app.component.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export const AppComponent = {
2+
bindings: {},
3+
template: `
4+
<navbar></navbar>
5+
<page-home></page-home>
6+
<md-toolbar layout="column" layout-align="center center">Copyright © 2021 fyodor.io</md-toolbar>
7+
`,
8+
};

app/app.js

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
import 'angular-animate';
2+
import 'angular-aria';
3+
import 'angular-messages';
4+
import 'angular-material';
5+
import ComponentsModule from './components/components';
6+
import ServicesModule from './services/services';
7+
import { AppComponent } from './app.component';
8+
9+
const appModule = angular
10+
.module('appModule', [
11+
'ngAnimate',
12+
'ngAria',
13+
'ngMessages',
14+
'ngMaterial',
15+
ComponentsModule,
16+
ServicesModule,
17+
])
18+
.config([
19+
'$mdThemingProvider',
20+
($mdThemingProvider) => {
21+
$mdThemingProvider
22+
.theme('default')
23+
.primaryPalette('brown')
24+
.accentPalette('amber');
25+
},
26+
])
27+
28+
.component('app', AppComponent);
29+
30+
export default appModule;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import Navbar from './navbar/navbar';
22
import PageHome from './page-home/page-home';
33

4-
const componentsModule = angular.module('components', [Navbar, PageHome]).name;
4+
const ComponentsModule = angular.module('components', [Navbar, PageHome]).name;
55

6-
export default componentsModule;
6+
export default ComponentsModule;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import controller from './navbar.controller';
2+
import './navbar.scss';
3+
4+
const navbarComponent = {
5+
bindings: {},
6+
template: `
7+
<md-toolbar class="navbar">
8+
<div class="md-toolbar-tools">
9+
<div flex layout="row" layout-align="start center">
10+
<img class="ng-hotrod-logo" ng-src="{{ $ctrl.ngHotrodLogo }}" alt="GitHub">
11+
<h2 class="active-page-name" md-truncate>{{ $ctrl.NavigationService.currentPageTitle }}</h2>
12+
</div>
13+
<a
14+
class="github-link" href="https://github.com/fyodorio/ng-hotrod"
15+
layout="row"
16+
layout-align="center center">
17+
<img ng-src="{{ $ctrl.githubLogo }}" alt="GitHub">
18+
<div>GitHub</div>
19+
</a>
20+
</div>
21+
</md-toolbar>
22+
`,
23+
controller,
24+
};
25+
26+
export default navbarComponent;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import ngHotrodLogo from '../../../assets/img/icon-ng-hotrod-light.svg';
2+
import githubLogo from '../../../assets/img/icon-github.png';
3+
4+
class NavbarController {
5+
constructor(NavigationService) {
6+
this.NavigationService = NavigationService;
7+
this.ngHotrodLogo = ngHotrodLogo;
8+
this.githubLogo = githubLogo;
9+
}
10+
}
11+
12+
NavbarController.$inject = ['NavigationService'];
13+
14+
export default NavbarController;
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)